vidakovic commented on code in PR #6049:
URL: https://github.com/apache/fineract/pull/6049#discussion_r3538016531
##########
fineract-provider/src/main/java/org/apache/fineract/portfolio/address/service/AddressWritePlatformServiceImpl.java:
##########
@@ -53,27 +53,6 @@ public class AddressWritePlatformServiceImpl implements
AddressWritePlatformServ
private final ClientAddressRepositoryWrapper
clientAddressRepositoryWrapper;
private final AddressCommandFromApiJsonDeserializer
fromApiJsonDeserializer;
Review Comment:
Nope, manual JSON parsing. We want to get away from this.
##########
fineract-provider/src/main/java/org/apache/fineract/portfolio/address/service/AddressWritePlatformServiceImpl.java:
##########
@@ -53,27 +53,6 @@ public class AddressWritePlatformServiceImpl implements
AddressWritePlatformServ
private final ClientAddressRepositoryWrapper
clientAddressRepositoryWrapper;
private final AddressCommandFromApiJsonDeserializer
fromApiJsonDeserializer;
- @Override
- public CommandProcessingResult addClientAddress(final Long clientId, final
Long addressTypeId, final JsonCommand command) {
- JsonObject jsonObject = command.parsedJson().getAsJsonObject();
- context.authenticatedUser();
- fromApiJsonDeserializer.validateForCreate(jsonObject.toString(),
false);
-
- final CodeValue addressTypeIdCodeValue =
codeValueRepository.getReferenceById(addressTypeId);
- final Client client =
clientRepositoryWrapper.findOneWithNotFoundDetection(clientId);
-
- final Address address = createAddress(jsonObject);
- addressRepository.save(address);
-
- final ClientAddress clientAddress = createClientAddress(client,
jsonObject, addressTypeIdCodeValue, address);
- clientAddressRepository.saveAndFlush(clientAddress);
-
- return new CommandProcessingResultBuilder() //
- .withCommandId(command.commandId()) //
- .withEntityId(clientAddress.getId()) //
- .build();
- }
-
@Override
public CommandProcessingResult addNewClientAddress(final Client client,
final JsonCommand command) {
Review Comment:
Nope, belongs to legacy command processing.
--
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]