From f5aa8d22e830c293c3e25fe9a2a0a2e26d2a9c58 Mon Sep 17 00:00:00 2001 From: Adam Saghy Date: Fri, 3 Nov 2023 12:27:42 +0100 Subject: [PATCH] FINERACT-1724: Move product account mapping packages to core --- .../domain/ProductToGLAccountMapping.java | 0 .../domain/ProductToGLAccountMappingRepository.java | 0 .../exception/ProductToGLAccountMappingInvalidException.java | 0 .../ProductToGLAccountMappingNotFoundException.java | 0 .../ProductToGLAccountMappingFromApiJsonDeserializer.java | 5 ++--- .../service/ProductToGLAccountMappingHelper.java | 0 .../ProductToGLAccountMappingReadPlatformService.java | 0 .../ProductToGLAccountMappingReadPlatformServiceImpl.java | 0 .../ProductToGLAccountMappingWritePlatformService.java | 0 .../service/SavingsProductToGLAccountMappingHelper.java | 0 .../service/ShareProductToGLAccountMappingHelper.java | 0 .../service/LoanProductToGLAccountMappingHelper.java | 3 ++- .../ProductToGLAccountMappingWritePlatformServiceImpl.java | 5 ++++- 13 files changed, 8 insertions(+), 5 deletions(-) rename {fineract-loan => fineract-core}/src/main/java/org/apache/fineract/accounting/producttoaccountmapping/domain/ProductToGLAccountMapping.java (100%) rename {fineract-loan => fineract-core}/src/main/java/org/apache/fineract/accounting/producttoaccountmapping/domain/ProductToGLAccountMappingRepository.java (100%) rename {fineract-loan => fineract-core}/src/main/java/org/apache/fineract/accounting/producttoaccountmapping/exception/ProductToGLAccountMappingInvalidException.java (100%) rename {fineract-loan => fineract-core}/src/main/java/org/apache/fineract/accounting/producttoaccountmapping/exception/ProductToGLAccountMappingNotFoundException.java (100%) rename {fineract-loan => fineract-core}/src/main/java/org/apache/fineract/accounting/producttoaccountmapping/serialization/ProductToGLAccountMappingFromApiJsonDeserializer.java (98%) rename {fineract-loan => fineract-core}/src/main/java/org/apache/fineract/accounting/producttoaccountmapping/service/ProductToGLAccountMappingHelper.java (100%) rename {fineract-loan => fineract-core}/src/main/java/org/apache/fineract/accounting/producttoaccountmapping/service/ProductToGLAccountMappingReadPlatformService.java (100%) rename {fineract-loan => fineract-core}/src/main/java/org/apache/fineract/accounting/producttoaccountmapping/service/ProductToGLAccountMappingReadPlatformServiceImpl.java (100%) rename {fineract-loan => fineract-core}/src/main/java/org/apache/fineract/accounting/producttoaccountmapping/service/ProductToGLAccountMappingWritePlatformService.java (100%) rename {fineract-loan => fineract-core}/src/main/java/org/apache/fineract/accounting/producttoaccountmapping/service/SavingsProductToGLAccountMappingHelper.java (100%) rename {fineract-loan => fineract-core}/src/main/java/org/apache/fineract/accounting/producttoaccountmapping/service/ShareProductToGLAccountMappingHelper.java (100%) rename fineract-loan/src/main/java/org/apache/fineract/accounting/{producttoaccountmapping => productaccountmapping}/service/LoanProductToGLAccountMappingHelper.java (99%) rename {fineract-loan/src/main/java/org/apache/fineract/accounting/producttoaccountmapping => fineract-provider/src/main/java/org/apache/fineract/accounting/productaccountmapping}/service/ProductToGLAccountMappingWritePlatformServiceImpl.java (98%) diff --git a/fineract-loan/src/main/java/org/apache/fineract/accounting/producttoaccountmapping/domain/ProductToGLAccountMapping.java b/fineract-core/src/main/java/org/apache/fineract/accounting/producttoaccountmapping/domain/ProductToGLAccountMapping.java similarity index 100% rename from fineract-loan/src/main/java/org/apache/fineract/accounting/producttoaccountmapping/domain/ProductToGLAccountMapping.java rename to fineract-core/src/main/java/org/apache/fineract/accounting/producttoaccountmapping/domain/ProductToGLAccountMapping.java diff --git a/fineract-loan/src/main/java/org/apache/fineract/accounting/producttoaccountmapping/domain/ProductToGLAccountMappingRepository.java b/fineract-core/src/main/java/org/apache/fineract/accounting/producttoaccountmapping/domain/ProductToGLAccountMappingRepository.java similarity index 100% rename from fineract-loan/src/main/java/org/apache/fineract/accounting/producttoaccountmapping/domain/ProductToGLAccountMappingRepository.java rename to fineract-core/src/main/java/org/apache/fineract/accounting/producttoaccountmapping/domain/ProductToGLAccountMappingRepository.java diff --git a/fineract-loan/src/main/java/org/apache/fineract/accounting/producttoaccountmapping/exception/ProductToGLAccountMappingInvalidException.java b/fineract-core/src/main/java/org/apache/fineract/accounting/producttoaccountmapping/exception/ProductToGLAccountMappingInvalidException.java similarity index 100% rename from fineract-loan/src/main/java/org/apache/fineract/accounting/producttoaccountmapping/exception/ProductToGLAccountMappingInvalidException.java rename to fineract-core/src/main/java/org/apache/fineract/accounting/producttoaccountmapping/exception/ProductToGLAccountMappingInvalidException.java diff --git a/fineract-loan/src/main/java/org/apache/fineract/accounting/producttoaccountmapping/exception/ProductToGLAccountMappingNotFoundException.java b/fineract-core/src/main/java/org/apache/fineract/accounting/producttoaccountmapping/exception/ProductToGLAccountMappingNotFoundException.java similarity index 100% rename from fineract-loan/src/main/java/org/apache/fineract/accounting/producttoaccountmapping/exception/ProductToGLAccountMappingNotFoundException.java rename to fineract-core/src/main/java/org/apache/fineract/accounting/producttoaccountmapping/exception/ProductToGLAccountMappingNotFoundException.java diff --git a/fineract-loan/src/main/java/org/apache/fineract/accounting/producttoaccountmapping/serialization/ProductToGLAccountMappingFromApiJsonDeserializer.java b/fineract-core/src/main/java/org/apache/fineract/accounting/producttoaccountmapping/serialization/ProductToGLAccountMappingFromApiJsonDeserializer.java similarity index 98% rename from fineract-loan/src/main/java/org/apache/fineract/accounting/producttoaccountmapping/serialization/ProductToGLAccountMappingFromApiJsonDeserializer.java rename to fineract-core/src/main/java/org/apache/fineract/accounting/producttoaccountmapping/serialization/ProductToGLAccountMappingFromApiJsonDeserializer.java index 037f7f96653..13e175dba33 100644 --- a/fineract-loan/src/main/java/org/apache/fineract/accounting/producttoaccountmapping/serialization/ProductToGLAccountMappingFromApiJsonDeserializer.java +++ b/fineract-core/src/main/java/org/apache/fineract/accounting/producttoaccountmapping/serialization/ProductToGLAccountMappingFromApiJsonDeserializer.java @@ -39,7 +39,6 @@ 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.apache.fineract.portfolio.loanproduct.domain.LoanProduct; import org.apache.fineract.portfolio.savings.DepositAccountType; import org.apache.fineract.portfolio.shareproducts.constants.ShareProductApiConstants; import org.springframework.stereotype.Component; @@ -50,8 +49,8 @@ * Currently, validation of the passed in JSON is done before calling save or update method on the target resource (in * our case the loan Product) * - * However, in the case of a loan product it would be difficult to validate the passed in JSON for valid - * {@link LoanProduct} to {@link GLAccount} mappings during update because of the following scenario + * However, in the case of a loan product it would be difficult to validate the passed in JSON for valid LoanProduct to + * {@link GLAccount} mappings during update because of the following scenario * * The accounting rule type may be changed in the update command, so we would have to validate if all required account * heads for a particular account type have been passed in (would be different for CASH and Accrual based). However, diff --git a/fineract-loan/src/main/java/org/apache/fineract/accounting/producttoaccountmapping/service/ProductToGLAccountMappingHelper.java b/fineract-core/src/main/java/org/apache/fineract/accounting/producttoaccountmapping/service/ProductToGLAccountMappingHelper.java similarity index 100% rename from fineract-loan/src/main/java/org/apache/fineract/accounting/producttoaccountmapping/service/ProductToGLAccountMappingHelper.java rename to fineract-core/src/main/java/org/apache/fineract/accounting/producttoaccountmapping/service/ProductToGLAccountMappingHelper.java diff --git a/fineract-loan/src/main/java/org/apache/fineract/accounting/producttoaccountmapping/service/ProductToGLAccountMappingReadPlatformService.java b/fineract-core/src/main/java/org/apache/fineract/accounting/producttoaccountmapping/service/ProductToGLAccountMappingReadPlatformService.java similarity index 100% rename from fineract-loan/src/main/java/org/apache/fineract/accounting/producttoaccountmapping/service/ProductToGLAccountMappingReadPlatformService.java rename to fineract-core/src/main/java/org/apache/fineract/accounting/producttoaccountmapping/service/ProductToGLAccountMappingReadPlatformService.java diff --git a/fineract-loan/src/main/java/org/apache/fineract/accounting/producttoaccountmapping/service/ProductToGLAccountMappingReadPlatformServiceImpl.java b/fineract-core/src/main/java/org/apache/fineract/accounting/producttoaccountmapping/service/ProductToGLAccountMappingReadPlatformServiceImpl.java similarity index 100% rename from fineract-loan/src/main/java/org/apache/fineract/accounting/producttoaccountmapping/service/ProductToGLAccountMappingReadPlatformServiceImpl.java rename to fineract-core/src/main/java/org/apache/fineract/accounting/producttoaccountmapping/service/ProductToGLAccountMappingReadPlatformServiceImpl.java diff --git a/fineract-loan/src/main/java/org/apache/fineract/accounting/producttoaccountmapping/service/ProductToGLAccountMappingWritePlatformService.java b/fineract-core/src/main/java/org/apache/fineract/accounting/producttoaccountmapping/service/ProductToGLAccountMappingWritePlatformService.java similarity index 100% rename from fineract-loan/src/main/java/org/apache/fineract/accounting/producttoaccountmapping/service/ProductToGLAccountMappingWritePlatformService.java rename to fineract-core/src/main/java/org/apache/fineract/accounting/producttoaccountmapping/service/ProductToGLAccountMappingWritePlatformService.java diff --git a/fineract-loan/src/main/java/org/apache/fineract/accounting/producttoaccountmapping/service/SavingsProductToGLAccountMappingHelper.java b/fineract-core/src/main/java/org/apache/fineract/accounting/producttoaccountmapping/service/SavingsProductToGLAccountMappingHelper.java similarity index 100% rename from fineract-loan/src/main/java/org/apache/fineract/accounting/producttoaccountmapping/service/SavingsProductToGLAccountMappingHelper.java rename to fineract-core/src/main/java/org/apache/fineract/accounting/producttoaccountmapping/service/SavingsProductToGLAccountMappingHelper.java diff --git a/fineract-loan/src/main/java/org/apache/fineract/accounting/producttoaccountmapping/service/ShareProductToGLAccountMappingHelper.java b/fineract-core/src/main/java/org/apache/fineract/accounting/producttoaccountmapping/service/ShareProductToGLAccountMappingHelper.java similarity index 100% rename from fineract-loan/src/main/java/org/apache/fineract/accounting/producttoaccountmapping/service/ShareProductToGLAccountMappingHelper.java rename to fineract-core/src/main/java/org/apache/fineract/accounting/producttoaccountmapping/service/ShareProductToGLAccountMappingHelper.java diff --git a/fineract-loan/src/main/java/org/apache/fineract/accounting/producttoaccountmapping/service/LoanProductToGLAccountMappingHelper.java b/fineract-loan/src/main/java/org/apache/fineract/accounting/productaccountmapping/service/LoanProductToGLAccountMappingHelper.java similarity index 99% rename from fineract-loan/src/main/java/org/apache/fineract/accounting/producttoaccountmapping/service/LoanProductToGLAccountMappingHelper.java rename to fineract-loan/src/main/java/org/apache/fineract/accounting/productaccountmapping/service/LoanProductToGLAccountMappingHelper.java index 20cfce14998..fe5de5aea08 100644 --- a/fineract-loan/src/main/java/org/apache/fineract/accounting/producttoaccountmapping/service/LoanProductToGLAccountMappingHelper.java +++ b/fineract-loan/src/main/java/org/apache/fineract/accounting/productaccountmapping/service/LoanProductToGLAccountMappingHelper.java @@ -16,7 +16,7 @@ * specific language governing permissions and limitations * under the License. */ -package org.apache.fineract.accounting.producttoaccountmapping.service; +package org.apache.fineract.accounting.productaccountmapping.service; import com.google.gson.JsonElement; import java.util.HashMap; @@ -33,6 +33,7 @@ import org.apache.fineract.accounting.producttoaccountmapping.domain.PortfolioProductType; import org.apache.fineract.accounting.producttoaccountmapping.domain.ProductToGLAccountMappingRepository; import org.apache.fineract.accounting.producttoaccountmapping.exception.ProductToGLAccountMappingInvalidException; +import org.apache.fineract.accounting.producttoaccountmapping.service.ProductToGLAccountMappingHelper; import org.apache.fineract.infrastructure.core.api.JsonCommand; import org.apache.fineract.infrastructure.core.serialization.FromJsonHelper; import org.apache.fineract.portfolio.charge.domain.ChargeRepositoryWrapper; diff --git a/fineract-loan/src/main/java/org/apache/fineract/accounting/producttoaccountmapping/service/ProductToGLAccountMappingWritePlatformServiceImpl.java b/fineract-provider/src/main/java/org/apache/fineract/accounting/productaccountmapping/service/ProductToGLAccountMappingWritePlatformServiceImpl.java similarity index 98% rename from fineract-loan/src/main/java/org/apache/fineract/accounting/producttoaccountmapping/service/ProductToGLAccountMappingWritePlatformServiceImpl.java rename to fineract-provider/src/main/java/org/apache/fineract/accounting/productaccountmapping/service/ProductToGLAccountMappingWritePlatformServiceImpl.java index ad957c5d08b..751bc651b41 100644 --- a/fineract-loan/src/main/java/org/apache/fineract/accounting/producttoaccountmapping/service/ProductToGLAccountMappingWritePlatformServiceImpl.java +++ b/fineract-provider/src/main/java/org/apache/fineract/accounting/productaccountmapping/service/ProductToGLAccountMappingWritePlatformServiceImpl.java @@ -16,7 +16,7 @@ * specific language governing permissions and limitations * under the License. */ -package org.apache.fineract.accounting.producttoaccountmapping.service; +package org.apache.fineract.accounting.productaccountmapping.service; import static org.apache.fineract.portfolio.savings.SavingsApiConstants.accountingRuleParamName; import static org.apache.fineract.portfolio.savings.SavingsApiConstants.isDormancyTrackingActiveParamName; @@ -35,6 +35,9 @@ import org.apache.fineract.accounting.common.AccountingConstants.SharesProductAccountingParams; import org.apache.fineract.accounting.common.AccountingRuleType; import org.apache.fineract.accounting.producttoaccountmapping.serialization.ProductToGLAccountMappingFromApiJsonDeserializer; +import org.apache.fineract.accounting.producttoaccountmapping.service.ProductToGLAccountMappingWritePlatformService; +import org.apache.fineract.accounting.producttoaccountmapping.service.SavingsProductToGLAccountMappingHelper; +import org.apache.fineract.accounting.producttoaccountmapping.service.ShareProductToGLAccountMappingHelper; import org.apache.fineract.infrastructure.core.api.JsonCommand; import org.apache.fineract.infrastructure.core.serialization.FromJsonHelper; import org.apache.fineract.portfolio.savings.DepositAccountType;