adamsaghy commented on code in PR #5141:
URL: https://github.com/apache/fineract/pull/5141#discussion_r2489538592
##########
fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/serialization/LoanTransactionValidatorImpl.java:
##########
@@ -671,7 +678,7 @@ private void
validateLoanHasNoLaterChargeRefundTransactionToReverseOrCreateATran
}
}
- private void validateLoanDisbursementIsBeforeTransactionDate(final Loan
loan, final LocalDate transactionDate) {
+ public void validateLoanDisbursementIsBeforeTransactionDate(final Loan
loan, final LocalDate transactionDate) {
Review Comment:
internal logic should not be exposed... it should be protected in this case.
##########
fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/serialization/LoanTransactionValidatorImpl.java:
##########
@@ -659,7 +666,7 @@ public void validateLoanGroupIsActive(final Loan loan) {
}
}
- private void
validateLoanHasNoLaterChargeRefundTransactionToReverseOrCreateATransaction(Loan
loan, LocalDate transactionDate,
+ public void
validateLoanHasNoLaterChargeRefundTransactionToReverseOrCreateATransaction(Loan
loan, LocalDate transactionDate,
Review Comment:
internal logic should not be exposed... it should be protected in this case.
##########
fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/serialization/LoanTransactionValidatorImpl.java:
##########
@@ -830,7 +837,7 @@ public void validateRefund(final Loan loan,
LoanTransactionType loanTransactionT
validateTransactionAmountNotExceedThresholdForMultiDisburseLoan(loan);
}
- private void validateRepaymentTypeTransactionNotBeforeAChargeRefund(final
Loan loan, final LoanTransactionType loanTransactionType,
+ public void validateRepaymentTypeTransactionNotBeforeAChargeRefund(final
Loan loan, final LoanTransactionType loanTransactionType,
Review Comment:
internal logic should not be exposed... it should be protected in this case.
##########
fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/serialization/LoanTransactionValidatorImpl.java:
##########
@@ -245,7 +245,7 @@ public void validateDisbursement(JsonCommand command,
boolean isAccountTransfer,
});
}
- private void validateDisbursementWithPostDatedChecks(final String json,
final Long loanId) {
+ public void validateDisbursementWithPostDatedChecks(final String json,
final Long loanId) {
Review Comment:
internal logic should not be exposed... it should be protected in this case.
##########
fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/serialization/LoanTransactionValidatorImpl.java:
##########
@@ -680,22 +687,22 @@ private void
validateLoanDisbursementIsBeforeTransactionDate(final Loan loan, fi
}
}
- private void validateTransactionShouldNotBeInTheFuture(final LocalDate
transactionDate) {
+ public void validateTransactionShouldNotBeInTheFuture(final LocalDate
transactionDate) {
if (DateUtils.isDateInTheFuture(transactionDate)) {
final String errorMessage = "The transaction date cannot be in the
future.";
throw new InvalidLoanStateTransitionException("transaction",
"cannot.be.a.future.date", errorMessage, transactionDate);
}
}
- private void validateLoanHasCurrency(final Loan loan) {
+ public void validateLoanHasCurrency(final Loan loan) {
Review Comment:
internal logic should not be exposed... it should be protected in this case.
##########
fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/serialization/LoanTransactionValidatorImpl.java:
##########
@@ -291,7 +291,7 @@ private void validateDisbursementWithPostDatedChecks(final
String json, final Lo
}
}
- private void validateDisbursementDateWithMeetingDate(final LocalDate
actualDisbursementDate, final CalendarInstance calendarInstance,
+ public void validateDisbursementDateWithMeetingDate(final LocalDate
actualDisbursementDate, final CalendarInstance calendarInstance,
Review Comment:
internal logic should not be exposed... it should be protected in this case.
##########
fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/serialization/LoanTransactionValidatorImpl.java:
##########
@@ -680,22 +687,22 @@ private void
validateLoanDisbursementIsBeforeTransactionDate(final Loan loan, fi
}
}
- private void validateTransactionShouldNotBeInTheFuture(final LocalDate
transactionDate) {
+ public void validateTransactionShouldNotBeInTheFuture(final LocalDate
transactionDate) {
Review Comment:
internal logic should not be exposed... it should be protected in this case.
##########
fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/serialization/LoanTransactionValidatorImpl.java:
##########
@@ -759,7 +766,7 @@ public void validateRepaymentDateIsOnHoliday(final
LocalDate repaymentDate, fina
}
}
- private void
validateTransactionAmountNotExceedThresholdForMultiDisburseLoan(Loan loan) {
+ public void
validateTransactionAmountNotExceedThresholdForMultiDisburseLoan(Loan loan) {
Review Comment:
internal logic should not be exposed... it should be protected in this case.
##########
fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/serialization/LoanTransactionValidatorImpl.java:
##########
@@ -680,22 +687,22 @@ private void
validateLoanDisbursementIsBeforeTransactionDate(final Loan loan, fi
}
}
- private void validateTransactionShouldNotBeInTheFuture(final LocalDate
transactionDate) {
+ public void validateTransactionShouldNotBeInTheFuture(final LocalDate
transactionDate) {
if (DateUtils.isDateInTheFuture(transactionDate)) {
final String errorMessage = "The transaction date cannot be in the
future.";
throw new InvalidLoanStateTransitionException("transaction",
"cannot.be.a.future.date", errorMessage, transactionDate);
}
}
- private void validateLoanHasCurrency(final Loan loan) {
+ public void validateLoanHasCurrency(final Loan loan) {
MonetaryCurrency currency = loan.getCurrency();
final ApplicationCurrency defaultApplicationCurrency =
this.applicationCurrencyRepository.findOneByCode(currency.getCode());
if (defaultApplicationCurrency == null) {
throw new CurrencyNotFoundException(currency.getCode());
}
}
- private void validateClientOfficeJoiningDateIsBeforeTransactionDate(Loan
loan, LocalDate transactionDate) {
+ public void validateClientOfficeJoiningDateIsBeforeTransactionDate(Loan
loan, LocalDate transactionDate) {
Review Comment:
internal logic should not be exposed... it should be protected in this case.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]