[
https://issues.apache.org/jira/browse/FINERACT-3170?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18140340#comment-18140340
]
Rojan Francis commented on FINERACT-3170:
-----------------------------------------
Hi, I'd like to work on this. The ticket covers 12 entities, so would it be OK
to start with the interest rate chart entities (InterestRateChart,
InterestRateChartSlab, InterestIncentives) in one PR and follow up on the rest?
Thanks!
> Move request validation out of deposit and savings product entities
> -------------------------------------------------------------------
>
> Key: FINERACT-3170
> URL: https://issues.apache.org/jira/browse/FINERACT-3170
> Project: Apache Fineract
> Issue Type: Sub-task
> Reporter: Adam Saghy
> Priority: Major
> Labels: beginner, beginner-friendly
>
> The entities below build {{DataValidatorBuilder}} errors or throw
> {{PlatformApiDataValidationException}} themselves. Move this request
> validation into a validator class (or the existing {{*DataValidator}} of the
> feature) that the service calls before it changes the entity. Keep invariant
> checks that protect the entity's own state in the entity.
> Entities:
> * {{FixedDepositAccount}}
> * {{RecurringDepositAccount}}
> * {{DepositAccountRecurringDetail}}
> * {{DepositAccountTermAndPreClosure}}
> * {{DepositProductTermAndPreClosure}}
> * {{FixedDepositProduct}}
> * {{RecurringDepositProduct}}
> * {{InterestIncentives}}
> * {{InterestRateChart}}
> * {{InterestRateChartSlab}}
> * {{SavingsAccountCharge}}
> * {{SavingsProduct}}
> h3. Done when
> * The entity only holds state and the methods that change that state
> consistently (for example {{activate(date)}} or {{updateName(name)}}).
> * Parsing, request validation and calculations live in services, validators,
> assemblers or calculators, which are unit tested.
> * No behaviour change; validation error codes and messages stay the same;
> existing tests pass.
--
This message was sent by Atlassian Jira
(v10.3.26#10030026)