FINERACT-2244: Migrate Floating Rate module to CommandDispatcher#6013
Open
aditinikam wants to merge 3 commits into
Open
FINERACT-2244: Migrate Floating Rate module to CommandDispatcher#6013aditinikam wants to merge 3 commits into
aditinikam wants to merge 3 commits into
Conversation
Migrate org.apache.fineract.portfolio.floatingrates (fineract-rates) to the new command-processing infrastructure (FINERACT-2169), mirroring the Staff gold-standard pattern. - FloatingRatesApiResource injects CommandDispatcher; POST/PUT build typed FloatingRateCreate/UpdateCommand and return typed POJOs (FloatingRateCreateResponse/FloatingRateUpdateResponse). @produces hoisted to class level; inline read-permission checks removed from GETs. - Add typed command handlers (CommandHandler<Req,Res>, @Retry/@transactional), FloatingRateWriteService(+Impl), FloatingRateUpdateRequest (distinct payload type for dispatcher routing), and typed validateForCreate/Update + FloatingRate.createNew/update overloads (JsonCommand-free). - Legacy write path kept in parallel (FloatingRateWritePlatformService, old NewCommandSourceHandler handlers, JsonCommand domain/validator methods). - Rename FloatingRatesReadPlatformService -> FloatingRatesReadService (+Impl) across all callers. - Add fineract-command dependency to fineract-rates; register write-service bean; add /api/*/floatingrates GET/POST/PUT authorization matchers to SecurityConfig (READ/CREATE/UPDATE_FLOATINGRATE).
…vice Address review feedback on the new FloatingRateWriteService bean by removing the parallel typed command-dispatcher write stack and reverting floating-rate writes to the existing legacy command-source path. - Delete net-new typed cluster: FloatingRateCreate/UpdateCommand, FloatingRateCreate/UpdateResponse, FloatingRateUpdateRequest, the FloatingRateCreate/UpdateCommandHandler dispatcher handlers, and FloatingRateWriteService(+Impl). - Revert FloatingRate domain and FloatingRateDataValidator to develop, removing the typed JsonCommand-free overloads. - Restore FloatingRatesApiResource POST/PUT to the CommandWrapperBuilder / logCommandSource path (returns CommandProcessingResult); keep the renamed FloatingRatesReadService. - Remove the floatingRateWriteService bean and the fineract-command dependency. The legacy FloatingRateWritePlatformService and @CommandType handlers are now the sole write path. Read-service rename and SecurityConfig matchers retained.
…dDispatcher
Reverse the previous fallback-to-legacy and complete the CQRS migration so
floating-rate writes flow solely through the typed CommandDispatcher path.
No JsonCommand or FromJsonHelper remain in the write path.
- Restore the typed stack: FloatingRate{Create,Update}Command,
FloatingRate{Create,Update}Response, FloatingRateUpdateRequest, the typed
FloatingRate{Create,Update}CommandHandler, FloatingRateWriteService(+Impl),
dispatcher-based FloatingRatesApiResource, the floatingRateWriteService bean,
and the fineract-command dependency.
- Delete the legacy JSON cluster: FloatingRateWritePlatformService(+Impl), the
@CommandType Create/UpdateFloatingRateCommandHandler, the JsonCommand-based
FloatingRate.createNew/update/getRatePeriods overloads, the String/JsonElement
FloatingRateDataValidator methods (and its FromJsonHelper dependency), and the
CommandWrapperBuilder.createFloatingRate/updateFloatingRate builders.
Verified :fineract-core, :fineract-rates, :fineract-provider compileJava and
spotless.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Migrate org.apache.fineract.portfolio.floatingrates (fineract-rates) to the new command-processing infrastructure (FINERACT-2169), mirroring the Staff gold-standard pattern.
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.