VictorPavfurious commented on code in PR #4638:
URL: https://github.com/apache/fineract/pull/4638#discussion_r2077814361


##########
fineract-core/src/main/java/org/apache/fineract/infrastructure/event/external/service/ExternalEventConfigurationWritePlatformServiceImpl.java:
##########
@@ -22,31 +22,28 @@
 import java.util.HashMap;
 import java.util.List;
 import java.util.Map;
-import lombok.AllArgsConstructor;
-import org.apache.fineract.infrastructure.core.api.JsonCommand;
-import org.apache.fineract.infrastructure.core.data.CommandProcessingResult;
-import 
org.apache.fineract.infrastructure.core.data.CommandProcessingResultBuilder;
-import 
org.apache.fineract.infrastructure.event.external.command.ExternalEventConfigurationCommand;
+import lombok.RequiredArgsConstructor;
+import org.apache.fineract.command.core.Command;
+import 
org.apache.fineract.infrastructure.event.external.data.ExternalEventConfigKey;
+import 
org.apache.fineract.infrastructure.event.external.data.ExternalEventConfigurationRequest;
+import 
org.apache.fineract.infrastructure.event.external.data.ExternalEventConfigurationResponse;
 import 
org.apache.fineract.infrastructure.event.external.repository.ExternalEventConfigurationRepository;
 import 
org.apache.fineract.infrastructure.event.external.repository.domain.ExternalEventConfiguration;
-import 
org.apache.fineract.infrastructure.event.external.serialization.ExternalEventConfigurationCommandFromApiJsonDeserializer;
 import org.springframework.stereotype.Service;
 import org.springframework.transaction.annotation.Transactional;
 
 @Service
-@AllArgsConstructor
+@RequiredArgsConstructor
 public class ExternalEventConfigurationWritePlatformServiceImpl implements 
ExternalEventConfigurationWritePlatformService {
 
     private final ExternalEventConfigurationRepository repository;
-    private final ExternalEventConfigurationCommandFromApiJsonDeserializer 
fromApiJsonDeserializer;
 
     @Transactional
     @Override
-    public CommandProcessingResult updateConfigurations(final JsonCommand 
command) {
-        final ExternalEventConfigurationCommand configurationCommand = 
fromApiJsonDeserializer.commandFromApiJson(command.json());
-        final Map<String, Boolean> commandConfigurations = 
configurationCommand.externalEventConfigurations();
-        final Map<String, Object> changes = new HashMap<>();
+    public ExternalEventConfigurationResponse 
updateConfigurations(Command<ExternalEventConfigurationRequest> command) {

Review Comment:
   @galovics , why we can not create custom jakarta validation for specific 
conditions for all request dto's, for what  multi-level validations and 
specific validation in layer like services? 
   Service should do only business logic without any validation..



-- 
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]

Reply via email to