FINERACT-2455: Add loan origination support to working capital loans#5971
FINERACT-2455: Add loan origination support to working capital loans#5971Cocoa-Puffs wants to merge 2 commits into
Conversation
c02872e to
d897083
Compare
|
@Cocoa-Puffs Please review the failing checks |
b1fab89 to
80f3b2f
Compare
| .orElseThrow(() -> new WorkingCapitalLoanNotFoundException(loanId)); | ||
|
|
||
| if (!loan.getLoanStatus().isSubmittedAndPendingApproval()) { | ||
| throw new WorkingCapitalLoanApplicationNotInSubmittedStateCannotBeDeletedException(loanId); |
There was a problem hiding this comment.
I think we are throwing the wrong exception here. WorkingCapitalLoanApplicationNotInSubmittedStateCannotBeDeletedException talks about deleting the loan, not detaching the originator: "Working Capital Loan with identifier " + id + " cannot be deleted in its current state."
There was a problem hiding this comment.
replaced with the appropriate exception
| @RequiredArgsConstructor | ||
| @Transactional | ||
| @ConditionalOnProperty(value = "fineract.module.loan-origination.enabled", havingValue = "true") | ||
| public class WorkingCapitalLoanOriginatorWritePlatformService implements LoanOriginatorWritePlatformService { |
There was a problem hiding this comment.
Design concern: WorkingCapitalLoanOriginatorWritePlatformService is forced to implement LoanOriginatorWritePlatformService, including create/update/delete, which it can't implement This also requires marking the LoanOriginatorLinkingServiceImpl as @Primary.
Suggestions:
- Either drop implements LoanOriginatorWritePlatformService (the handlers already inject the concrete type, so
@Primarybecomes unnecessary) - Or extract a narrow attach/detach-only interface that both modules implement.
There was a problem hiding this comment.
Dropped the implements
02cffff to
0ec8a04
Compare
0ec8a04 to
4cab072
Compare
Description
Describe the changes made and why they were made. (Ignore if these details are present on the associated Apache Fineract JIRA ticket.)
Checklist
Please make sure these boxes are checked before submitting your pull request - thanks!
Your assigned reviewer(s) will follow our guidelines for code reviews.