This is an automated email from the ASF dual-hosted git repository.
aleks pushed a commit to branch develop
in repository https://gitbox.apache.org/repos/asf/fineract.git
The following commit(s) were added to refs/heads/develop by this push:
new dc3b94d11 FINERACT-1932: Add starter Configuration class for
portfolio.savings module
dc3b94d11 is described below
commit dc3b94d1179e553442239fac4915ee6906e66884
Author: Mohamed Magdi-Abdelmonem <[email protected]>
AuthorDate: Sat Sep 30 15:44:30 2023 +0300
FINERACT-1932: Add starter Configuration class for portfolio.savings module
---
...ntInterestRateChartReadPlatformServiceImpl.java | 22 +-
...ntOnHoldTransactionReadPlatformServiceImpl.java | 17 +-
...untPreMatureCalculationPlatformServiceImpl.java | 20 +-
.../DepositAccountReadPlatformServiceImpl.java | 46 +--
...countWritePlatformServiceJpaRepositoryImpl.java | 2 -
...ocessWritePlatformServiceJpaRepositoryImpl.java | 50 +--
.../DepositProductReadPlatformServiceImpl.java | 13 +-
.../DepositsDropdownReadPlatformServiceImpl.java | 4 +-
...oductWritePlatformServiceJpaRepositoryImpl.java | 27 +-
.../service/GSIMReadPlatformServiceImpl.java | 14 +-
...dividualMonitoringWritePlatformServiceImpl.java | 13 +-
...oductWritePlatformServiceJpaRepositoryImpl.java | 27 +-
...countApplicationTransitionApiJsonValidator.java | 10 +-
...avingsAccountChargeReadPlatformServiceImpl.java | 4 -
.../SavingsAccountInterestPostingServiceImpl.java | 10 +-
.../SavingsAccountReadPlatformServiceImpl.java | 4 -
...countWritePlatformServiceJpaRepositoryImpl.java | 2 -
...ocessWritePlatformServiceJpaRepositoryImpl.java | 2 -
.../SavingsDropdownReadPlatformServiceImpl.java | 4 +-
.../SavingsProductReadPlatformServiceImpl.java | 2 -
...oductWritePlatformServiceJpaRepositoryImpl.java | 26 +-
.../service/SavingsSchedularInterestPoster.java | 4 -
.../SavingsSchedularInterestPosterTask.java | 4 -
...avingsAccountTransactionsSearchServiceImpl.java | 2 -
.../savings/starter/SavingsConfiguration.java | 440 +++++++++++++++++++++
25 files changed, 488 insertions(+), 281 deletions(-)
diff --git
a/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/service/DepositAccountInterestRateChartReadPlatformServiceImpl.java
b/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/service/DepositAccountInterestRateChartReadPlatformServiceImpl.java
index d83b08ecd..eda6a2a04 100644
---
a/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/service/DepositAccountInterestRateChartReadPlatformServiceImpl.java
+++
b/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/service/DepositAccountInterestRateChartReadPlatformServiceImpl.java
@@ -26,6 +26,7 @@ import java.time.LocalDate;
import java.util.ArrayList;
import java.util.Collection;
import java.util.List;
+import lombok.RequiredArgsConstructor;
import org.apache.fineract.infrastructure.codes.data.CodeValueData;
import
org.apache.fineract.infrastructure.codes.service.CodeValueReadPlatformService;
import org.apache.fineract.infrastructure.core.data.EnumOptionData;
@@ -45,15 +46,13 @@ import
org.apache.fineract.portfolio.savings.data.DepositAccountInterestIncentiv
import
org.apache.fineract.portfolio.savings.data.DepositAccountInterestRateChartData;
import
org.apache.fineract.portfolio.savings.data.DepositAccountInterestRateChartSlabData;
import
org.apache.fineract.portfolio.savings.exception.DepositAccountInterestRateChartNotFoundException;
-import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.dao.DataAccessException;
import org.springframework.dao.EmptyResultDataAccessException;
import org.springframework.jdbc.core.JdbcTemplate;
import org.springframework.jdbc.core.ResultSetExtractor;
import org.springframework.jdbc.core.RowMapper;
-import org.springframework.stereotype.Service;
-@Service
+@RequiredArgsConstructor
public class DepositAccountInterestRateChartReadPlatformServiceImpl implements
DepositAccountInterestRateChartReadPlatformService {
private final PlatformSecurityContext context;
@@ -64,19 +63,6 @@ public class
DepositAccountInterestRateChartReadPlatformServiceImpl implements D
private final InterestIncentiveDropdownReadPlatformService
interestIncentiveDropdownReadPlatformService;
private final CodeValueReadPlatformService codeValueReadPlatformService;
- @Autowired
- public
DepositAccountInterestRateChartReadPlatformServiceImpl(PlatformSecurityContext
context, final JdbcTemplate jdbcTemplate,
- InterestRateChartDropdownReadPlatformService
chartDropdownReadPlatformService,
- final InterestIncentiveDropdownReadPlatformService
interestIncentiveDropdownReadPlatformService,
- final CodeValueReadPlatformService codeValueReadPlatformService,
DatabaseSpecificSQLGenerator sqlGenerator) {
- this.context = context;
- this.jdbcTemplate = jdbcTemplate;
- this.chartDropdownReadPlatformService =
chartDropdownReadPlatformService;
- this.interestIncentiveDropdownReadPlatformService =
interestIncentiveDropdownReadPlatformService;
- this.codeValueReadPlatformService = codeValueReadPlatformService;
- chartExtractor = new
DepositAccountInterestRateChartExtractor(sqlGenerator);
- }
-
@Override
public DepositAccountInterestRateChartData retrieveOne(Long chartId) {
try {
@@ -182,7 +168,7 @@ public class
DepositAccountInterestRateChartReadPlatformServiceImpl implements D
clientClassificationOptions);
}
- private static final class DepositAccountInterestRateChartExtractor
+ public static final class DepositAccountInterestRateChartExtractor
implements
ResultSetExtractor<Collection<DepositAccountInterestRateChartData>> {
DepositAccountInterestRateChartMapper chartMapper = new
DepositAccountInterestRateChartMapper();
@@ -194,7 +180,7 @@ public class
DepositAccountInterestRateChartReadPlatformServiceImpl implements D
return this.schemaSql;
}
- private
DepositAccountInterestRateChartExtractor(DatabaseSpecificSQLGenerator
sqlGenerator) {
+ public
DepositAccountInterestRateChartExtractor(DatabaseSpecificSQLGenerator
sqlGenerator) {
final StringBuilder sqlBuilder = new StringBuilder(400);
sqlBuilder.append("irc.id as ircId, irc.name as ircName,
irc.description as ircDescription,")
diff --git
a/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/service/DepositAccountOnHoldTransactionReadPlatformServiceImpl.java
b/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/service/DepositAccountOnHoldTransactionReadPlatformServiceImpl.java
index 3ab068f2f..77eada460 100644
---
a/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/service/DepositAccountOnHoldTransactionReadPlatformServiceImpl.java
+++
b/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/service/DepositAccountOnHoldTransactionReadPlatformServiceImpl.java
@@ -24,6 +24,7 @@ import java.sql.SQLException;
import java.time.LocalDate;
import java.util.ArrayList;
import java.util.List;
+import lombok.RequiredArgsConstructor;
import org.apache.fineract.infrastructure.core.data.EnumOptionData;
import org.apache.fineract.infrastructure.core.domain.JdbcSupport;
import org.apache.fineract.infrastructure.core.service.Page;
@@ -32,29 +33,17 @@ import
org.apache.fineract.infrastructure.core.service.SearchParameters;
import
org.apache.fineract.infrastructure.core.service.database.DatabaseSpecificSQLGenerator;
import org.apache.fineract.infrastructure.security.utils.ColumnValidator;
import
org.apache.fineract.portfolio.savings.data.DepositAccountOnHoldTransactionData;
-import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.jdbc.core.JdbcTemplate;
import org.springframework.jdbc.core.RowMapper;
-import org.springframework.stereotype.Service;
-@Service
+@RequiredArgsConstructor
public class DepositAccountOnHoldTransactionReadPlatformServiceImpl implements
DepositAccountOnHoldTransactionReadPlatformService {
private final JdbcTemplate jdbcTemplate;
private final DatabaseSpecificSQLGenerator sqlGenerator;
private final ColumnValidator columnValidator;
private final PaginationHelper paginationHelper;
- private final DepositAccountOnHoldTransactionsMapper mapper;
-
- @Autowired
- public DepositAccountOnHoldTransactionReadPlatformServiceImpl(final
JdbcTemplate jdbcTemplate, final ColumnValidator columnValidator,
- DatabaseSpecificSQLGenerator sqlGenerator, PaginationHelper
paginationHelper) {
- this.jdbcTemplate = jdbcTemplate;
- this.sqlGenerator = sqlGenerator;
- this.mapper = new DepositAccountOnHoldTransactionsMapper();
- this.columnValidator = columnValidator;
- this.paginationHelper = paginationHelper;
- }
+ private final DepositAccountOnHoldTransactionsMapper mapper = new
DepositAccountOnHoldTransactionsMapper();
@Override
public Page<DepositAccountOnHoldTransactionData> retriveAll(Long
savingsId, Long guarantorFundingId,
diff --git
a/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/service/DepositAccountPreMatureCalculationPlatformServiceImpl.java
b/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/service/DepositAccountPreMatureCalculationPlatformServiceImpl.java
index 19e0f24da..e915c1b73 100644
---
a/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/service/DepositAccountPreMatureCalculationPlatformServiceImpl.java
+++
b/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/service/DepositAccountPreMatureCalculationPlatformServiceImpl.java
@@ -23,6 +23,7 @@ import static
org.apache.fineract.portfolio.savings.DepositsApiConstants.closedO
import com.google.gson.JsonElement;
import java.time.LocalDate;
import java.util.Collection;
+import lombok.RequiredArgsConstructor;
import
org.apache.fineract.infrastructure.configuration.domain.ConfigurationDomainService;
import org.apache.fineract.infrastructure.core.api.JsonQuery;
import org.apache.fineract.infrastructure.core.data.EnumOptionData;
@@ -40,11 +41,9 @@ import
org.apache.fineract.portfolio.savings.domain.DepositAccountAssembler;
import org.apache.fineract.portfolio.savings.domain.FixedDepositAccount;
import org.apache.fineract.portfolio.savings.domain.RecurringDepositAccount;
import org.apache.fineract.portfolio.savings.domain.SavingsAccount;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
-@Service
+@RequiredArgsConstructor
public class DepositAccountPreMatureCalculationPlatformServiceImpl implements
DepositAccountPreMatureCalculationPlatformService {
private final FromJsonHelper fromJsonHelper;
@@ -54,21 +53,6 @@ public class
DepositAccountPreMatureCalculationPlatformServiceImpl implements De
private final ConfigurationDomainService configurationDomainService;
private final PaymentTypeReadPlatformService
paymentTypeReadPlatformService;
- @Autowired
- public DepositAccountPreMatureCalculationPlatformServiceImpl(final
FromJsonHelper fromJsonHelper,
- final DepositAccountTransactionDataValidator
depositAccountTransactionDataValidator,
- final DepositAccountAssembler depositAccountAssembler,
- final SavingsAccountReadPlatformService
savingsAccountReadPlatformService,
- final ConfigurationDomainService configurationDomainService,
PaymentTypeReadPlatformService paymentTypeReadPlatformService) {
- this.fromJsonHelper = fromJsonHelper;
- this.depositAccountTransactionDataValidator =
depositAccountTransactionDataValidator;
- this.depositAccountAssembler = depositAccountAssembler;
- this.savingsAccountReadPlatformService =
savingsAccountReadPlatformService;
- this.configurationDomainService = configurationDomainService;
- this.paymentTypeReadPlatformService = paymentTypeReadPlatformService;
-
- }
-
@Transactional
@Override
public DepositAccountData calculatePreMatureAmount(final Long accountId,
final JsonQuery query,
diff --git
a/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/service/DepositAccountReadPlatformServiceImpl.java
b/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/service/DepositAccountReadPlatformServiceImpl.java
index 693560685..3389a0153 100644
---
a/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/service/DepositAccountReadPlatformServiceImpl.java
+++
b/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/service/DepositAccountReadPlatformServiceImpl.java
@@ -31,6 +31,7 @@ import java.util.Collection;
import java.util.HashSet;
import java.util.Map;
import java.util.Set;
+import lombok.RequiredArgsConstructor;
import org.apache.fineract.infrastructure.core.data.EnumOptionData;
import org.apache.fineract.infrastructure.core.data.PaginationParameters;
import
org.apache.fineract.infrastructure.core.data.PaginationParametersDataValidator;
@@ -92,14 +93,13 @@ import
org.apache.fineract.portfolio.savings.domain.SavingsAccountStatusType;
import
org.apache.fineract.portfolio.savings.exception.DepositAccountNotFoundException;
import org.apache.fineract.portfolio.tax.data.TaxGroupData;
import org.apache.fineract.useradministration.domain.AppUser;
-import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.dao.EmptyResultDataAccessException;
import org.springframework.jdbc.core.JdbcTemplate;
import org.springframework.jdbc.core.RowMapper;
-import org.springframework.stereotype.Service;
import org.springframework.util.CollectionUtils;
-@Service
+@RequiredArgsConstructor
+
public class DepositAccountReadPlatformServiceImpl implements
DepositAccountReadPlatformService {
private static final FixedDepositAccountMapper
FIXED_DEPOSIT_ACCOUNT_MAPPER = new FixedDepositAccountMapper();
@@ -116,7 +116,7 @@ public class DepositAccountReadPlatformServiceImpl
implements DepositAccountRead
private final PaginationParametersDataValidator
paginationParametersDataValidator;
private final DatabaseSpecificSQLGenerator sqlGenerator;
private final PaginationHelper paginationHelper;
- private final SavingsAccountTransactionsMapper transactionsMapper;
+ private final SavingsAccountTransactionsMapper transactionsMapper = new
SavingsAccountTransactionsMapper();
private final ClientReadPlatformService clientReadPlatformService;
private final GroupReadPlatformService groupReadPlatformService;
private final DepositProductReadPlatformService
depositProductReadPlatformService;
@@ -125,47 +125,11 @@ public class DepositAccountReadPlatformServiceImpl
implements DepositAccountRead
private final StaffReadPlatformService staffReadPlatformService;
private final DepositsDropdownReadPlatformService
depositsDropdownReadPlatformService;
private final SavingsAccountReadPlatformService
savingsAccountReadPlatformService;
- private final RecurringAccountDepositTransactionTemplateMapper
rdTransactionTemplateMapper;
+ private final RecurringAccountDepositTransactionTemplateMapper
rdTransactionTemplateMapper = new
RecurringAccountDepositTransactionTemplateMapper();
private final DropdownReadPlatformService dropdownReadPlatformService;
private final CalendarReadPlatformService calendarReadPlatformService;
private final PaymentTypeReadPlatformService
paymentTypeReadPlatformService;
- @Autowired
- public DepositAccountReadPlatformServiceImpl(final PlatformSecurityContext
context, final JdbcTemplate jdbcTemplate,
- final DepositAccountInterestRateChartReadPlatformService
chartReadPlatformService,
- final PaginationParametersDataValidator
paginationParametersDataValidator,
- final ClientReadPlatformService clientReadPlatformService, final
GroupReadPlatformService groupReadPlatformService,
- final DepositProductReadPlatformService
depositProductReadPlatformService,
- final SavingsDropdownReadPlatformService
savingsDropdownReadPlatformService,
- final ChargeReadPlatformService chargeReadPlatformService, final
StaffReadPlatformService staffReadPlatformService,
- final DepositsDropdownReadPlatformService
depositsDropdownReadPlatformService,
- final InterestRateChartReadPlatformService
productChartReadPlatformService,
- final SavingsAccountReadPlatformService
savingsAccountReadPlatformService,
- final DropdownReadPlatformService dropdownReadPlatformService,
final CalendarReadPlatformService calendarReadPlatformService,
- PaymentTypeReadPlatformService paymentTypeReadPlatformService,
DatabaseSpecificSQLGenerator sqlGenerator,
- PaginationHelper paginationHelper) {
- this.context = context;
- this.jdbcTemplate = jdbcTemplate;
- this.accountChartReadPlatformService = chartReadPlatformService;
- this.paginationParametersDataValidator =
paginationParametersDataValidator;
- this.sqlGenerator = sqlGenerator;
- this.transactionsMapper = new SavingsAccountTransactionsMapper();
- this.clientReadPlatformService = clientReadPlatformService;
- this.groupReadPlatformService = groupReadPlatformService;
- this.depositProductReadPlatformService =
depositProductReadPlatformService;
- this.savingsDropdownReadPlatformService =
savingsDropdownReadPlatformService;
- this.chargeReadPlatformService = chargeReadPlatformService;
- this.staffReadPlatformService = staffReadPlatformService;
- this.depositsDropdownReadPlatformService =
depositsDropdownReadPlatformService;
- this.productChartReadPlatformService = productChartReadPlatformService;
- this.savingsAccountReadPlatformService =
savingsAccountReadPlatformService;
- this.rdTransactionTemplateMapper = new
RecurringAccountDepositTransactionTemplateMapper();
- this.dropdownReadPlatformService = dropdownReadPlatformService;
- this.calendarReadPlatformService = calendarReadPlatformService;
- this.paymentTypeReadPlatformService = paymentTypeReadPlatformService;
- this.paginationHelper = paginationHelper;
- }
-
@Override
public Collection<DepositAccountData> retrieveAll(final DepositAccountType
depositAccountType,
final PaginationParameters paginationParameters) {
diff --git
a/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/service/DepositAccountWritePlatformServiceJpaRepositoryImpl.java
b/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/service/DepositAccountWritePlatformServiceJpaRepositoryImpl.java
index 0955355d2..aa78496c5 100644
---
a/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/service/DepositAccountWritePlatformServiceJpaRepositoryImpl.java
+++
b/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/service/DepositAccountWritePlatformServiceJpaRepositoryImpl.java
@@ -109,10 +109,8 @@ import
org.apache.fineract.portfolio.savings.exception.DepositAccountTransaction
import
org.apache.fineract.portfolio.savings.exception.SavingsAccountTransactionNotFoundException;
import
org.apache.fineract.portfolio.savings.exception.TransactionUpdateNotAllowedException;
import org.apache.fineract.useradministration.domain.AppUser;
-import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
-@Service
@Slf4j
@Transactional
@RequiredArgsConstructor
diff --git
a/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/service/DepositApplicationProcessWritePlatformServiceJpaRepositoryImpl.java
b/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/service/DepositApplicationProcessWritePlatformServiceJpaRepositoryImpl.java
index af393f0ac..fd7dc9faf 100644
---
a/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/service/DepositApplicationProcessWritePlatformServiceJpaRepositoryImpl.java
+++
b/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/service/DepositApplicationProcessWritePlatformServiceJpaRepositoryImpl.java
@@ -32,6 +32,8 @@ import java.util.LinkedHashMap;
import java.util.List;
import java.util.Map;
import java.util.Set;
+import lombok.RequiredArgsConstructor;
+import lombok.extern.slf4j.Slf4j;
import org.apache.commons.lang3.StringUtils;
import org.apache.commons.lang3.exception.ExceptionUtils;
import
org.apache.fineract.infrastructure.accountnumberformat.domain.AccountNumberFormat;
@@ -92,18 +94,13 @@ import
org.apache.fineract.portfolio.savings.domain.SavingsProduct;
import org.apache.fineract.portfolio.savings.domain.SavingsProductRepository;
import
org.apache.fineract.portfolio.savings.exception.SavingsProductNotFoundException;
import org.apache.fineract.useradministration.domain.AppUser;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.dao.DataAccessException;
-import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
-@Service
+@RequiredArgsConstructor
+@Slf4j
public class DepositApplicationProcessWritePlatformServiceJpaRepositoryImpl
implements DepositApplicationProcessWritePlatformService {
- private static final Logger LOG =
LoggerFactory.getLogger(DepositApplicationProcessWritePlatformServiceJpaRepositoryImpl.class);
-
private final PlatformSecurityContext context;
private final SavingsAccountRepositoryWrapper savingAccountRepository;
private final FixedDepositAccountRepository fixedDepositAccountRepository;
@@ -125,43 +122,6 @@ public class
DepositApplicationProcessWritePlatformServiceJpaRepositoryImpl impl
private final AccountNumberFormatRepositoryWrapper
accountNumberFormatRepository;
private final BusinessEventNotifierService businessEventNotifierService;
- @Autowired
- public
DepositApplicationProcessWritePlatformServiceJpaRepositoryImpl(final
PlatformSecurityContext context,
- final SavingsAccountRepositoryWrapper savingAccountRepository,
final DepositAccountAssembler depositAccountAssembler,
- final DepositAccountDataValidator depositAccountDataValidator,
final AccountNumberGenerator accountNumberGenerator,
- final ClientRepositoryWrapper clientRepository, final
GroupRepository groupRepository,
- final SavingsProductRepository savingsProductRepository, final
NoteRepository noteRepository,
- final StaffRepositoryWrapper staffRepository,
- final SavingsAccountApplicationTransitionApiJsonValidator
savingsAccountApplicationTransitionApiJsonValidator,
- final SavingsAccountChargeAssembler savingsAccountChargeAssembler,
- final FixedDepositAccountRepository fixedDepositAccountRepository,
- final RecurringDepositAccountRepository
recurringDepositAccountRepository,
- final AccountAssociationsRepository accountAssociationsRepository,
final FromJsonHelper fromJsonHelper,
- final CalendarInstanceRepository calendarInstanceRepository, final
ConfigurationDomainService configurationDomainService,
- final AccountNumberFormatRepositoryWrapper
accountNumberFormatRepository,
- final BusinessEventNotifierService businessEventNotifierService) {
- this.context = context;
- this.savingAccountRepository = savingAccountRepository;
- this.depositAccountAssembler = depositAccountAssembler;
- this.accountNumberGenerator = accountNumberGenerator;
- this.depositAccountDataValidator = depositAccountDataValidator;
- this.clientRepository = clientRepository;
- this.groupRepository = groupRepository;
- this.savingsProductRepository = savingsProductRepository;
- this.noteRepository = noteRepository;
- this.staffRepository = staffRepository;
- this.savingsAccountApplicationTransitionApiJsonValidator =
savingsAccountApplicationTransitionApiJsonValidator;
- this.savingsAccountChargeAssembler = savingsAccountChargeAssembler;
- this.fixedDepositAccountRepository = fixedDepositAccountRepository;
- this.recurringDepositAccountRepository =
recurringDepositAccountRepository;
- this.accountAssociationsRepository = accountAssociationsRepository;
- this.fromJsonHelper = fromJsonHelper;
- this.calendarInstanceRepository = calendarInstanceRepository;
- this.configurationDomainService = configurationDomainService;
- this.accountNumberFormatRepository = accountNumberFormatRepository;
- this.businessEventNotifierService = businessEventNotifierService;
- }
-
/*
* Guaranteed to throw an exception no matter what the data integrity
issue is.
*/
@@ -184,7 +144,7 @@ public class
DepositApplicationProcessWritePlatformServiceJpaRepositoryImpl impl
}
errorCodeBuilder.append(".unknown.data.integrity.issue");
- LOG.error("Error occured.", dve);
+ log.error("Error occured.", dve);
throw new PlatformDataIntegrityException(errorCodeBuilder.toString(),
"Unknown data integrity issue with savings account.");
}
diff --git
a/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/service/DepositProductReadPlatformServiceImpl.java
b/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/service/DepositProductReadPlatformServiceImpl.java
index efb75399f..e51c5fdd9 100644
---
a/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/service/DepositProductReadPlatformServiceImpl.java
+++
b/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/service/DepositProductReadPlatformServiceImpl.java
@@ -22,6 +22,7 @@ import java.math.BigDecimal;
import java.sql.ResultSet;
import java.sql.SQLException;
import java.util.Collection;
+import lombok.RequiredArgsConstructor;
import org.apache.fineract.accounting.common.AccountingEnumerations;
import org.apache.fineract.infrastructure.core.data.EnumOptionData;
import org.apache.fineract.infrastructure.core.domain.JdbcSupport;
@@ -35,13 +36,11 @@ import
org.apache.fineract.portfolio.savings.data.FixedDepositProductData;
import org.apache.fineract.portfolio.savings.data.RecurringDepositProductData;
import
org.apache.fineract.portfolio.savings.exception.FixedDepositProductNotFoundException;
import org.apache.fineract.portfolio.tax.data.TaxGroupData;
-import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.dao.EmptyResultDataAccessException;
import org.springframework.jdbc.core.JdbcTemplate;
import org.springframework.jdbc.core.RowMapper;
-import org.springframework.stereotype.Service;
-@Service
+@RequiredArgsConstructor
public class DepositProductReadPlatformServiceImpl implements
DepositProductReadPlatformService {
private static final FixedDepositProductMapper
FIXED_DEPOSIT_PRODUCT_MAPPER = new FixedDepositProductMapper();
@@ -51,14 +50,6 @@ public class DepositProductReadPlatformServiceImpl
implements DepositProductRead
private final JdbcTemplate jdbcTemplate;
private final InterestRateChartReadPlatformService
chartReadPlatformService;
- @Autowired
- public DepositProductReadPlatformServiceImpl(final PlatformSecurityContext
context, final JdbcTemplate jdbcTemplate,
- final InterestRateChartReadPlatformService
chartReadPlatformService) {
- this.context = context;
- this.jdbcTemplate = jdbcTemplate;
- this.chartReadPlatformService = chartReadPlatformService;
- }
-
@Override
public Collection<DepositProductData> retrieveAll(final DepositAccountType
depositAccountType) {
diff --git
a/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/service/DepositsDropdownReadPlatformServiceImpl.java
b/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/service/DepositsDropdownReadPlatformServiceImpl.java
index c14f05d98..1e0211b2d 100644
---
a/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/service/DepositsDropdownReadPlatformServiceImpl.java
+++
b/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/service/DepositsDropdownReadPlatformServiceImpl.java
@@ -20,12 +20,12 @@ package org.apache.fineract.portfolio.savings.service;
import java.util.Arrays;
import java.util.Collection;
+import lombok.NoArgsConstructor;
import org.apache.fineract.infrastructure.core.data.EnumOptionData;
import org.apache.fineract.portfolio.savings.DepositAccountOnClosureType;
import org.apache.fineract.portfolio.savings.PreClosurePenalInterestOnType;
-import org.springframework.stereotype.Service;
-@Service
+@NoArgsConstructor
public class DepositsDropdownReadPlatformServiceImpl implements
DepositsDropdownReadPlatformService {
@Override
diff --git
a/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/service/FixedDepositProductWritePlatformServiceJpaRepositoryImpl.java
b/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/service/FixedDepositProductWritePlatformServiceJpaRepositoryImpl.java
index bc7fd7e97..c7bbd1307 100644
---
a/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/service/FixedDepositProductWritePlatformServiceJpaRepositoryImpl.java
+++
b/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/service/FixedDepositProductWritePlatformServiceJpaRepositoryImpl.java
@@ -28,6 +28,8 @@ import java.util.ArrayList;
import java.util.List;
import java.util.Map;
import java.util.Set;
+import lombok.RequiredArgsConstructor;
+import lombok.extern.slf4j.Slf4j;
import org.apache.commons.lang3.exception.ExceptionUtils;
import
org.apache.fineract.accounting.producttoaccountmapping.service.ProductToGLAccountMappingWritePlatformService;
import org.apache.fineract.infrastructure.core.api.JsonCommand;
@@ -47,17 +49,13 @@ import
org.apache.fineract.portfolio.savings.domain.FixedDepositProduct;
import
org.apache.fineract.portfolio.savings.domain.FixedDepositProductRepository;
import
org.apache.fineract.portfolio.savings.exception.FixedDepositProductNotFoundException;
import org.apache.fineract.portfolio.tax.domain.TaxGroup;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.dao.DataAccessException;
-import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
-@Service
+@Slf4j
+@RequiredArgsConstructor
public class FixedDepositProductWritePlatformServiceJpaRepositoryImpl
implements FixedDepositProductWritePlatformService {
- private static final Logger LOG =
LoggerFactory.getLogger(FixedDepositProductWritePlatformServiceJpaRepositoryImpl.class);
private final PlatformSecurityContext context;
private final FixedDepositProductRepository fixedDepositProductRepository;
private final DepositProductDataValidator fromApiJsonDataValidator;
@@ -65,21 +63,6 @@ public class
FixedDepositProductWritePlatformServiceJpaRepositoryImpl implements
private final ProductToGLAccountMappingWritePlatformService
accountMappingWritePlatformService;
private final InterestRateChartAssembler chartAssembler;
- @Autowired
- public FixedDepositProductWritePlatformServiceJpaRepositoryImpl(final
PlatformSecurityContext context,
- final FixedDepositProductRepository fixedDepositProductRepository,
final DepositProductDataValidator fromApiJsonDataValidator,
- final DepositProductAssembler depositProductAssembler,
- final ProductToGLAccountMappingWritePlatformService
accountMappingWritePlatformService,
- final InterestRateChartAssembler chartAssembler) {
- this.context = context;
- this.fixedDepositProductRepository = fixedDepositProductRepository;
- this.fromApiJsonDataValidator = fromApiJsonDataValidator;
- this.depositProductAssembler = depositProductAssembler;
-
- this.accountMappingWritePlatformService =
accountMappingWritePlatformService;
- this.chartAssembler = chartAssembler;
- }
-
@Transactional
@Override
public CommandProcessingResult create(final JsonCommand command) {
@@ -206,6 +189,6 @@ public class
FixedDepositProductWritePlatformServiceJpaRepositoryImpl implements
}
private void logAsErrorUnexpectedDataIntegrityException(final Exception
dae) {
- LOG.error("Error occured.", dae);
+ log.error("Error occured.", dae);
}
}
diff --git
a/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/service/GSIMReadPlatformServiceImpl.java
b/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/service/GSIMReadPlatformServiceImpl.java
index 25a04341a..dbb113815 100644
---
a/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/service/GSIMReadPlatformServiceImpl.java
+++
b/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/service/GSIMReadPlatformServiceImpl.java
@@ -27,6 +27,7 @@ import java.time.LocalDate;
import java.util.ArrayList;
import java.util.Collection;
import java.util.List;
+import lombok.RequiredArgsConstructor;
import org.apache.fineract.infrastructure.core.data.EnumOptionData;
import org.apache.fineract.infrastructure.core.domain.JdbcSupport;
import
org.apache.fineract.infrastructure.security.service.PlatformSecurityContext;
@@ -41,27 +42,16 @@ import
org.apache.fineract.portfolio.savings.data.SavingsAccountApplicationTimel
import org.apache.fineract.portfolio.savings.data.SavingsAccountStatusEnumData;
import
org.apache.fineract.portfolio.savings.data.SavingsAccountSubStatusEnumData;
import org.apache.fineract.portfolio.savings.domain.SavingsAccountStatusType;
-import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.jdbc.core.JdbcTemplate;
import org.springframework.jdbc.core.RowMapper;
-import org.springframework.stereotype.Service;
-@Service
+@RequiredArgsConstructor
public class GSIMReadPlatformServiceImpl implements GSIMReadPlatformService {
private final JdbcTemplate jdbcTemplate;
private final PlatformSecurityContext context;
private final ColumnValidator columnValidator;
- @Autowired
- public GSIMReadPlatformServiceImpl(final PlatformSecurityContext context,
final JdbcTemplate jdbcTemplate,
- final ColumnValidator columnValidator) {
- this.context = context;
- this.jdbcTemplate = jdbcTemplate;
- this.columnValidator = columnValidator;
-
- }
-
private static final class GSIMFieldsMapper implements
RowMapper<GroupSavingsIndividualMonitoringAccountData> {
public String schema() {
diff --git
a/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/service/GroupSavingsIndividualMonitoringWritePlatformServiceImpl.java
b/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/service/GroupSavingsIndividualMonitoringWritePlatformServiceImpl.java
index a3bfd19c9..5be559bc4 100644
---
a/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/service/GroupSavingsIndividualMonitoringWritePlatformServiceImpl.java
+++
b/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/service/GroupSavingsIndividualMonitoringWritePlatformServiceImpl.java
@@ -19,16 +19,15 @@
package org.apache.fineract.portfolio.savings.service;
import java.math.BigDecimal;
+import lombok.RequiredArgsConstructor;
import
org.apache.fineract.infrastructure.security.service.PlatformSecurityContext;
import org.apache.fineract.portfolio.group.domain.Group;
import org.apache.fineract.portfolio.loanaccount.domain.LoanRepository;
import org.apache.fineract.portfolio.savings.domain.GSIMRepositoy;
import
org.apache.fineract.portfolio.savings.domain.GroupSavingsIndividualMonitoring;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
-@Service
+@RequiredArgsConstructor
@Transactional
public class GroupSavingsIndividualMonitoringWritePlatformServiceImpl
implements GroupSavingsIndividualMonitoringWritePlatformService {
@@ -38,14 +37,6 @@ public class
GroupSavingsIndividualMonitoringWritePlatformServiceImpl implements
private final LoanRepository loanRepository;
- @Autowired
- public GroupSavingsIndividualMonitoringWritePlatformServiceImpl(final
PlatformSecurityContext context,
- final GSIMRepositoy gsimAccountRepository, final LoanRepository
loanRepository) {
- this.context = context;
- this.gsimAccountRepository = gsimAccountRepository;
- this.loanRepository = loanRepository;
- }
-
@Override
public GroupSavingsIndividualMonitoring addGSIMAccountInfo(String
accountNumber, Group group, BigDecimal parentDeposit,
Long childAccountsCount, Boolean isAcceptingChild, Integer
loanStatus, BigDecimal applicationId) {
diff --git
a/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/service/RecurringDepositProductWritePlatformServiceJpaRepositoryImpl.java
b/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/service/RecurringDepositProductWritePlatformServiceJpaRepositoryImpl.java
index 798b20263..17474c0cf 100644
---
a/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/service/RecurringDepositProductWritePlatformServiceJpaRepositoryImpl.java
+++
b/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/service/RecurringDepositProductWritePlatformServiceJpaRepositoryImpl.java
@@ -28,6 +28,8 @@ import java.util.ArrayList;
import java.util.List;
import java.util.Map;
import java.util.Set;
+import lombok.RequiredArgsConstructor;
+import lombok.extern.slf4j.Slf4j;
import org.apache.commons.lang3.exception.ExceptionUtils;
import
org.apache.fineract.accounting.producttoaccountmapping.service.ProductToGLAccountMappingWritePlatformService;
import org.apache.fineract.infrastructure.core.api.JsonCommand;
@@ -47,17 +49,13 @@ import
org.apache.fineract.portfolio.savings.domain.RecurringDepositProduct;
import
org.apache.fineract.portfolio.savings.domain.RecurringDepositProductRepository;
import
org.apache.fineract.portfolio.savings.exception.RecurringDepositProductNotFoundException;
import org.apache.fineract.portfolio.tax.domain.TaxGroup;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.dao.DataAccessException;
-import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
-@Service
+@Slf4j
+@RequiredArgsConstructor
public class RecurringDepositProductWritePlatformServiceJpaRepositoryImpl
implements RecurringDepositProductWritePlatformService {
- private static final Logger LOG =
LoggerFactory.getLogger(RecurringDepositProductWritePlatformServiceJpaRepositoryImpl.class);
private final PlatformSecurityContext context;
private final RecurringDepositProductRepository
recurringDepositProductRepository;
private final DepositProductDataValidator fromApiJsonDataValidator;
@@ -65,21 +63,6 @@ public class
RecurringDepositProductWritePlatformServiceJpaRepositoryImpl implem
private final ProductToGLAccountMappingWritePlatformService
accountMappingWritePlatformService;
private final InterestRateChartAssembler chartAssembler;
- @Autowired
- public RecurringDepositProductWritePlatformServiceJpaRepositoryImpl(final
PlatformSecurityContext context,
- final RecurringDepositProductRepository
recurringDepositProductRepository,
- final DepositProductDataValidator fromApiJsonDataValidator, final
DepositProductAssembler depositProductAssembler,
- final ProductToGLAccountMappingWritePlatformService
accountMappingWritePlatformService,
- final InterestRateChartAssembler chartAssembler) {
- this.context = context;
- this.recurringDepositProductRepository =
recurringDepositProductRepository;
- this.fromApiJsonDataValidator = fromApiJsonDataValidator;
- this.depositProductAssembler = depositProductAssembler;
-
- this.accountMappingWritePlatformService =
accountMappingWritePlatformService;
- this.chartAssembler = chartAssembler;
- }
-
@Transactional
@Override
public CommandProcessingResult create(final JsonCommand command) {
@@ -206,6 +189,6 @@ public class
RecurringDepositProductWritePlatformServiceJpaRepositoryImpl implem
}
private void logAsErrorUnexpectedDataIntegrityException(final Exception
dae) {
- LOG.error("Error occured.", dae);
+ log.error("Error occured.", dae);
}
}
diff --git
a/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/service/SavingsAccountApplicationTransitionApiJsonValidator.java
b/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/service/SavingsAccountApplicationTransitionApiJsonValidator.java
index a474de636..daa0b2fd1 100644
---
a/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/service/SavingsAccountApplicationTransitionApiJsonValidator.java
+++
b/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/service/SavingsAccountApplicationTransitionApiJsonValidator.java
@@ -28,25 +28,19 @@ import java.util.HashSet;
import java.util.List;
import java.util.Map;
import java.util.Set;
+import lombok.RequiredArgsConstructor;
import org.apache.commons.lang3.StringUtils;
import org.apache.fineract.infrastructure.core.data.ApiParameterError;
import org.apache.fineract.infrastructure.core.data.DataValidatorBuilder;
import org.apache.fineract.infrastructure.core.exception.InvalidJsonException;
import
org.apache.fineract.infrastructure.core.exception.PlatformApiDataValidationException;
import org.apache.fineract.infrastructure.core.serialization.FromJsonHelper;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.stereotype.Component;
-@Component
+@RequiredArgsConstructor
public final class SavingsAccountApplicationTransitionApiJsonValidator {
private final FromJsonHelper fromApiJsonHelper;
- @Autowired
- public SavingsAccountApplicationTransitionApiJsonValidator(final
FromJsonHelper fromApiJsonHelper) {
- this.fromApiJsonHelper = fromApiJsonHelper;
- }
-
private void throwExceptionIfValidationWarningsExist(final
List<ApiParameterError> dataValidationErrors) {
if (!dataValidationErrors.isEmpty()) {
throw new PlatformApiDataValidationException(dataValidationErrors);
diff --git
a/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/service/SavingsAccountChargeReadPlatformServiceImpl.java
b/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/service/SavingsAccountChargeReadPlatformServiceImpl.java
index 7bb15e9ec..cae4b15d0 100644
---
a/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/service/SavingsAccountChargeReadPlatformServiceImpl.java
+++
b/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/service/SavingsAccountChargeReadPlatformServiceImpl.java
@@ -43,13 +43,10 @@ import
org.apache.fineract.portfolio.savings.data.SavingsAccountAnnualFeeData;
import org.apache.fineract.portfolio.savings.data.SavingsAccountChargeData;
import org.apache.fineract.portfolio.savings.domain.SavingsAccountStatusType;
import org.apache.fineract.portfolio.tax.data.TaxGroupData;
-import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.dao.EmptyResultDataAccessException;
import org.springframework.jdbc.core.JdbcTemplate;
import org.springframework.jdbc.core.RowMapper;
-import org.springframework.stereotype.Service;
-@Service
public class SavingsAccountChargeReadPlatformServiceImpl implements
SavingsAccountChargeReadPlatformService {
private final JdbcTemplate jdbcTemplate;
@@ -61,7 +58,6 @@ public class SavingsAccountChargeReadPlatformServiceImpl
implements SavingsAccou
// mappers
private final SavingsAccountChargeDueMapper chargeDueMapper;
- @Autowired
public SavingsAccountChargeReadPlatformServiceImpl(final
PlatformSecurityContext context,
final ChargeDropdownReadPlatformService
chargeDropdownReadPlatformService, final JdbcTemplate jdbcTemplate,
final DropdownReadPlatformService dropdownReadPlatformService,
DatabaseSpecificSQLGenerator sqlGenerator) {
diff --git
a/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/service/SavingsAccountInterestPostingServiceImpl.java
b/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/service/SavingsAccountInterestPostingServiceImpl.java
index a4c2a939e..59d7e04da 100644
---
a/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/service/SavingsAccountInterestPostingServiceImpl.java
+++
b/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/service/SavingsAccountInterestPostingServiceImpl.java
@@ -30,6 +30,7 @@ import java.util.List;
import java.util.Map;
import java.util.Set;
import java.util.stream.Collectors;
+import lombok.RequiredArgsConstructor;
import org.apache.fineract.infrastructure.core.domain.LocalDateInterval;
import org.apache.fineract.infrastructure.core.service.DateUtils;
import org.apache.fineract.organisation.monetary.domain.MonetaryCurrency;
@@ -47,19 +48,12 @@ import
org.apache.fineract.portfolio.savings.domain.SavingsHelper;
import org.apache.fineract.portfolio.savings.domain.interest.PostingPeriod;
import org.apache.fineract.portfolio.tax.data.TaxComponentData;
import org.apache.fineract.portfolio.tax.service.TaxUtils;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.stereotype.Service;
-@Service
+@RequiredArgsConstructor
public class SavingsAccountInterestPostingServiceImpl implements
SavingsAccountInterestPostingService {
private final SavingsHelper savingsHelper;
- @Autowired
- public SavingsAccountInterestPostingServiceImpl(final SavingsHelper
savingsHelper) {
- this.savingsHelper = savingsHelper;
- }
-
@Override
public SavingsAccountData postInterest(final MathContext mc, final
LocalDate interestPostingUpToDate, final boolean isInterestTransfer,
final boolean isSavingsInterestPostingAtCurrentPeriodEnd, final
Integer financialYearBeginningMonth,
diff --git
a/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/service/SavingsAccountReadPlatformServiceImpl.java
b/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/service/SavingsAccountReadPlatformServiceImpl.java
index a512ad8c5..e9c270b46 100644
---
a/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/service/SavingsAccountReadPlatformServiceImpl.java
+++
b/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/service/SavingsAccountReadPlatformServiceImpl.java
@@ -87,16 +87,13 @@ import
org.apache.fineract.portfolio.tax.data.TaxComponentData;
import org.apache.fineract.portfolio.tax.data.TaxDetailsData;
import org.apache.fineract.portfolio.tax.data.TaxGroupData;
import org.apache.fineract.useradministration.domain.AppUser;
-import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.dao.DataAccessException;
import org.springframework.dao.EmptyResultDataAccessException;
import org.springframework.jdbc.core.JdbcTemplate;
import org.springframework.jdbc.core.ResultSetExtractor;
import org.springframework.jdbc.core.RowMapper;
-import org.springframework.stereotype.Service;
import org.springframework.util.CollectionUtils;
-@Service
public class SavingsAccountReadPlatformServiceImpl implements
SavingsAccountReadPlatformService {
private final PlatformSecurityContext context;
@@ -126,7 +123,6 @@ public class SavingsAccountReadPlatformServiceImpl
implements SavingsAccountRead
private final SavingsAccountRepositoryWrapper
savingsAccountRepositoryWrapper;
- @Autowired
public SavingsAccountReadPlatformServiceImpl(final PlatformSecurityContext
context, final JdbcTemplate jdbcTemplate,
final ClientReadPlatformService clientReadPlatformService, final
GroupReadPlatformService groupReadPlatformService,
final SavingsProductReadPlatformService
savingProductReadPlatformService,
diff --git
a/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/service/SavingsAccountWritePlatformServiceJpaRepositoryImpl.java
b/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/service/SavingsAccountWritePlatformServiceJpaRepositoryImpl.java
index f0bf3b186..2563c7547 100644
---
a/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/service/SavingsAccountWritePlatformServiceJpaRepositoryImpl.java
+++
b/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/service/SavingsAccountWritePlatformServiceJpaRepositoryImpl.java
@@ -131,13 +131,11 @@ import
org.apache.fineract.useradministration.domain.AppUserRepositoryWrapper;
import org.springframework.data.domain.PageRequest;
import org.springframework.data.domain.Pageable;
import org.springframework.data.domain.Sort;
-import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import org.springframework.util.CollectionUtils;
@Slf4j
@RequiredArgsConstructor
-@Service
public class SavingsAccountWritePlatformServiceJpaRepositoryImpl implements
SavingsAccountWritePlatformService {
private final PlatformSecurityContext context;
diff --git
a/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/service/SavingsApplicationProcessWritePlatformServiceJpaRepositoryImpl.java
b/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/service/SavingsApplicationProcessWritePlatformServiceJpaRepositoryImpl.java
index 89d4d07e8..7e215f0f9 100644
---
a/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/service/SavingsApplicationProcessWritePlatformServiceJpaRepositoryImpl.java
+++
b/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/service/SavingsApplicationProcessWritePlatformServiceJpaRepositoryImpl.java
@@ -87,10 +87,8 @@ import
org.apache.fineract.portfolio.savings.domain.SavingsProductRepository;
import
org.apache.fineract.portfolio.savings.exception.SavingsProductNotFoundException;
import org.apache.fineract.useradministration.domain.AppUser;
import org.springframework.dao.DataAccessException;
-import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
-@Service
@Slf4j
@RequiredArgsConstructor
public class SavingsApplicationProcessWritePlatformServiceJpaRepositoryImpl
implements SavingsApplicationProcessWritePlatformService {
diff --git
a/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/service/SavingsDropdownReadPlatformServiceImpl.java
b/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/service/SavingsDropdownReadPlatformServiceImpl.java
index ef141961c..aa201de80 100644
---
a/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/service/SavingsDropdownReadPlatformServiceImpl.java
+++
b/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/service/SavingsDropdownReadPlatformServiceImpl.java
@@ -21,6 +21,7 @@ package org.apache.fineract.portfolio.savings.service;
import java.util.Arrays;
import java.util.Collection;
import java.util.List;
+import lombok.NoArgsConstructor;
import org.apache.fineract.infrastructure.core.data.EnumOptionData;
import
org.apache.fineract.portfolio.savings.SavingsCompoundingInterestPeriodType;
import
org.apache.fineract.portfolio.savings.SavingsInterestCalculationDaysInYearType;
@@ -28,9 +29,8 @@ import
org.apache.fineract.portfolio.savings.SavingsInterestCalculationType;
import org.apache.fineract.portfolio.savings.SavingsPeriodFrequencyType;
import org.apache.fineract.portfolio.savings.SavingsPostingInterestPeriodType;
import org.apache.fineract.portfolio.savings.SavingsWithdrawalFeesType;
-import org.springframework.stereotype.Service;
-@Service
+@NoArgsConstructor
public class SavingsDropdownReadPlatformServiceImpl implements
SavingsDropdownReadPlatformService {
@Override
diff --git
a/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/service/SavingsProductReadPlatformServiceImpl.java
b/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/service/SavingsProductReadPlatformServiceImpl.java
index cb96f69de..9c3e18d78 100644
---
a/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/service/SavingsProductReadPlatformServiceImpl.java
+++
b/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/service/SavingsProductReadPlatformServiceImpl.java
@@ -37,9 +37,7 @@ import org.apache.fineract.portfolio.tax.data.TaxGroupData;
import org.springframework.dao.EmptyResultDataAccessException;
import org.springframework.jdbc.core.JdbcTemplate;
import org.springframework.jdbc.core.RowMapper;
-import org.springframework.stereotype.Service;
-@Service
@RequiredArgsConstructor
public class SavingsProductReadPlatformServiceImpl implements
SavingsProductReadPlatformService {
diff --git
a/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/service/SavingsProductWritePlatformServiceJpaRepositoryImpl.java
b/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/service/SavingsProductWritePlatformServiceJpaRepositoryImpl.java
index 56b429e40..ad4e27156 100644
---
a/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/service/SavingsProductWritePlatformServiceJpaRepositoryImpl.java
+++
b/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/service/SavingsProductWritePlatformServiceJpaRepositoryImpl.java
@@ -28,6 +28,8 @@ import java.util.ArrayList;
import java.util.List;
import java.util.Map;
import java.util.Set;
+import lombok.RequiredArgsConstructor;
+import lombok.extern.slf4j.Slf4j;
import org.apache.commons.lang3.exception.ExceptionUtils;
import
org.apache.fineract.accounting.producttoaccountmapping.service.ProductToGLAccountMappingWritePlatformService;
import org.apache.fineract.infrastructure.core.api.JsonCommand;
@@ -48,17 +50,13 @@ import
org.apache.fineract.portfolio.savings.domain.SavingsProductAssembler;
import org.apache.fineract.portfolio.savings.domain.SavingsProductRepository;
import
org.apache.fineract.portfolio.savings.exception.SavingsProductNotFoundException;
import org.apache.fineract.portfolio.tax.domain.TaxGroup;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.dao.DataAccessException;
-import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
-@Service
+@Slf4j
+@RequiredArgsConstructor
public class SavingsProductWritePlatformServiceJpaRepositoryImpl implements
SavingsProductWritePlatformService {
- private static final Logger LOG =
LoggerFactory.getLogger(SavingsProductWritePlatformServiceJpaRepositoryImpl.class);
private final PlatformSecurityContext context;
private final SavingsProductRepository savingProductRepository;
private final SavingsProductDataValidator fromApiJsonDataValidator;
@@ -66,20 +64,6 @@ public class
SavingsProductWritePlatformServiceJpaRepositoryImpl implements Savi
private final ProductToGLAccountMappingWritePlatformService
accountMappingWritePlatformService;
private final FineractEntityAccessUtil fineractEntityAccessUtil;
- @Autowired
- public SavingsProductWritePlatformServiceJpaRepositoryImpl(final
PlatformSecurityContext context,
- final SavingsProductRepository savingProductRepository, final
SavingsProductDataValidator fromApiJsonDataValidator,
- final SavingsProductAssembler savingsProductAssembler,
- final ProductToGLAccountMappingWritePlatformService
accountMappingWritePlatformService,
- final FineractEntityAccessUtil fineractEntityAccessUtil) {
- this.context = context;
- this.savingProductRepository = savingProductRepository;
- this.fromApiJsonDataValidator = fromApiJsonDataValidator;
- this.savingsProductAssembler = savingsProductAssembler;
- this.accountMappingWritePlatformService =
accountMappingWritePlatformService;
- this.fineractEntityAccessUtil = fineractEntityAccessUtil;
- }
-
/*
* Guaranteed to throw an exception no matter what the data integrity
issue is.
*/
@@ -103,7 +87,7 @@ public class
SavingsProductWritePlatformServiceJpaRepositoryImpl implements Savi
}
private void logAsErrorUnexpectedDataIntegrityException(final Exception
dae) {
- LOG.error("Error occured.", dae);
+ log.error("Error occured.", dae);
}
@Transactional
diff --git
a/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/service/SavingsSchedularInterestPoster.java
b/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/service/SavingsSchedularInterestPoster.java
index a3eda8f47..3a24de735 100644
---
a/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/service/SavingsSchedularInterestPoster.java
+++
b/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/service/SavingsSchedularInterestPoster.java
@@ -41,18 +41,14 @@ import
org.apache.fineract.infrastructure.security.service.PlatformSecurityConte
import org.apache.fineract.portfolio.savings.data.SavingsAccountData;
import org.apache.fineract.portfolio.savings.data.SavingsAccountSummaryData;
import
org.apache.fineract.portfolio.savings.data.SavingsAccountTransactionData;
-import org.springframework.context.annotation.Scope;
import org.springframework.dao.DataAccessException;
import org.springframework.jdbc.core.JdbcTemplate;
-import org.springframework.stereotype.Component;
import org.springframework.transaction.annotation.Isolation;
import org.springframework.transaction.annotation.Transactional;
@Slf4j
@RequiredArgsConstructor
@Setter
-@Component
-@Scope("prototype")
public class SavingsSchedularInterestPoster {
private static final String SAVINGS_TRANSACTION_IDENTIFIER = "S";
diff --git
a/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/service/SavingsSchedularInterestPosterTask.java
b/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/service/SavingsSchedularInterestPosterTask.java
index bf5f2c899..3ebda9bed 100644
---
a/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/service/SavingsSchedularInterestPosterTask.java
+++
b/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/service/SavingsSchedularInterestPosterTask.java
@@ -26,8 +26,6 @@ import lombok.extern.slf4j.Slf4j;
import org.apache.fineract.infrastructure.core.domain.FineractContext;
import org.apache.fineract.infrastructure.core.service.ThreadLocalContextUtil;
import org.apache.fineract.portfolio.savings.data.SavingsAccountData;
-import org.springframework.context.annotation.Scope;
-import org.springframework.stereotype.Component;
/**
* @author manoj
@@ -35,8 +33,6 @@ import org.springframework.stereotype.Component;
@Slf4j
@RequiredArgsConstructor
-@Component
-@Scope("prototype")
public class SavingsSchedularInterestPosterTask implements Callable<Void> {
private final SavingsSchedularInterestPoster interestPoster;
diff --git
a/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/service/search/SavingsAccountTransactionsSearchServiceImpl.java
b/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/service/search/SavingsAccountTransactionsSearchServiceImpl.java
index b307fd2fd..8b17c9605 100644
---
a/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/service/search/SavingsAccountTransactionsSearchServiceImpl.java
+++
b/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/service/search/SavingsAccountTransactionsSearchServiceImpl.java
@@ -57,10 +57,8 @@ import org.springframework.data.domain.Sort;
import org.springframework.data.support.PageableExecutionUtils;
import org.springframework.jdbc.core.JdbcTemplate;
import org.springframework.jdbc.support.rowset.SqlRowSet;
-import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
-@Service
@Transactional(readOnly = true)
@RequiredArgsConstructor
public class SavingsAccountTransactionsSearchServiceImpl implements
SavingsAccountTransactionSearchService {
diff --git
a/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/starter/SavingsConfiguration.java
b/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/starter/SavingsConfiguration.java
new file mode 100644
index 000000000..9e7b57570
--- /dev/null
+++
b/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/starter/SavingsConfiguration.java
@@ -0,0 +1,440 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.fineract.portfolio.savings.starter;
+
+import
org.apache.fineract.accounting.journalentry.service.JournalEntryWritePlatformService;
+import
org.apache.fineract.accounting.producttoaccountmapping.service.ProductToGLAccountMappingWritePlatformService;
+import org.apache.fineract.batch.exception.ErrorHandler;
+import org.apache.fineract.commands.service.CommandProcessingService;
+import
org.apache.fineract.infrastructure.accountnumberformat.domain.AccountNumberFormatRepositoryWrapper;
+import
org.apache.fineract.infrastructure.codes.service.CodeValueReadPlatformService;
+import
org.apache.fineract.infrastructure.configuration.domain.ConfigurationDomainService;
+import
org.apache.fineract.infrastructure.core.data.PaginationParametersDataValidator;
+import org.apache.fineract.infrastructure.core.serialization.FromJsonHelper;
+import org.apache.fineract.infrastructure.core.service.PaginationHelper;
+import
org.apache.fineract.infrastructure.core.service.database.DatabaseSpecificSQLGenerator;
+import org.apache.fineract.infrastructure.dataqueries.data.DataTableValidator;
+import
org.apache.fineract.infrastructure.dataqueries.service.EntityDatatableChecksReadService;
+import
org.apache.fineract.infrastructure.dataqueries.service.EntityDatatableChecksWritePlatformService;
+import
org.apache.fineract.infrastructure.dataqueries.service.GenericDataService;
+import
org.apache.fineract.infrastructure.dataqueries.service.ReadWriteNonCoreDataServiceImpl;
+import
org.apache.fineract.infrastructure.entityaccess.service.FineractEntityAccessUtil;
+import
org.apache.fineract.infrastructure.event.business.service.BusinessEventNotifierService;
+import
org.apache.fineract.infrastructure.security.service.PlatformSecurityContext;
+import org.apache.fineract.infrastructure.security.utils.ColumnValidator;
+import
org.apache.fineract.organisation.holiday.domain.HolidayRepositoryWrapper;
+import
org.apache.fineract.organisation.monetary.domain.ApplicationCurrencyRepositoryWrapper;
+import org.apache.fineract.organisation.staff.domain.StaffRepositoryWrapper;
+import org.apache.fineract.organisation.staff.service.StaffReadPlatformService;
+import
org.apache.fineract.organisation.workingdays.domain.WorkingDaysRepositoryWrapper;
+import
org.apache.fineract.portfolio.account.domain.AccountAssociationsRepository;
+import
org.apache.fineract.portfolio.account.domain.StandingInstructionRepository;
+import
org.apache.fineract.portfolio.account.service.AccountAssociationsReadPlatformService;
+import
org.apache.fineract.portfolio.account.service.AccountTransfersReadPlatformService;
+import
org.apache.fineract.portfolio.account.service.AccountTransfersWritePlatformService;
+import
org.apache.fineract.portfolio.calendar.domain.CalendarInstanceRepository;
+import
org.apache.fineract.portfolio.calendar.service.CalendarReadPlatformService;
+import org.apache.fineract.portfolio.charge.domain.ChargeRepositoryWrapper;
+import
org.apache.fineract.portfolio.charge.service.ChargeDropdownReadPlatformService;
+import org.apache.fineract.portfolio.charge.service.ChargeReadPlatformService;
+import org.apache.fineract.portfolio.client.domain.AccountNumberGenerator;
+import org.apache.fineract.portfolio.client.domain.ClientRepositoryWrapper;
+import org.apache.fineract.portfolio.client.service.ClientReadPlatformService;
+import
org.apache.fineract.portfolio.common.service.DropdownReadPlatformService;
+import org.apache.fineract.portfolio.group.domain.GroupRepository;
+import org.apache.fineract.portfolio.group.domain.GroupRepositoryWrapper;
+import org.apache.fineract.portfolio.group.service.GroupReadPlatformService;
+import
org.apache.fineract.portfolio.interestratechart.service.InterestIncentiveDropdownReadPlatformService;
+import
org.apache.fineract.portfolio.interestratechart.service.InterestRateChartAssembler;
+import
org.apache.fineract.portfolio.interestratechart.service.InterestRateChartDropdownReadPlatformService;
+import
org.apache.fineract.portfolio.interestratechart.service.InterestRateChartReadPlatformService;
+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.savings.data.DepositAccountDataValidator;
+import
org.apache.fineract.portfolio.savings.data.DepositAccountTransactionDataValidator;
+import org.apache.fineract.portfolio.savings.data.DepositProductDataValidator;
+import
org.apache.fineract.portfolio.savings.data.SavingsAccountChargeDataValidator;
+import org.apache.fineract.portfolio.savings.data.SavingsAccountDataValidator;
+import
org.apache.fineract.portfolio.savings.data.SavingsAccountTransactionDataValidator;
+import org.apache.fineract.portfolio.savings.data.SavingsProductDataValidator;
+import org.apache.fineract.portfolio.savings.domain.DepositAccountAssembler;
+import
org.apache.fineract.portfolio.savings.domain.DepositAccountDomainService;
+import
org.apache.fineract.portfolio.savings.domain.DepositAccountOnHoldTransactionRepository;
+import org.apache.fineract.portfolio.savings.domain.DepositProductAssembler;
+import
org.apache.fineract.portfolio.savings.domain.FixedDepositAccountRepository;
+import
org.apache.fineract.portfolio.savings.domain.FixedDepositProductRepository;
+import org.apache.fineract.portfolio.savings.domain.GSIMRepositoy;
+import
org.apache.fineract.portfolio.savings.domain.RecurringDepositAccountRepository;
+import
org.apache.fineract.portfolio.savings.domain.RecurringDepositProductRepository;
+import org.apache.fineract.portfolio.savings.domain.SavingsAccountAssembler;
+import
org.apache.fineract.portfolio.savings.domain.SavingsAccountChargeAssembler;
+import
org.apache.fineract.portfolio.savings.domain.SavingsAccountChargeRepositoryWrapper;
+import
org.apache.fineract.portfolio.savings.domain.SavingsAccountDomainService;
+import
org.apache.fineract.portfolio.savings.domain.SavingsAccountRepositoryWrapper;
+import
org.apache.fineract.portfolio.savings.domain.SavingsAccountTransactionRepository;
+import org.apache.fineract.portfolio.savings.domain.SavingsHelper;
+import org.apache.fineract.portfolio.savings.domain.SavingsProductAssembler;
+import org.apache.fineract.portfolio.savings.domain.SavingsProductRepository;
+import
org.apache.fineract.portfolio.savings.service.DepositAccountInterestRateChartReadPlatformService;
+import
org.apache.fineract.portfolio.savings.service.DepositAccountInterestRateChartReadPlatformServiceImpl;
+import
org.apache.fineract.portfolio.savings.service.DepositAccountOnHoldTransactionReadPlatformService;
+import
org.apache.fineract.portfolio.savings.service.DepositAccountOnHoldTransactionReadPlatformServiceImpl;
+import
org.apache.fineract.portfolio.savings.service.DepositAccountPreMatureCalculationPlatformService;
+import
org.apache.fineract.portfolio.savings.service.DepositAccountPreMatureCalculationPlatformServiceImpl;
+import
org.apache.fineract.portfolio.savings.service.DepositAccountReadPlatformService;
+import
org.apache.fineract.portfolio.savings.service.DepositAccountReadPlatformServiceImpl;
+import
org.apache.fineract.portfolio.savings.service.DepositAccountWritePlatformService;
+import
org.apache.fineract.portfolio.savings.service.DepositAccountWritePlatformServiceJpaRepositoryImpl;
+import
org.apache.fineract.portfolio.savings.service.DepositApplicationProcessWritePlatformService;
+import
org.apache.fineract.portfolio.savings.service.DepositApplicationProcessWritePlatformServiceJpaRepositoryImpl;
+import
org.apache.fineract.portfolio.savings.service.DepositProductReadPlatformService;
+import
org.apache.fineract.portfolio.savings.service.DepositProductReadPlatformServiceImpl;
+import
org.apache.fineract.portfolio.savings.service.DepositsDropdownReadPlatformService;
+import
org.apache.fineract.portfolio.savings.service.DepositsDropdownReadPlatformServiceImpl;
+import
org.apache.fineract.portfolio.savings.service.FixedDepositProductWritePlatformService;
+import
org.apache.fineract.portfolio.savings.service.FixedDepositProductWritePlatformServiceJpaRepositoryImpl;
+import org.apache.fineract.portfolio.savings.service.GSIMReadPlatformService;
+import
org.apache.fineract.portfolio.savings.service.GSIMReadPlatformServiceImpl;
+import
org.apache.fineract.portfolio.savings.service.GroupSavingsIndividualMonitoringWritePlatformService;
+import
org.apache.fineract.portfolio.savings.service.GroupSavingsIndividualMonitoringWritePlatformServiceImpl;
+import
org.apache.fineract.portfolio.savings.service.RecurringDepositProductWritePlatformService;
+import
org.apache.fineract.portfolio.savings.service.RecurringDepositProductWritePlatformServiceJpaRepositoryImpl;
+import
org.apache.fineract.portfolio.savings.service.SavingsAccountApplicationTransitionApiJsonValidator;
+import
org.apache.fineract.portfolio.savings.service.SavingsAccountChargeReadPlatformService;
+import
org.apache.fineract.portfolio.savings.service.SavingsAccountChargeReadPlatformServiceImpl;
+import
org.apache.fineract.portfolio.savings.service.SavingsAccountInterestPostingService;
+import
org.apache.fineract.portfolio.savings.service.SavingsAccountInterestPostingServiceImpl;
+import
org.apache.fineract.portfolio.savings.service.SavingsAccountReadPlatformService;
+import
org.apache.fineract.portfolio.savings.service.SavingsAccountReadPlatformServiceImpl;
+import
org.apache.fineract.portfolio.savings.service.SavingsAccountWritePlatformService;
+import
org.apache.fineract.portfolio.savings.service.SavingsAccountWritePlatformServiceJpaRepositoryImpl;
+import
org.apache.fineract.portfolio.savings.service.SavingsApplicationProcessWritePlatformService;
+import
org.apache.fineract.portfolio.savings.service.SavingsApplicationProcessWritePlatformServiceJpaRepositoryImpl;
+import
org.apache.fineract.portfolio.savings.service.SavingsDropdownReadPlatformService;
+import
org.apache.fineract.portfolio.savings.service.SavingsDropdownReadPlatformServiceImpl;
+import
org.apache.fineract.portfolio.savings.service.SavingsProductReadPlatformService;
+import
org.apache.fineract.portfolio.savings.service.SavingsProductReadPlatformServiceImpl;
+import
org.apache.fineract.portfolio.savings.service.SavingsProductWritePlatformService;
+import
org.apache.fineract.portfolio.savings.service.SavingsProductWritePlatformServiceJpaRepositoryImpl;
+import
org.apache.fineract.portfolio.savings.service.SavingsSchedularInterestPoster;
+import
org.apache.fineract.portfolio.savings.service.SavingsSchedularInterestPosterTask;
+import
org.apache.fineract.portfolio.savings.service.search.SavingsAccountTransactionSearchService;
+import
org.apache.fineract.portfolio.savings.service.search.SavingsAccountTransactionsSearchServiceImpl;
+import org.apache.fineract.useradministration.domain.AppUserRepositoryWrapper;
+import
org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean;
+import org.springframework.context.annotation.Bean;
+import org.springframework.context.annotation.Configuration;
+import org.springframework.context.annotation.Scope;
+import org.springframework.jdbc.core.JdbcTemplate;
+
+@Configuration
+public class SavingsConfiguration {
+
+ @Bean
+ @ConditionalOnMissingBean(SavingsAccountTransactionSearchService.class)
+ public SavingsAccountTransactionSearchService
savingsAccountTransactionSearchService(PlatformSecurityContext context,
+ GenericDataService genericDataService,
DatabaseSpecificSQLGenerator sqlGenerator,
+ ReadWriteNonCoreDataServiceImpl datatableService,
DataTableValidator dataTableValidator, JdbcTemplate jdbcTemplate) {
+ return new SavingsAccountTransactionsSearchServiceImpl(context,
genericDataService, sqlGenerator, datatableService,
+ dataTableValidator, jdbcTemplate);
+ }
+
+ @Bean
+ public
DepositAccountInterestRateChartReadPlatformServiceImpl.DepositAccountInterestRateChartExtractor
depositAccountInterestRateChartExtractor(
+ DatabaseSpecificSQLGenerator sqlGenerator) {
+ return new
DepositAccountInterestRateChartReadPlatformServiceImpl.DepositAccountInterestRateChartExtractor(sqlGenerator);
+ }
+
+ @Bean
+
@ConditionalOnMissingBean(DepositAccountInterestRateChartReadPlatformService.class)
+ public DepositAccountInterestRateChartReadPlatformService
depositAccountInterestRateChartReadPlatformService(
+ PlatformSecurityContext context, JdbcTemplate jdbcTemplate,
+
DepositAccountInterestRateChartReadPlatformServiceImpl.DepositAccountInterestRateChartExtractor
chartExtractor,
+ InterestRateChartDropdownReadPlatformService
chartDropdownReadPlatformService,
+ InterestIncentiveDropdownReadPlatformService
interestIncentiveDropdownReadPlatformService,
+ CodeValueReadPlatformService codeValueReadPlatformService) {
+ return new
DepositAccountInterestRateChartReadPlatformServiceImpl(context, jdbcTemplate,
chartExtractor,
+ chartDropdownReadPlatformService,
interestIncentiveDropdownReadPlatformService, codeValueReadPlatformService);
+ }
+
+ @Bean
+
@ConditionalOnMissingBean(DepositAccountOnHoldTransactionReadPlatformService.class)
+ public DepositAccountOnHoldTransactionReadPlatformService
depositAccountOnHoldTransactionReadPlatformService(JdbcTemplate jdbcTemplate,
+ ColumnValidator columnValidator, DatabaseSpecificSQLGenerator
sqlGenerator, PaginationHelper paginationHelper) {
+ return new
DepositAccountOnHoldTransactionReadPlatformServiceImpl(jdbcTemplate,
sqlGenerator, columnValidator, paginationHelper);
+ }
+
+ @Bean
+
@ConditionalOnMissingBean(DepositAccountPreMatureCalculationPlatformService.class)
+ public DepositAccountPreMatureCalculationPlatformService
depositAccountPreMatureCalculationPlatformService(
+ FromJsonHelper fromJsonHelper,
DepositAccountTransactionDataValidator depositAccountTransactionDataValidator,
+ DepositAccountAssembler depositAccountAssembler,
SavingsAccountReadPlatformService savingsAccountReadPlatformService,
+ ConfigurationDomainService configurationDomainService,
PaymentTypeReadPlatformService paymentTypeReadPlatformService) {
+ return new
DepositAccountPreMatureCalculationPlatformServiceImpl(fromJsonHelper,
depositAccountTransactionDataValidator,
+ depositAccountAssembler, savingsAccountReadPlatformService,
configurationDomainService, paymentTypeReadPlatformService);
+
+ }
+
+ @Bean
+ @ConditionalOnMissingBean(DepositAccountReadPlatformService.class)
+ public DepositAccountReadPlatformService
depositAccountReadPlatformService(PlatformSecurityContext context, JdbcTemplate
jdbcTemplate,
+ DepositAccountInterestRateChartReadPlatformService
chartReadPlatformService,
+ InterestRateChartReadPlatformService
productChartReadPlatformService,
+ PaginationParametersDataValidator
paginationParametersDataValidator, DatabaseSpecificSQLGenerator sqlGenerator,
+ PaginationHelper paginationHelper, ClientReadPlatformService
clientReadPlatformService,
+ GroupReadPlatformService groupReadPlatformService,
DepositProductReadPlatformService depositProductReadPlatformService,
+ SavingsDropdownReadPlatformService
savingsDropdownReadPlatformService, ChargeReadPlatformService
chargeReadPlatformService,
+ StaffReadPlatformService staffReadPlatformService,
DepositsDropdownReadPlatformService depositsDropdownReadPlatformService,
+ SavingsAccountReadPlatformService
savingsAccountReadPlatformService, DropdownReadPlatformService
dropdownReadPlatformService,
+ CalendarReadPlatformService calendarReadPlatformService,
PaymentTypeReadPlatformService paymentTypeReadPlatformService) {
+ return new DepositAccountReadPlatformServiceImpl(context,
jdbcTemplate, chartReadPlatformService, productChartReadPlatformService,
+ paginationParametersDataValidator, sqlGenerator,
paginationHelper, clientReadPlatformService, groupReadPlatformService,
+ depositProductReadPlatformService,
savingsDropdownReadPlatformService, chargeReadPlatformService,
staffReadPlatformService,
+ depositsDropdownReadPlatformService,
savingsAccountReadPlatformService, dropdownReadPlatformService,
+ calendarReadPlatformService, paymentTypeReadPlatformService);
+ }
+
+ @Bean
+ @ConditionalOnMissingBean(DepositAccountWritePlatformService.class)
+ public DepositAccountWritePlatformService
depositAccountWritePlatformService(PlatformSecurityContext context,
+ SavingsAccountRepositoryWrapper savingAccountRepositoryWrapper,
+ SavingsAccountTransactionRepository
savingsAccountTransactionRepository, DepositAccountAssembler
depositAccountAssembler,
+ DepositAccountTransactionDataValidator
depositAccountTransactionDataValidator,
+ SavingsAccountChargeDataValidator
savingsAccountChargeDataValidator,
+ PaymentDetailWritePlatformService
paymentDetailWritePlatformService,
+ ApplicationCurrencyRepositoryWrapper
applicationCurrencyRepositoryWrapper,
+ JournalEntryWritePlatformService journalEntryWritePlatformService,
DepositAccountDomainService depositAccountDomainService,
+ NoteRepository noteRepository, AccountTransfersReadPlatformService
accountTransfersReadPlatformService,
+ ChargeRepositoryWrapper chargeRepository,
SavingsAccountChargeRepositoryWrapper savingsAccountChargeRepository,
+ AccountAssociationsReadPlatformService
accountAssociationsReadPlatformService,
+ AccountTransfersWritePlatformService
accountTransfersWritePlatformService,
+ DepositAccountReadPlatformService
depositAccountReadPlatformService, CalendarInstanceRepository
calendarInstanceRepository,
+ ConfigurationDomainService configurationDomainService,
HolidayRepositoryWrapper holidayRepository,
+ WorkingDaysRepositoryWrapper workingDaysRepository,
+ DepositAccountOnHoldTransactionRepository
depositAccountOnHoldTransactionRepository
+
+ ) {
+ return new
DepositAccountWritePlatformServiceJpaRepositoryImpl(context,
savingAccountRepositoryWrapper,
+ savingsAccountTransactionRepository, depositAccountAssembler,
depositAccountTransactionDataValidator,
+ savingsAccountChargeDataValidator,
paymentDetailWritePlatformService, applicationCurrencyRepositoryWrapper,
+ journalEntryWritePlatformService, depositAccountDomainService,
noteRepository, accountTransfersReadPlatformService,
+ chargeRepository, savingsAccountChargeRepository,
accountAssociationsReadPlatformService,
+ accountTransfersWritePlatformService,
depositAccountReadPlatformService, calendarInstanceRepository,
+ configurationDomainService, holidayRepository,
workingDaysRepository, depositAccountOnHoldTransactionRepository);
+ }
+
+ @Bean
+
@ConditionalOnMissingBean(DepositApplicationProcessWritePlatformService.class)
+ public DepositApplicationProcessWritePlatformService
depositApplicationProcessWritePlatformService(PlatformSecurityContext context,
+ SavingsAccountRepositoryWrapper savingAccountRepository,
FixedDepositAccountRepository fixedDepositAccountRepository,
+ RecurringDepositAccountRepository
recurringDepositAccountRepository, DepositAccountAssembler
depositAccountAssembler,
+ DepositAccountDataValidator depositAccountDataValidator,
AccountNumberGenerator accountNumberGenerator,
+ ClientRepositoryWrapper clientRepository, GroupRepository
groupRepository, SavingsProductRepository savingsProductRepository,
+ NoteRepository noteRepository, StaffRepositoryWrapper
staffRepository,
+ SavingsAccountApplicationTransitionApiJsonValidator
savingsAccountApplicationTransitionApiJsonValidator,
+ SavingsAccountChargeAssembler savingsAccountChargeAssembler,
AccountAssociationsRepository accountAssociationsRepository,
+ FromJsonHelper fromJsonHelper, CalendarInstanceRepository
calendarInstanceRepository,
+ ConfigurationDomainService configurationDomainService,
AccountNumberFormatRepositoryWrapper accountNumberFormatRepository,
+ BusinessEventNotifierService businessEventNotifierService) {
+ return new
DepositApplicationProcessWritePlatformServiceJpaRepositoryImpl(context,
savingAccountRepository,
+ fixedDepositAccountRepository,
recurringDepositAccountRepository, depositAccountAssembler,
depositAccountDataValidator,
+ accountNumberGenerator, clientRepository, groupRepository,
savingsProductRepository, noteRepository, staffRepository,
+ savingsAccountApplicationTransitionApiJsonValidator,
savingsAccountChargeAssembler, accountAssociationsRepository,
+ fromJsonHelper, calendarInstanceRepository,
configurationDomainService, accountNumberFormatRepository,
+ businessEventNotifierService);
+ }
+
+ @Bean
+ @ConditionalOnMissingBean(DepositProductReadPlatformService.class)
+ public DepositProductReadPlatformService
depositProductReadPlatformService(PlatformSecurityContext context, JdbcTemplate
jdbcTemplate,
+ InterestRateChartReadPlatformService
interestRateChartReadPlatformService) {
+ return new DepositProductReadPlatformServiceImpl(context,
jdbcTemplate, interestRateChartReadPlatformService);
+ }
+
+ @Bean
+ @ConditionalOnMissingBean(DepositsDropdownReadPlatformService.class)
+ public DepositsDropdownReadPlatformService
depositsDropdownReadPlatformService() {
+ return new DepositsDropdownReadPlatformServiceImpl();
+ }
+
+ @Bean
+ @ConditionalOnMissingBean(FixedDepositProductWritePlatformService.class)
+ public FixedDepositProductWritePlatformService
fixedDepositProductWritePlatformService(PlatformSecurityContext context,
+ FixedDepositProductRepository fixedDepositProductRepository,
DepositProductDataValidator fromApiJsonDataValidator,
+ DepositProductAssembler depositProductAssembler,
+ ProductToGLAccountMappingWritePlatformService
accountMappingWritePlatformService, InterestRateChartAssembler chartAssembler) {
+ return new
FixedDepositProductWritePlatformServiceJpaRepositoryImpl(context,
fixedDepositProductRepository,
+ fromApiJsonDataValidator, depositProductAssembler,
accountMappingWritePlatformService, chartAssembler);
+ }
+
+ @Bean
+
@ConditionalOnMissingBean(GroupSavingsIndividualMonitoringWritePlatformService.class)
+ public GroupSavingsIndividualMonitoringWritePlatformService
groupSavingsIndividualMonitoringWritePlatformService(
+ PlatformSecurityContext context, GSIMRepositoy
gsimAccountRepository, LoanRepository loanRepository) {
+ return new
GroupSavingsIndividualMonitoringWritePlatformServiceImpl(context,
gsimAccountRepository, loanRepository);
+ }
+
+ @Bean
+ @ConditionalOnMissingBean(GSIMReadPlatformService.class)
+ public GSIMReadPlatformService gsimReadPlatformService(JdbcTemplate
jdbcTemplate, PlatformSecurityContext context,
+ ColumnValidator columnValidator) {
+ return new GSIMReadPlatformServiceImpl(jdbcTemplate, context,
columnValidator);
+ }
+
+ @Bean
+
@ConditionalOnMissingBean(RecurringDepositProductWritePlatformService.class)
+ public RecurringDepositProductWritePlatformService
recurringDepositProductWritePlatformService(PlatformSecurityContext context,
+ RecurringDepositProductRepository
recurringDepositProductRepository, DepositProductDataValidator
fromApiJsonDataValidator,
+ DepositProductAssembler depositProductAssembler,
+ ProductToGLAccountMappingWritePlatformService
accountMappingWritePlatformService, InterestRateChartAssembler chartAssembler) {
+ return new
RecurringDepositProductWritePlatformServiceJpaRepositoryImpl(context,
recurringDepositProductRepository,
+ fromApiJsonDataValidator, depositProductAssembler,
accountMappingWritePlatformService, chartAssembler);
+ }
+
+ @Bean
+
@ConditionalOnMissingBean(SavingsAccountApplicationTransitionApiJsonValidator.class)
+ public SavingsAccountApplicationTransitionApiJsonValidator
savingsAccountApplicationTransitionApiJsonValidator(
+ FromJsonHelper fromApiJsonHelper) {
+ return new
SavingsAccountApplicationTransitionApiJsonValidator(fromApiJsonHelper);
+ }
+
+ @Bean
+ @ConditionalOnMissingBean(SavingsAccountChargeReadPlatformService.class)
+ public SavingsAccountChargeReadPlatformService
savingsAccountChargeReadPlatformService(PlatformSecurityContext context,
+ ChargeDropdownReadPlatformService
chargeDropdownReadPlatformService, JdbcTemplate jdbcTemplate,
+ DropdownReadPlatformService dropdownReadPlatformService,
DatabaseSpecificSQLGenerator sqlGenerator) {
+ return new SavingsAccountChargeReadPlatformServiceImpl(context,
chargeDropdownReadPlatformService, jdbcTemplate,
+ dropdownReadPlatformService, sqlGenerator);
+ }
+
+ @Bean
+ @ConditionalOnMissingBean(SavingsAccountInterestPostingService.class)
+ public SavingsAccountInterestPostingService
savingsAccountInterestPostingService(SavingsHelper savingsHelper) {
+ return new SavingsAccountInterestPostingServiceImpl(savingsHelper);
+ }
+
+ @Bean
+ @ConditionalOnMissingBean(SavingsAccountReadPlatformService.class)
+ public SavingsAccountReadPlatformService
savingsAccountReadPlatformService(PlatformSecurityContext context, JdbcTemplate
jdbcTemplate,
+ ClientReadPlatformService clientReadPlatformService,
GroupReadPlatformService groupReadPlatformService,
+ SavingsProductReadPlatformService
savingProductReadPlatformService, StaffReadPlatformService
staffReadPlatformService,
+ SavingsDropdownReadPlatformService dropdownReadPlatformService,
ChargeReadPlatformService chargeReadPlatformService,
+ EntityDatatableChecksReadService entityDatatableChecksReadService,
ColumnValidator columnValidator,
+ SavingsAccountAssembler savingAccountAssembler, PaginationHelper
paginationHelper, DatabaseSpecificSQLGenerator sqlGenerator,
+ SavingsAccountRepositoryWrapper savingsAccountRepositoryWrapper) {
+ return new SavingsAccountReadPlatformServiceImpl(context,
jdbcTemplate, clientReadPlatformService, groupReadPlatformService,
+ savingProductReadPlatformService, staffReadPlatformService,
dropdownReadPlatformService, chargeReadPlatformService,
+ entityDatatableChecksReadService, columnValidator,
savingAccountAssembler, paginationHelper, sqlGenerator,
+ savingsAccountRepositoryWrapper);
+ }
+
+ @Bean
+ @ConditionalOnMissingBean(SavingsAccountWritePlatformService.class)
+ public SavingsAccountWritePlatformService
savingsAccountWritePlatformService(PlatformSecurityContext context,
+ SavingsAccountDataValidator fromApiJsonDeserializer,
SavingsAccountRepositoryWrapper savingAccountRepositoryWrapper,
+ StaffRepositoryWrapper staffRepository,
SavingsAccountTransactionRepository savingsAccountTransactionRepository,
+ SavingsAccountAssembler savingAccountAssembler,
SavingsAccountTransactionDataValidator savingsAccountTransactionDataValidator,
+ SavingsAccountChargeDataValidator
savingsAccountChargeDataValidator,
+ PaymentDetailWritePlatformService
paymentDetailWritePlatformService,
+ JournalEntryWritePlatformService journalEntryWritePlatformService,
SavingsAccountDomainService savingsAccountDomainService,
+ NoteRepository noteRepository, AccountTransfersReadPlatformService
accountTransfersReadPlatformService,
+ AccountAssociationsReadPlatformService
accountAssociationsReadPlatformService, ChargeRepositoryWrapper
chargeRepository,
+ SavingsAccountChargeRepositoryWrapper
savingsAccountChargeRepository, HolidayRepositoryWrapper holidayRepository,
+ WorkingDaysRepositoryWrapper workingDaysRepository,
ConfigurationDomainService configurationDomainService,
+ DepositAccountOnHoldTransactionRepository
depositAccountOnHoldTransactionRepository,
+ EntityDatatableChecksWritePlatformService
entityDatatableChecksWritePlatformService, AppUserRepositoryWrapper
appuserRepository,
+ StandingInstructionRepository standingInstructionRepository,
BusinessEventNotifierService businessEventNotifierService,
+ GSIMRepositoy gsimRepository, SavingsAccountInterestPostingService
savingsAccountInterestPostingService,
+ ErrorHandler errorHandler) {
+ return new
SavingsAccountWritePlatformServiceJpaRepositoryImpl(context,
fromApiJsonDeserializer, savingAccountRepositoryWrapper,
+ staffRepository, savingsAccountTransactionRepository,
savingAccountAssembler, savingsAccountTransactionDataValidator,
+ savingsAccountChargeDataValidator,
paymentDetailWritePlatformService, journalEntryWritePlatformService,
+ savingsAccountDomainService, noteRepository,
accountTransfersReadPlatformService, accountAssociationsReadPlatformService,
+ chargeRepository, savingsAccountChargeRepository,
holidayRepository, workingDaysRepository, configurationDomainService,
+ depositAccountOnHoldTransactionRepository,
entityDatatableChecksWritePlatformService, appuserRepository,
+ standingInstructionRepository, businessEventNotifierService,
gsimRepository, savingsAccountInterestPostingService,
+ errorHandler);
+ }
+
+ @Bean
+
@ConditionalOnMissingBean(SavingsApplicationProcessWritePlatformService.class)
+ public SavingsApplicationProcessWritePlatformService
savingsApplicationProcessWritePlatformService(PlatformSecurityContext context,
+ SavingsAccountRepositoryWrapper savingAccountRepository,
SavingsAccountAssembler savingAccountAssembler,
+ SavingsAccountDataValidator savingsAccountDataValidator,
AccountNumberGenerator accountNumberGenerator,
+ ClientRepositoryWrapper clientRepository, GroupRepository
groupRepository, SavingsProductRepository savingsProductRepository,
+ NoteRepository noteRepository, StaffRepositoryWrapper
staffRepository,
+ SavingsAccountApplicationTransitionApiJsonValidator
savingsAccountApplicationTransitionApiJsonValidator,
+ SavingsAccountChargeAssembler savingsAccountChargeAssembler,
CommandProcessingService commandProcessingService,
+ SavingsAccountDomainService savingsAccountDomainService,
SavingsAccountWritePlatformService savingsAccountWritePlatformService,
+ AccountNumberFormatRepositoryWrapper
accountNumberFormatRepository, BusinessEventNotifierService
businessEventNotifierService,
+ EntityDatatableChecksWritePlatformService
entityDatatableChecksWritePlatformService, GSIMRepositoy gsimRepository,
+ GroupRepositoryWrapper groupRepositoryWrapper,
GroupSavingsIndividualMonitoringWritePlatformService gsimWritePlatformService) {
+ return new
SavingsApplicationProcessWritePlatformServiceJpaRepositoryImpl(context,
savingAccountRepository, savingAccountAssembler,
+ savingsAccountDataValidator, accountNumberGenerator,
clientRepository, groupRepository, savingsProductRepository,
+ noteRepository, staffRepository,
savingsAccountApplicationTransitionApiJsonValidator,
savingsAccountChargeAssembler,
+ commandProcessingService, savingsAccountDomainService,
savingsAccountWritePlatformService, accountNumberFormatRepository,
+ businessEventNotifierService,
entityDatatableChecksWritePlatformService, gsimRepository,
groupRepositoryWrapper,
+ gsimWritePlatformService);
+ }
+
+ @Bean
+ @ConditionalOnMissingBean(SavingsDropdownReadPlatformService.class)
+ public SavingsDropdownReadPlatformService
savingsDropdownReadPlatformService() {
+ return new SavingsDropdownReadPlatformServiceImpl();
+ }
+
+ @Bean
+ @ConditionalOnMissingBean(SavingsProductReadPlatformService.class)
+ public SavingsProductReadPlatformService
savingsProductReadPlatformService(PlatformSecurityContext context, JdbcTemplate
jdbcTemplate,
+ FineractEntityAccessUtil fineractEntityAccessUtil) {
+ return new SavingsProductReadPlatformServiceImpl(context,
jdbcTemplate, fineractEntityAccessUtil);
+ }
+
+ @Bean
+ @ConditionalOnMissingBean(SavingsProductWritePlatformService.class)
+ public SavingsProductWritePlatformService
savingsProductWritePlatformService(PlatformSecurityContext context,
+ SavingsProductRepository savingProductRepository,
SavingsProductDataValidator fromApiJsonDataValidator,
+ SavingsProductAssembler savingsProductAssembler,
+ ProductToGLAccountMappingWritePlatformService
accountMappingWritePlatformService,
+ FineractEntityAccessUtil fineractEntityAccessUtil) {
+ return new
SavingsProductWritePlatformServiceJpaRepositoryImpl(context,
savingProductRepository, fromApiJsonDataValidator,
+ savingsProductAssembler, accountMappingWritePlatformService,
fineractEntityAccessUtil);
+ }
+
+ @Bean
+ @Scope("prototype")
+ @ConditionalOnMissingBean(SavingsSchedularInterestPoster.class)
+ public SavingsSchedularInterestPoster savingsSchedularInterestPoster(
+ SavingsAccountWritePlatformService
savingsAccountWritePlatformService, JdbcTemplate jdbcTemplate,
+ SavingsAccountReadPlatformService
savingsAccountReadPlatformService, PlatformSecurityContext
platformSecurityContext
+
+ ) {
+ return new
SavingsSchedularInterestPoster(savingsAccountWritePlatformService,
jdbcTemplate, savingsAccountReadPlatformService,
+ platformSecurityContext);
+ }
+
+ @Bean
+ @Scope("prototype")
+ @ConditionalOnMissingBean(SavingsSchedularInterestPosterTask.class)
+ public SavingsSchedularInterestPosterTask
savingsSchedularInterestPosterTask(SavingsSchedularInterestPoster
interestPoster) {
+ return new SavingsSchedularInterestPosterTask(interestPoster);
+ }
+}