FINERACT-2243: New command processing - payment type (#5506)

This commit is contained in:
Aleksandar Vidakovic
2026-02-18 08:19:29 -06:00
committed by GitHub
parent 020754bad4
commit 3a842ecb9a
69 changed files with 727 additions and 758 deletions
@@ -23,7 +23,7 @@ import java.math.BigDecimal;
import java.time.LocalDate;
import java.util.List;
import org.apache.fineract.portfolio.note.data.NoteData;
import org.apache.fineract.portfolio.paymenttype.api.PaymentTypeApiResourceSwagger.GetPaymentTypesResponse;
import org.apache.fineract.portfolio.paymenttype.data.PaymentTypeData;
/**
* Created by sanyam on 25/7/17.
@@ -110,7 +110,7 @@ final class JournalEntriesApiResourceSwagger {
@Schema(example = "62")
public Long id;
public GetPaymentTypesResponse paymentType;
public PaymentTypeData paymentType;
@Schema(example = "acc123")
public String accountNumber;
@Schema(example = "che123")
@@ -187,7 +187,7 @@ public class JournalEntryReadPlatformServiceImpl implements JournalEntryReadPlat
final Long paymentTypeId = JdbcSupport.getLong(rs, "paymentTypeId");
if (paymentTypeId != null) {
final String typeName = rs.getString("paymentTypeName");
final PaymentTypeData paymentType = PaymentTypeData.instance(paymentTypeId, typeName);
final PaymentTypeData paymentType = PaymentTypeData.builder().id(paymentTypeId).name(typeName).build();
final String accountNumber = rs.getString("accountNumber");
final String checkNumber = rs.getString("checkNumber");
final String routingCode = rs.getString("routingCode");
@@ -91,7 +91,7 @@ import org.apache.fineract.portfolio.loanaccount.service.LoanReadPlatformService
import org.apache.fineract.portfolio.loanproduct.data.LoanProductData;
import org.apache.fineract.portfolio.loanproduct.service.LoanProductReadPlatformService;
import org.apache.fineract.portfolio.paymenttype.data.PaymentTypeData;
import org.apache.fineract.portfolio.paymenttype.service.PaymentTypeReadPlatformService;
import org.apache.fineract.portfolio.paymenttype.service.PaymentTypeReadService;
import org.apache.fineract.portfolio.products.data.ProductData;
import org.apache.fineract.portfolio.products.service.ShareProductReadPlatformService;
import org.apache.fineract.portfolio.savings.DepositAccountType;
@@ -124,7 +124,7 @@ public class BulkImportWorkbookPopulatorServiceImpl implements BulkImportWorkboo
private final CenterReadPlatformService centerReadPlatformService;
private final GroupReadPlatformService groupReadPlatformService;
private final FundReadPlatformService fundReadPlatformService;
private final PaymentTypeReadPlatformService paymentTypeReadPlatformService;
private final PaymentTypeReadService paymentTypeReadPlatformService;
private final LoanProductReadPlatformService loanProductReadPlatformService;
private final CurrencyReadPlatformService currencyReadPlatformService;
private final LoanReadPlatformService loanReadPlatformService;
@@ -142,7 +142,7 @@ public class BulkImportWorkbookPopulatorServiceImpl implements BulkImportWorkboo
final OfficeReadPlatformService officeReadPlatformService, final StaffReadPlatformService staffReadPlatformService,
final ClientReadPlatformService clientReadPlatformService, final CenterReadPlatformService centerReadPlatformService,
final GroupReadPlatformService groupReadPlatformService, final FundReadPlatformService fundReadPlatformService,
final PaymentTypeReadPlatformService paymentTypeReadPlatformService,
final PaymentTypeReadService paymentTypeReadPlatformService,
final LoanProductReadPlatformService loanProductReadPlatformService,
final CurrencyReadPlatformService currencyReadPlatformService, final LoanReadPlatformService loanReadPlatformService,
final GLAccountReadPlatformService glAccountReadPlatformService,
@@ -290,6 +290,13 @@ public class SecurityConfig {
.hasAnyAuthority(ALL_FUNCTIONS, ALL_FUNCTIONS_READ, "READ_IMPORT")
.requestMatchers(API_MATCHER.matcher(HttpMethod.GET, "/api/*/import/*"))
.hasAnyAuthority(ALL_FUNCTIONS, ALL_FUNCTIONS_READ, "READ_IMPORT")
// payment type
.requestMatchers(API_MATCHER.matcher(HttpMethod.GET, "/api/*/paymenttypes/*"))
.hasAnyAuthority(ALL_FUNCTIONS, ALL_FUNCTIONS_READ, "READ_PAYMENTTYPE")
.requestMatchers(API_MATCHER.matcher(HttpMethod.POST, "/api/*/paymenttypes"))
.hasAnyAuthority(ALL_FUNCTIONS, ALL_FUNCTIONS_WRITE, "UPDATE_PAYMENTTYPE")
.requestMatchers(API_MATCHER.matcher(HttpMethod.POST, "/api/*/paymenttypes"))
.hasAnyAuthority(ALL_FUNCTIONS, ALL_FUNCTIONS_WRITE, "DELETE_PAYMENTTYPE")
.requestMatchers(API_MATCHER.matcher(HttpMethod.POST, "/api/*/twofactor/validate")).fullyAuthenticated()
.requestMatchers(API_MATCHER.matcher("/api/*/twofactor")).fullyAuthenticated()
@@ -371,7 +371,7 @@ public class ChargeReadPlatformServiceImpl implements ChargeReadPlatformService
final String paymentTypeName = rs.getString("paymentTypeName");
PaymentTypeData paymentTypeData = null;
if (paymentTypeId != null) {
paymentTypeData = PaymentTypeData.instance(paymentTypeId, paymentTypeName);
paymentTypeData = PaymentTypeData.builder().id(paymentTypeId).name(paymentTypeName).build();
}
return ChargeData.builder().id(id).name(name).amount(amount).currency(currency).chargeTimeType(chargeTimeType)
@@ -107,7 +107,7 @@ public class ClientTransactionReadPlatformServiceImpl implements ClientTransacti
final Long paymentTypeId = JdbcSupport.getLong(rs, "paymentType");
if (paymentTypeId != null) {
final String typeName = rs.getString("paymentTypeName");
final PaymentTypeData paymentType = PaymentTypeData.instance(paymentTypeId, typeName);
final PaymentTypeData paymentType = PaymentTypeData.builder().id(paymentTypeId).name(typeName).build();
final String accountNumber = rs.getString("accountNumber");
final String checkNumber = rs.getString("checkNumber");
final String routingCode = rs.getString("routingCode");
@@ -65,7 +65,7 @@ import org.apache.fineract.portfolio.loanproduct.data.LoanProductData;
import org.apache.fineract.portfolio.meeting.attendance.service.AttendanceDropdownReadPlatformService;
import org.apache.fineract.portfolio.meeting.attendance.service.AttendanceEnumerations;
import org.apache.fineract.portfolio.paymenttype.data.PaymentTypeData;
import org.apache.fineract.portfolio.paymenttype.service.PaymentTypeReadPlatformService;
import org.apache.fineract.portfolio.paymenttype.service.PaymentTypeReadService;
import org.apache.fineract.portfolio.savings.data.SavingsProductData;
import org.apache.fineract.useradministration.domain.AppUser;
import org.springframework.dao.DataAccessException;
@@ -86,7 +86,7 @@ public class CollectionSheetReadPlatformServiceImpl implements CollectionSheetRe
private final AttendanceDropdownReadPlatformService attendanceDropdownReadPlatformService;
private final MandatorySavingsCollectionsheetExtractor mandatorySavingsExtractor;
private final CodeValueReadPlatformService codeValueReadPlatformService;
private final PaymentTypeReadPlatformService paymentTypeReadPlatformService;
private final PaymentTypeReadService paymentTypeReadPlatformService;
private final CalendarReadPlatformService calendarReadPlatformService;
private final ConfigurationDomainService configurationDomainService;
private final CalendarInstanceRepository calendarInstanceRepository;
@@ -98,8 +98,7 @@ public class CollectionSheetReadPlatformServiceImpl implements CollectionSheetRe
final CollectionSheetGenerateCommandFromApiJsonDeserializer collectionSheetGenerateCommandFromApiJsonDeserializer,
final CalendarRepositoryWrapper calendarRepositoryWrapper,
final AttendanceDropdownReadPlatformService attendanceDropdownReadPlatformService,
final CodeValueReadPlatformService codeValueReadPlatformService,
final PaymentTypeReadPlatformService paymentTypeReadPlatformService,
final CodeValueReadPlatformService codeValueReadPlatformService, final PaymentTypeReadService paymentTypeReadPlatformService,
final CalendarReadPlatformService calendarReadPlatformService, final ConfigurationDomainService configurationDomainService,
final CalendarInstanceRepository calendarInstanceRepository, DatabaseSpecificSQLGenerator sqlGenerator) {
this.context = context;
@@ -40,7 +40,7 @@ import org.apache.fineract.portfolio.meeting.attendance.service.AttendanceDropdo
import org.apache.fineract.portfolio.meeting.service.MeetingWritePlatformService;
import org.apache.fineract.portfolio.paymentdetail.domain.PaymentDetailAssembler;
import org.apache.fineract.portfolio.paymentdetail.service.PaymentDetailWritePlatformService;
import org.apache.fineract.portfolio.paymenttype.service.PaymentTypeReadPlatformService;
import org.apache.fineract.portfolio.paymenttype.service.PaymentTypeReadService;
import org.apache.fineract.portfolio.savings.domain.DepositAccountAssembler;
import org.apache.fineract.portfolio.savings.service.DepositAccountWritePlatformService;
import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean;
@@ -59,7 +59,7 @@ public class CollectionSheetConfiguration {
CollectionSheetGenerateCommandFromApiJsonDeserializer collectionSheetGenerateCommandFromApiJsonDeserializer,
CalendarRepositoryWrapper calendarRepositoryWrapper,
AttendanceDropdownReadPlatformService attendanceDropdownReadPlatformService,
CodeValueReadPlatformService codeValueReadPlatformService, PaymentTypeReadPlatformService paymentTypeReadPlatformService,
CodeValueReadPlatformService codeValueReadPlatformService, PaymentTypeReadService paymentTypeReadPlatformService,
CalendarReadPlatformService calendarReadPlatformService, ConfigurationDomainService configurationDomainService,
CalendarInstanceRepository calendarInstanceRepository, DatabaseSpecificSQLGenerator sqlGenerator) {
return new CollectionSheetReadPlatformServiceImpl(context, namedParameterJdbcTemplate, centerReadPlatformService,
@@ -79,7 +79,7 @@ import org.apache.fineract.portfolio.loanaccount.service.LoanReadPlatformService
import org.apache.fineract.portfolio.loanaccount.service.reaging.LoanReAgingService;
import org.apache.fineract.portfolio.loanaccount.service.reamortization.LoanReAmortizationService;
import org.apache.fineract.portfolio.paymenttype.data.PaymentTypeData;
import org.apache.fineract.portfolio.paymenttype.service.PaymentTypeReadPlatformService;
import org.apache.fineract.portfolio.paymenttype.service.PaymentTypeReadService;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;
import org.springframework.stereotype.Component;
@@ -110,7 +110,7 @@ public class LoanTransactionsApiResource {
private final ApiRequestParameterHelper apiRequestParameterHelper;
private final DefaultToApiJsonSerializer<LoanTransactionData> toApiJsonSerializer;
private final PortfolioCommandSourceWritePlatformService commandsSourceWritePlatformService;
private final PaymentTypeReadPlatformService paymentTypeReadPlatformService;
private final PaymentTypeReadService paymentTypeReadPlatformService;
private final LoanChargePaidByReadService loanChargePaidByReadService;
private final LoanReAgingService loanReAgingService;
private final LoanReAmortizationService loanReAmortizationService;
@@ -149,7 +149,7 @@ import org.apache.fineract.portfolio.loanproduct.service.LoanEnumerations;
import org.apache.fineract.portfolio.loanproduct.service.LoanProductReadPlatformService;
import org.apache.fineract.portfolio.paymentdetail.data.PaymentDetailData;
import org.apache.fineract.portfolio.paymenttype.data.PaymentTypeData;
import org.apache.fineract.portfolio.paymenttype.service.PaymentTypeReadPlatformService;
import org.apache.fineract.portfolio.paymenttype.service.PaymentTypeReadService;
import org.apache.fineract.useradministration.domain.AppUser;
import org.springframework.dao.DataAccessException;
import org.springframework.dao.EmptyResultDataAccessException;
@@ -177,7 +177,7 @@ public class LoanReadPlatformServiceImpl implements LoanReadPlatformService, Loa
private final CalendarReadPlatformService calendarReadPlatformService;
private final StaffReadPlatformService staffReadPlatformService;
private final PaginationHelper paginationHelper;
private final PaymentTypeReadPlatformService paymentTypeReadPlatformService;
private final PaymentTypeReadService paymentTypeReadPlatformService;
private final FloatingRatesReadPlatformService floatingRatesReadPlatformService;
private final LoanUtilService loanUtilService;
private final ConfigurationDomainService configurationDomainService;
@@ -1395,7 +1395,7 @@ public class LoanReadPlatformServiceImpl implements LoanReadPlatformService, Loa
final Long paymentTypeId = JdbcSupport.getLong(rs, "paymentType");
if (paymentTypeId != null) {
final String typeName = rs.getString("paymentTypeName");
final PaymentTypeData paymentType = PaymentTypeData.instance(paymentTypeId, typeName);
final PaymentTypeData paymentType = PaymentTypeData.builder().id(paymentTypeId).name(typeName).build();
final String accountNumber = rs.getString("accountNumber");
final String checkNumber = rs.getString("checkNumber");
final String routingCode = rs.getString("routingCode");
@@ -176,7 +176,7 @@ import org.apache.fineract.portfolio.loanproduct.service.LoanDropdownReadPlatfor
import org.apache.fineract.portfolio.loanproduct.service.LoanProductReadPlatformService;
import org.apache.fineract.portfolio.note.domain.NoteRepository;
import org.apache.fineract.portfolio.paymentdetail.service.PaymentDetailWritePlatformService;
import org.apache.fineract.portfolio.paymenttype.service.PaymentTypeReadPlatformService;
import org.apache.fineract.portfolio.paymenttype.service.PaymentTypeReadService;
import org.apache.fineract.portfolio.rate.service.RateAssembler;
import org.apache.fineract.portfolio.repaymentwithpostdatedchecks.domain.PostDatedChecksRepository;
import org.apache.fineract.portfolio.repaymentwithpostdatedchecks.service.RepaymentWithPostDatedChecksAssembler;
@@ -342,15 +342,14 @@ public class LoanAccountConfiguration {
FundReadPlatformService fundReadPlatformService, ChargeReadPlatformService chargeReadPlatformService,
CodeValueReadPlatformService codeValueReadPlatformService, CalendarReadPlatformService calendarReadPlatformService,
StaffReadPlatformService staffReadPlatformService, PaginationHelper paginationHelper,
PaymentTypeReadPlatformService paymentTypeReadPlatformService,
FloatingRatesReadPlatformService floatingRatesReadPlatformService, LoanUtilService loanUtilService,
ConfigurationDomainService configurationDomainService, AccountDetailsReadPlatformService accountDetailsReadPlatformService,
ColumnValidator columnValidator, DatabaseSpecificSQLGenerator sqlGenerator,
DelinquencyReadPlatformService delinquencyReadPlatformService, LoanTransactionRepository loanTransactionRepository,
LoanChargePaidByReadService loanChargePaidByReadService, LoanTransactionRelationReadService loanTransactionRelationReadService,
LoanForeclosureValidator loanForeclosureValidator, LoanTransactionMapper loanTransactionMapper,
LoanTransactionProcessingService loanTransactionProcessingService, LoanBalanceService loanBalanceService,
LoanCapitalizedIncomeBalanceRepository loanCapitalizedIncomeBalanceRepository,
PaymentTypeReadService paymentTypeReadPlatformService, FloatingRatesReadPlatformService floatingRatesReadPlatformService,
LoanUtilService loanUtilService, ConfigurationDomainService configurationDomainService,
AccountDetailsReadPlatformService accountDetailsReadPlatformService, ColumnValidator columnValidator,
DatabaseSpecificSQLGenerator sqlGenerator, DelinquencyReadPlatformService delinquencyReadPlatformService,
LoanTransactionRepository loanTransactionRepository, LoanChargePaidByReadService loanChargePaidByReadService,
LoanTransactionRelationReadService loanTransactionRelationReadService, LoanForeclosureValidator loanForeclosureValidator,
LoanTransactionMapper loanTransactionMapper, LoanTransactionProcessingService loanTransactionProcessingService,
LoanBalanceService loanBalanceService, LoanCapitalizedIncomeBalanceRepository loanCapitalizedIncomeBalanceRepository,
LoanBuyDownFeeBalanceRepository loanBuyDownFeeBalanceRepository,
@Lazy InterestRefundServiceDelegate interestRefundServiceDelegate, LoanMaximumAmountCalculator loanMaximumAmountCalculator,
LoanRepaymentScheduleService loanRepaymentScheduleService) {
@@ -109,7 +109,7 @@ import org.apache.fineract.portfolio.loanproduct.productmix.service.ProductMixRe
import org.apache.fineract.portfolio.loanproduct.service.LoanDropdownReadPlatformService;
import org.apache.fineract.portfolio.loanproduct.service.LoanProductReadPlatformService;
import org.apache.fineract.portfolio.paymenttype.data.PaymentTypeData;
import org.apache.fineract.portfolio.paymenttype.service.PaymentTypeReadPlatformService;
import org.apache.fineract.portfolio.paymenttype.service.PaymentTypeReadService;
import org.apache.fineract.portfolio.rate.data.RateData;
import org.apache.fineract.portfolio.rate.service.RateReadService;
import org.springframework.stereotype.Component;
@@ -165,7 +165,7 @@ public class LoanProductsApiResource {
private final DefaultToApiJsonSerializer<ProductMixData> productMixDataApiJsonSerializer;
private final ProductMixReadPlatformService productMixReadPlatformService;
private final DropdownReadPlatformService commonDropdownReadPlatformService;
private final PaymentTypeReadPlatformService paymentTypeReadPlatformService;
private final PaymentTypeReadService paymentTypeReadPlatformService;
private final FloatingRatesReadPlatformService floatingRateReadPlatformService;
private final RateReadService rateReadService;
private final ConfigurationDomainService configurationDomainService;
@@ -45,7 +45,7 @@ import org.apache.fineract.infrastructure.core.serialization.ApiRequestJsonSeria
import org.apache.fineract.infrastructure.core.serialization.DefaultToApiJsonSerializer;
import org.apache.fineract.infrastructure.security.service.PlatformSecurityContext;
import org.apache.fineract.portfolio.paymenttype.data.PaymentTypeData;
import org.apache.fineract.portfolio.paymenttype.service.PaymentTypeReadPlatformService;
import org.apache.fineract.portfolio.paymenttype.service.PaymentTypeReadService;
import org.apache.fineract.portfolio.savings.DepositAccountType;
import org.apache.fineract.portfolio.savings.DepositsApiConstants;
import org.apache.fineract.portfolio.savings.data.SavingsAccountTransactionData;
@@ -63,7 +63,7 @@ public class FixedDepositAccountTransactionsApiResource {
private final PortfolioCommandSourceWritePlatformService commandsSourceWritePlatformService;
private final ApiRequestParameterHelper apiRequestParameterHelper;
private final SavingsAccountReadPlatformService savingsAccountReadPlatformService;
private final PaymentTypeReadPlatformService paymentTypeReadPlatformService;
private final PaymentTypeReadService paymentTypeReadPlatformService;
private static final Set<String> FIXED_DEPOSIT_TRANSACTION_RESPONSE_DATA_PARAMETERS = new HashSet<>(
Arrays.asList(DepositsApiConstants.idParamName, DepositsApiConstants.accountIdParamName,
DepositsApiConstants.accountNoParamName, DepositsApiConstants.currencyParamName, DepositsApiConstants.amountParamName,
@@ -66,7 +66,7 @@ import org.apache.fineract.portfolio.common.service.DropdownReadPlatformService;
import org.apache.fineract.portfolio.interestratechart.data.InterestRateChartData;
import org.apache.fineract.portfolio.interestratechart.service.InterestRateChartReadPlatformService;
import org.apache.fineract.portfolio.paymenttype.data.PaymentTypeData;
import org.apache.fineract.portfolio.paymenttype.service.PaymentTypeReadPlatformService;
import org.apache.fineract.portfolio.paymenttype.service.PaymentTypeReadService;
import org.apache.fineract.portfolio.savings.DepositAccountType;
import org.apache.fineract.portfolio.savings.DepositsApiConstants;
import org.apache.fineract.portfolio.savings.SavingsCompoundingInterestPeriodType;
@@ -108,7 +108,7 @@ public class FixedDepositProductsApiResource {
private final InterestRateChartReadPlatformService interestRateChartReadPlatformService;
private final DepositsDropdownReadPlatformService depositsDropdownReadPlatformService;
private final DropdownReadPlatformService dropdownReadPlatformService;
private final PaymentTypeReadPlatformService paymentTypeReadPlatformService;
private final PaymentTypeReadService paymentTypeReadPlatformService;
private final TaxReadPlatformService taxReadPlatformService;
@POST
@@ -52,7 +52,7 @@ import org.apache.fineract.infrastructure.core.serialization.ApiRequestJsonSeria
import org.apache.fineract.infrastructure.core.serialization.DefaultToApiJsonSerializer;
import org.apache.fineract.infrastructure.security.service.PlatformSecurityContext;
import org.apache.fineract.portfolio.paymenttype.data.PaymentTypeData;
import org.apache.fineract.portfolio.paymenttype.service.PaymentTypeReadPlatformService;
import org.apache.fineract.portfolio.paymenttype.service.PaymentTypeReadService;
import org.apache.fineract.portfolio.savings.DepositAccountType;
import org.apache.fineract.portfolio.savings.DepositsApiConstants;
import org.apache.fineract.portfolio.savings.data.SavingsAccountTransactionData;
@@ -72,7 +72,7 @@ public class RecurringDepositAccountTransactionsApiResource {
private final ApiRequestParameterHelper apiRequestParameterHelper;
private final SavingsAccountReadPlatformService savingsAccountReadPlatformService;
private final DepositAccountReadPlatformService depositAccountReadPlatformService;
private final PaymentTypeReadPlatformService paymentTypeReadPlatformService;
private final PaymentTypeReadService paymentTypeReadPlatformService;
private static final Set<String> FIXED_DEPOSIT_TRANSACTION_RESPONSE_DATA_PARAMETERS = new HashSet<>(
Arrays.asList(DepositsApiConstants.idParamName, DepositsApiConstants.accountIdParamName,
DepositsApiConstants.accountNoParamName, DepositsApiConstants.currencyParamName, DepositsApiConstants.amountParamName,
@@ -67,7 +67,7 @@ import org.apache.fineract.portfolio.common.service.DropdownReadPlatformService;
import org.apache.fineract.portfolio.interestratechart.data.InterestRateChartData;
import org.apache.fineract.portfolio.interestratechart.service.InterestRateChartReadPlatformService;
import org.apache.fineract.portfolio.paymenttype.data.PaymentTypeData;
import org.apache.fineract.portfolio.paymenttype.service.PaymentTypeReadPlatformService;
import org.apache.fineract.portfolio.paymenttype.service.PaymentTypeReadService;
import org.apache.fineract.portfolio.savings.DepositAccountType;
import org.apache.fineract.portfolio.savings.DepositsApiConstants;
import org.apache.fineract.portfolio.savings.SavingsCompoundingInterestPeriodType;
@@ -108,7 +108,7 @@ public class RecurringDepositProductsApiResource {
private final InterestRateChartReadPlatformService interestRateChartReadPlatformService;
private final DepositsDropdownReadPlatformService depositsDropdownReadPlatformService;
private final DropdownReadPlatformService dropdownReadPlatformService;
private final PaymentTypeReadPlatformService paymentTypeReadPlatformService;
private final PaymentTypeReadService paymentTypeReadPlatformService;
private final TaxReadPlatformService taxReadPlatformService;
@POST
@@ -55,7 +55,7 @@ import org.apache.fineract.infrastructure.core.serialization.JsonParserHelper;
import org.apache.fineract.infrastructure.core.service.PagedLocalRequest;
import org.apache.fineract.infrastructure.security.service.PlatformSecurityContext;
import org.apache.fineract.portfolio.paymenttype.data.PaymentTypeData;
import org.apache.fineract.portfolio.paymenttype.service.PaymentTypeReadPlatformService;
import org.apache.fineract.portfolio.paymenttype.service.PaymentTypeReadService;
import org.apache.fineract.portfolio.savings.DepositAccountType;
import org.apache.fineract.portfolio.savings.SavingsApiConstants;
import org.apache.fineract.portfolio.savings.data.SavingsAccountTransactionData;
@@ -78,7 +78,7 @@ public class SavingsAccountTransactionsApiResource {
private final PortfolioCommandSourceWritePlatformService commandsSourceWritePlatformService;
private final ApiRequestParameterHelper apiRequestParameterHelper;
private final SavingsAccountReadPlatformService savingsAccountReadPlatformService;
private final PaymentTypeReadPlatformService paymentTypeReadPlatformService;
private final PaymentTypeReadService paymentTypeReadPlatformService;
private final SavingsAccountTransactionSearchService transactionsSearchService;
private boolean is(final String commandParam, final String commandValue) {
@@ -64,7 +64,7 @@ import org.apache.fineract.organisation.monetary.service.CurrencyReadPlatformSer
import org.apache.fineract.portfolio.charge.data.ChargeData;
import org.apache.fineract.portfolio.charge.service.ChargeReadPlatformService;
import org.apache.fineract.portfolio.paymenttype.data.PaymentTypeData;
import org.apache.fineract.portfolio.paymenttype.service.PaymentTypeReadPlatformService;
import org.apache.fineract.portfolio.paymenttype.service.PaymentTypeReadService;
import org.apache.fineract.portfolio.savings.SavingsApiConstants;
import org.apache.fineract.portfolio.savings.SavingsCompoundingInterestPeriodType;
import org.apache.fineract.portfolio.savings.SavingsInterestCalculationDaysInYearType;
@@ -96,7 +96,7 @@ public class SavingsProductsApiResource {
private final AccountingDropdownReadPlatformService accountingDropdownReadPlatformService;
private final ProductToGLAccountMappingReadPlatformService accountMappingReadPlatformService;
private final ChargeReadPlatformService chargeReadPlatformService;
private final PaymentTypeReadPlatformService paymentTypeReadPlatformService;
private final PaymentTypeReadService paymentTypeReadPlatformService;
private final TaxReadPlatformService taxReadPlatformService;
private final ConfigurationDomainService configurationDomainService;
@@ -29,7 +29,7 @@ import org.apache.fineract.infrastructure.core.api.JsonQuery;
import org.apache.fineract.infrastructure.core.data.EnumOptionData;
import org.apache.fineract.infrastructure.core.serialization.FromJsonHelper;
import org.apache.fineract.portfolio.paymenttype.data.PaymentTypeData;
import org.apache.fineract.portfolio.paymenttype.service.PaymentTypeReadPlatformService;
import org.apache.fineract.portfolio.paymenttype.service.PaymentTypeReadService;
import org.apache.fineract.portfolio.savings.DepositAccountOnClosureType;
import org.apache.fineract.portfolio.savings.DepositAccountType;
import org.apache.fineract.portfolio.savings.data.DepositAccountData;
@@ -51,7 +51,7 @@ public class DepositAccountPreMatureCalculationPlatformServiceImpl implements De
private final DepositAccountAssembler depositAccountAssembler;
private final SavingsAccountReadPlatformService savingsAccountReadPlatformService;
private final ConfigurationDomainService configurationDomainService;
private final PaymentTypeReadPlatformService paymentTypeReadPlatformService;
private final PaymentTypeReadService paymentTypeReadPlatformService;
@Transactional
@Override
@@ -68,7 +68,7 @@ import org.apache.fineract.portfolio.interestratechart.data.InterestRateChartDat
import org.apache.fineract.portfolio.interestratechart.service.InterestRateChartReadPlatformService;
import org.apache.fineract.portfolio.paymentdetail.data.PaymentDetailData;
import org.apache.fineract.portfolio.paymenttype.data.PaymentTypeData;
import org.apache.fineract.portfolio.paymenttype.service.PaymentTypeReadPlatformService;
import org.apache.fineract.portfolio.paymenttype.service.PaymentTypeReadService;
import org.apache.fineract.portfolio.savings.DepositAccountOnClosureType;
import org.apache.fineract.portfolio.savings.DepositAccountType;
import org.apache.fineract.portfolio.savings.SavingsAccountTransactionType;
@@ -127,7 +127,7 @@ public class DepositAccountReadPlatformServiceImpl implements DepositAccountRead
private final RecurringAccountDepositTransactionTemplateMapper rdTransactionTemplateMapper = new RecurringAccountDepositTransactionTemplateMapper();
private final DropdownReadPlatformService dropdownReadPlatformService;
private final CalendarReadPlatformService calendarReadPlatformService;
private final PaymentTypeReadPlatformService paymentTypeReadPlatformService;
private final PaymentTypeReadService paymentTypeReadPlatformService;
@Override
public Collection<DepositAccountData> retrieveAll(final DepositAccountType depositAccountType,
@@ -1160,7 +1160,7 @@ public class DepositAccountReadPlatformServiceImpl implements DepositAccountRead
final Long paymentTypeId = JdbcSupport.getLong(rs, PAYMENT_TYPE);
if (paymentTypeId != null) {
final String typeName = rs.getString(PAYMENT_TYPE_NAME);
final PaymentTypeData paymentType = PaymentTypeData.instance(paymentTypeId, typeName);
final PaymentTypeData paymentType = PaymentTypeData.builder().id(paymentTypeId).name(typeName).build();
final String accountNumber = rs.getString(ACCOUNT_NUMBER);
final String checkNumber = rs.getString(CHECK_NUMBER);
final String routingCode = rs.getString(ROUTING_CODE);
@@ -1165,7 +1165,7 @@ public class SavingsAccountReadPlatformServiceImpl implements SavingsAccountRead
final Long paymentTypeId = JdbcSupport.getLong(rs, "paymentType");
if (paymentTypeId != null) {
final String typeName = rs.getString("paymentTypeName");
final PaymentTypeData paymentType = PaymentTypeData.instance(paymentTypeId, typeName);
final PaymentTypeData paymentType = PaymentTypeData.builder().id(paymentTypeId).name(typeName).build();
final String accountNumber = rs.getString("accountNumber");
final String checkNumber = rs.getString("checkNumber");
final String routingCode = rs.getString("routingCode");
@@ -67,7 +67,7 @@ import org.apache.fineract.portfolio.interestratechart.service.InterestRateChart
import org.apache.fineract.portfolio.loanaccount.domain.LoanRepository;
import org.apache.fineract.portfolio.note.domain.NoteRepository;
import org.apache.fineract.portfolio.paymentdetail.service.PaymentDetailWritePlatformService;
import org.apache.fineract.portfolio.paymenttype.service.PaymentTypeReadPlatformService;
import org.apache.fineract.portfolio.paymenttype.service.PaymentTypeReadService;
import org.apache.fineract.portfolio.savings.data.DepositAccountDataValidator;
import org.apache.fineract.portfolio.savings.data.DepositAccountTransactionDataValidator;
import org.apache.fineract.portfolio.savings.data.DepositProductDataValidator;
@@ -190,7 +190,7 @@ public class SavingsConfiguration {
public DepositAccountPreMatureCalculationPlatformService depositAccountPreMatureCalculationPlatformService(
FromJsonHelper fromJsonHelper, DepositAccountTransactionDataValidator depositAccountTransactionDataValidator,
DepositAccountAssembler depositAccountAssembler, SavingsAccountReadPlatformService savingsAccountReadPlatformService,
ConfigurationDomainService configurationDomainService, PaymentTypeReadPlatformService paymentTypeReadPlatformService) {
ConfigurationDomainService configurationDomainService, PaymentTypeReadService paymentTypeReadPlatformService) {
return new DepositAccountPreMatureCalculationPlatformServiceImpl(fromJsonHelper, depositAccountTransactionDataValidator,
depositAccountAssembler, savingsAccountReadPlatformService, configurationDomainService, paymentTypeReadPlatformService);
@@ -207,7 +207,7 @@ public class SavingsConfiguration {
SavingsDropdownReadPlatformService savingsDropdownReadPlatformService, ChargeReadPlatformService chargeReadPlatformService,
StaffReadPlatformService staffReadPlatformService, DepositsDropdownReadPlatformService depositsDropdownReadPlatformService,
SavingsAccountReadPlatformService savingsAccountReadPlatformService, DropdownReadPlatformService dropdownReadPlatformService,
CalendarReadPlatformService calendarReadPlatformService, PaymentTypeReadPlatformService paymentTypeReadPlatformService) {
CalendarReadPlatformService calendarReadPlatformService, PaymentTypeReadService paymentTypeReadPlatformService) {
return new DepositAccountReadPlatformServiceImpl(context, jdbcTemplate, chartReadPlatformService, productChartReadPlatformService,
paginationParametersDataValidator, sqlGenerator, paginationHelper, clientReadPlatformService, groupReadPlatformService,
depositProductReadPlatformService, savingsDropdownReadPlatformService, chargeReadPlatformService, staffReadPlatformService,
@@ -577,6 +577,28 @@ resilience4j.retry.instances.commandImageDelete.enable-exponential-backoff=${FIN
resilience4j.retry.instances.commandImageDelete.exponential-backoff-multiplier=${FINERACT_COMMAND_IMAGE_DELETE_RETRY_EXPONENTIAL_BACKOFF_MULTIPLIER:2}
resilience4j.retry.instances.commandImageDelete.retryExceptions=${FINERACT_COMMAND_IMAGE_DELETE_RETRY_EXCEPTIONS:org.springframework.dao.ConcurrencyFailureException,org.eclipse.persistence.exceptions.OptimisticLockException,jakarta.persistence.OptimisticLockException,org.springframework.orm.jpa.JpaOptimisticLockingFailureException}
# payment type
resilience4j.retry.instances.commandPaymentTypeCreate.max-attempts=${FINERACT_COMMAND_PAYMENT_TYPE_CREATE_RETRY_MAX_ATTEMPTS:3}
resilience4j.retry.instances.commandPaymentTypeCreate.wait-duration=${FINERACT_COMMAND_PAYMENT_TYPE_CREATE_RETRY_WAIT_DURATION:1s}
resilience4j.retry.instances.commandPaymentTypeCreate.enable-exponential-backoff=${FINERACT_COMMAND_PAYMENT_TYPE_CREATE_RETRY_ENABLE_EXPONENTIAL_BACKOFF:true}
resilience4j.retry.instances.commandPaymentTypeCreate.exponential-backoff-multiplier=${FINERACT_COMMAND_PAYMENT_TYPE_CREATE_RETRY_EXPONENTIAL_BACKOFF_MULTIPLIER:2}
resilience4j.retry.instances.commandPaymentTypeCreate.retryExceptions=${FINERACT_COMMAND_PAYMENT_TYPE_CREATE_RETRY_EXCEPTIONS:org.springframework.dao.ConcurrencyFailureException,org.eclipse.persistence.exceptions.OptimisticLockException,jakarta.persistence.OptimisticLockException,org.springframework.orm.jpa.JpaOptimisticLockingFailureException}
resilience4j.retry.instances.commandPaymentTypeUpdate.max-attempts=${FINERACT_COMMAND_PAYMENT_TYPE_UPDATE_RETRY_MAX_ATTEMPTS:3}
resilience4j.retry.instances.commandPaymentTypeUpdate.wait-duration=${FINERACT_COMMAND_PAYMENT_TYPE_UPDATE_RETRY_WAIT_DURATION:1s}
resilience4j.retry.instances.commandPaymentTypeUpdate.enable-exponential-backoff=${FINERACT_COMMAND_PAYMENT_TYPE_UPDATE_RETRY_ENABLE_EXPONENTIAL_BACKOFF:true}
resilience4j.retry.instances.commandPaymentTypeUpdate.exponential-backoff-multiplier=${FINERACT_COMMAND_PAYMENT_TYPE_UPDATE_RETRY_EXPONENTIAL_BACKOFF_MULTIPLIER:2}
resilience4j.retry.instances.commandPaymentTypeUpdate.retryExceptions=${FINERACT_COMMAND_PAYMENT_TYPE_UPDATE_RETRY_EXCEPTIONS:org.springframework.dao.ConcurrencyFailureException,org.eclipse.persistence.exceptions.OptimisticLockException,jakarta.persistence.OptimisticLockException,org.springframework.orm.jpa.JpaOptimisticLockingFailureException}
resilience4j.retry.instances.commandPaymentTypeDelete.max-attempts=${FINERACT_COMMAND_PAYMENT_TYPE_DELETE_RETRY_MAX_ATTEMPTS:3}
resilience4j.retry.instances.commandPaymentTypeDelete.wait-duration=${FINERACT_COMMAND_PAYMENT_TYPE_DELETE_RETRY_WAIT_DURATION:1s}
resilience4j.retry.instances.commandPaymentTypeDelete.enable-exponential-backoff=${FINERACT_COMMAND_PAYMENT_TYPE_DELETE_RETRY_ENABLE_EXPONENTIAL_BACKOFF:true}
resilience4j.retry.instances.commandPaymentTypeDelete.exponential-backoff-multiplier=${FINERACT_COMMAND_PAYMENT_TYPE_DELETE_RETRY_EXPONENTIAL_BACKOFF_MULTIPLIER:2}
resilience4j.retry.instances.commandPaymentTypeDelete.retryExceptions=${FINERACT_COMMAND_PAYMENT_TYPE_DELETE_RETRY_EXCEPTIONS:org.springframework.dao.ConcurrencyFailureException,org.eclipse.persistence.exceptions.OptimisticLockException,jakarta.persistence.OptimisticLockException,org.springframework.orm.jpa.JpaOptimisticLockingFailureException}
# command
fineract.command.enabled=true
fineract.command.executor=${FINERACT_COMMAND_EXECUTOR:sync}
fineract.command.ring-buffer-size=${FINERACT_COMMAND_RING_BUFFER_SIZE:1024}
@@ -587,8 +609,6 @@ fineract.command.idempotency-key-header-name=${FINERACT_IDEMPOTENCY_KEY_HEADER_N
fineract.command.file-dead-letter-queue-enabled=${FINERACT_FILE_DEAD_LETTER_QUEUE_ENABLED:false}
fineract.command.file-dead-letter-queue-path=${FINERACT_FILE_DEAD_LETTER_QUEUE_PATH:/tmp/fineract-command-audit}
# command
resilience4j.retry.instances.commandAuditProcessing.max-attempts=${FINERACT_COMMAND_AUDIT_PROCESSING_RETRY_MAX_ATTEMPTS:3}
resilience4j.retry.instances.commandAuditProcessing.wait-duration=${FINERACT_COMMAND_AUDIT_PROCESSING_RETRY_WAIT_DURATION:1s}
resilience4j.retry.instances.commandAuditProcessing.enable-exponential-backoff=${FINERACT_COMMAND_AUDIT_PROCESSING_RETRY_ENABLE_EXPONENTIAL_BACKOFF:true}