You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@fineract.apache.org by "kapil-panchal (via GitHub)" <gi...@apache.org> on 2025/09/16 09:29:04 UTC

[PR] FINERACT-2250: New command processing - Maker Checker (org.apache.fineract.commands) [fineract]

kapil-panchal opened a new pull request, #5037:
URL: https://github.com/apache/fineract/pull/5037

   ## Description
   
   Describe the changes made and why they were made.
   
   New Command processing infrastructure added for MakerChecker
   
   Ignore if these details are present on the associated [Apache Fineract JIRA ticket](https://issues.apache.org/jira/browse/FINERACT-2250).
   
   ## Checklist
   
   Please make sure these boxes are checked before submitting your pull request - thanks!
   
   - [x] Write the commit message as per https://github.com/apache/fineract/#pull-requests
   - [x] Acknowledge that we will not review PRs that are not passing the build _("green")_ - it is your responsibility to get a proposed PR to pass the build, not primarily the project's maintainers.
   - [ ] Create/update unit or integration tests for verifying the changes made.
   - [x] Follow coding conventions at https://cwiki.apache.org/confluence/display/FINERACT/Coding+Conventions.
   - [x] Add required Swagger annotation and update API documentation at fineract-provider/src/main/resources/static/legacy-docs/apiLive.htm with details of any API changes
   - [x] Submission is not a "code dump".  (Large changes can be made "in repository" via a branch.  Ask on the developer mailing list for guidance, if required.)
   
   FYI our guidelines for code reviews are at https://cwiki.apache.org/confluence/display/FINERACT/Code+Review+Guide.
   


-- 
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: commits-unsubscribe@fineract.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] FINERACT-2250: New command processing - Maker Checker (org.apache.fineract.commands) [fineract]

Posted by "vidakovic (via GitHub)" <gi...@apache.org>.
vidakovic commented on code in PR #5037:
URL: https://github.com/apache/fineract/pull/5037#discussion_r2408195499


##########
fineract-provider/src/main/java/org/apache/fineract/commands/handler/DeleteMakerCheckerCommandHandler.java:
##########
@@ -0,0 +1,42 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.fineract.commands.handler;
+
+import lombok.RequiredArgsConstructor;
+import org.apache.fineract.command.core.Command;
+import org.apache.fineract.command.core.CommandHandler;
+import org.apache.fineract.commands.data.DeleteMakerCheckerRequest;
+import org.apache.fineract.commands.data.DeleteMakerCheckerResponse;
+import org.apache.fineract.commands.service.PortfolioCommandSourceWritePlatformService;
+import org.springframework.stereotype.Component;
+import org.springframework.transaction.annotation.Transactional;
+
+@Component
+@RequiredArgsConstructor
+public class DeleteMakerCheckerCommandHandler implements CommandHandler<DeleteMakerCheckerRequest, DeleteMakerCheckerResponse> {

Review Comment:
   Wrong command service



-- 
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: commits-unsubscribe@fineract.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] FINERACT-2250: New command processing - Maker Checker (org.apache.fineract.commands) [fineract]

Posted by "vidakovic (via GitHub)" <gi...@apache.org>.
vidakovic commented on code in PR #5037:
URL: https://github.com/apache/fineract/pull/5037#discussion_r2408207178


##########
fineract-provider/src/main/java/org/apache/fineract/commands/api/MakercheckersApiResource.java:
##########
@@ -38,36 +38,40 @@
 import jakarta.ws.rs.core.MediaType;
 import jakarta.ws.rs.core.UriInfo;
 import java.util.List;
+import java.util.UUID;
+import java.util.function.Supplier;
 import lombok.RequiredArgsConstructor;
 import org.apache.commons.lang3.StringUtils;
+import org.apache.fineract.command.core.CommandPipeline;
+import org.apache.fineract.commands.command.ApproveRejectMakerCheckerCommand;
+import org.apache.fineract.commands.command.DeleteMakerCheckerCommand;
+import org.apache.fineract.commands.data.ApproveRejectMakerCheckerRequest;
+import org.apache.fineract.commands.data.ApproveRejectMakerCheckerResponse;
 import org.apache.fineract.commands.data.AuditData;
 import org.apache.fineract.commands.data.AuditSearchData;
+import org.apache.fineract.commands.data.DeleteMakerCheckerRequest;
+import org.apache.fineract.commands.data.DeleteMakerCheckerResponse;
 import org.apache.fineract.commands.data.request.MakerCheckerRequest;
 import org.apache.fineract.commands.service.AuditReadPlatformService;
-import org.apache.fineract.commands.service.PortfolioCommandSourceWritePlatformService;
 import org.apache.fineract.infrastructure.core.api.ApiRequestParameterHelper;
-import org.apache.fineract.infrastructure.core.data.CommandProcessingResult;
-import org.apache.fineract.infrastructure.core.exception.UnrecognizedQueryParamException;
 import org.apache.fineract.infrastructure.core.serialization.ApiRequestJsonSerializationSettings;
+import org.apache.fineract.infrastructure.core.service.DateUtils;
 import org.apache.fineract.infrastructure.security.utils.SQLBuilder;
 import org.springframework.stereotype.Component;
 
 @Path("/v1/makercheckers")
 @Component
 @Tag(name = "Maker Checker (or 4-eye) functionality")
+@Consumes({ MediaType.APPLICATION_JSON })

Review Comment:
   Let's leave per function annotations... scope too broad



-- 
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: commits-unsubscribe@fineract.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] FINERACT-2250: New command processing - Maker Checker (org.apache.fineract.commands) [fineract]

Posted by "vidakovic (via GitHub)" <gi...@apache.org>.
vidakovic commented on code in PR #5037:
URL: https://github.com/apache/fineract/pull/5037#discussion_r2408205151


##########
fineract-provider/src/main/java/org/apache/fineract/commands/api/MakercheckersApiResource.java:
##########
@@ -77,13 +81,10 @@ public List<AuditData> retrieveCommands(@Context final UriInfo uriInfo, @BeanPar
 

Review Comment:
   Not sure if this should be secured!?? Usually there is a validation happening here...



-- 
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: commits-unsubscribe@fineract.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] FINERACT-2250: New command processing - Maker Checker (org.apache.fineract.commands) [fineract]

Posted by "kapilpanchal123 (via GitHub)" <gi...@apache.org>.
kapilpanchal123 commented on code in PR #5037:
URL: https://github.com/apache/fineract/pull/5037#discussion_r2464400766


##########
fineract-core/src/main/java/org/apache/fineract/commands/data/DeleteMakerCheckerResponse.java:
##########
@@ -0,0 +1,34 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.fineract.commands.data;
+
+import java.io.Serial;
+import java.io.Serializable;
+import lombok.Getter;
+import lombok.Setter;
+import lombok.experimental.SuperBuilder;
+
+@Getter
+@Setter
+@SuperBuilder
+public class DeleteMakerCheckerResponse extends MakerCheckerResponseDTO implements Serializable {

Review Comment:
   @vidakovic, I am implementing this ticket as per the above comments, according to the type of permission the handlers are also getting changed, which means that all the handlers have to be with the new command infrastructure code.



-- 
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: commits-unsubscribe@fineract.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] FINERACT-2250: New command processing - Maker Checker (org.apache.fineract.commands) [fineract]

Posted by "kapilpanchal123 (via GitHub)" <gi...@apache.org>.
kapilpanchal123 commented on PR #5037:
URL: https://github.com/apache/fineract/pull/5037#issuecomment-3505386894

   Hi Aleks,
   
   It’s just that I have 2 computers with 2 operating systems Linux and
   Windows, I don’t want to mix both the accounts switching between computers.
   
   
   Thanks,
   Kapil
   
   On Fri, 7 Nov 2025 at 9:34 PM, Aleksandar Vidakovic <
   ***@***.***> wrote:
   
   > *vidakovic* left a comment (apache/fineract#5037)
   > <https://github.com/apache/fineract/pull/5037#issuecomment-3503402107>
   >
   > I am confused why there are 2 ("kapil-panchal", "kapilpanchal123")
   > accounts belonging apparently to the same Github user related to this PR?
   >
   > Note: makes this PR suspicious!
   >
   > —
   > Reply to this email directly, view it on GitHub
   > <https://github.com/apache/fineract/pull/5037#issuecomment-3503402107>,
   > or unsubscribe
   > <https://github.com/notifications/unsubscribe-auth/A3NH6UZVXABQRAXOPFGW27L33S7KFAVCNFSM6AAAAACGUEUPWCVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZTKMBTGQYDEMJQG4>
   > .
   > You are receiving this because you commented.Message ID:
   > ***@***.***>
   >
   


-- 
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: commits-unsubscribe@fineract.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] FINERACT-2250: New command processing - Maker Checker (org.apache.fineract.commands) [fineract]

Posted by "vidakovic (via GitHub)" <gi...@apache.org>.
vidakovic commented on code in PR #5037:
URL: https://github.com/apache/fineract/pull/5037#discussion_r2408197123


##########
fineract-provider/src/main/java/org/apache/fineract/commands/handler/ApproveRejectMakerCheckerCommandHandler.java:
##########
@@ -0,0 +1,54 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.fineract.commands.handler;
+
+import lombok.RequiredArgsConstructor;
+import org.apache.fineract.command.core.Command;
+import org.apache.fineract.command.core.CommandHandler;
+import org.apache.fineract.commands.data.ApproveRejectMakerCheckerRequest;
+import org.apache.fineract.commands.data.ApproveRejectMakerCheckerResponse;
+import org.apache.fineract.commands.service.PortfolioCommandSourceWritePlatformService;
+import org.apache.fineract.infrastructure.core.data.CommandProcessingResult;
+import org.apache.fineract.infrastructure.core.exception.UnrecognizedQueryParamException;
+import org.springframework.stereotype.Component;
+import org.springframework.transaction.annotation.Transactional;
+
+@Component
+@RequiredArgsConstructor
+public class ApproveRejectMakerCheckerCommandHandler
+        implements CommandHandler<ApproveRejectMakerCheckerRequest, ApproveRejectMakerCheckerResponse> {
+
+    private final PortfolioCommandSourceWritePlatformService writePlatformService;

Review Comment:
   Wrong command service



-- 
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: commits-unsubscribe@fineract.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] FINERACT-2250: New command processing - Maker Checker (org.apache.fineract.commands) [fineract]

Posted by "kapil-panchal (via GitHub)" <gi...@apache.org>.
kapil-panchal commented on code in PR #5037:
URL: https://github.com/apache/fineract/pull/5037#discussion_r2420470218


##########
fineract-core/src/main/java/org/apache/fineract/commands/data/DeleteMakerCheckerResponse.java:
##########
@@ -0,0 +1,34 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.fineract.commands.data;
+
+import java.io.Serial;
+import java.io.Serializable;
+import lombok.Getter;
+import lombok.Setter;
+import lombok.experimental.SuperBuilder;
+
+@Getter
+@Setter
+@SuperBuilder
+public class DeleteMakerCheckerResponse extends MakerCheckerResponseDTO implements Serializable {

Review Comment:
   I will re-write this PR according to the comments.



-- 
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: commits-unsubscribe@fineract.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] FINERACT-2250: New command processing - Maker Checker (org.apache.fineract.commands) [fineract]

Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on PR #5037:
URL: https://github.com/apache/fineract/pull/5037#issuecomment-3623913580

   This pull request seems to be stale.  Are you still planning to work on it?  We will automatically close it in 30 days.


-- 
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: commits-unsubscribe@fineract.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] FINERACT-2250: New command processing - Maker Checker (org.apache.fineract.commands) [fineract]

Posted by "vidakovic (via GitHub)" <gi...@apache.org>.
vidakovic commented on PR #5037:
URL: https://github.com/apache/fineract/pull/5037#issuecomment-3503402107

   I am confused why there are 2 ("kapil-panchal", "kapilpanchal123") accounts belonging apparently to the same Github user related to this PR?
   
   Note: makes this PR suspicious!


-- 
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: commits-unsubscribe@fineract.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] FINERACT-2250: New command processing - Maker Checker (org.apache.fineract.commands) [fineract]

Posted by "vidakovic (via GitHub)" <gi...@apache.org>.
vidakovic commented on code in PR #5037:
URL: https://github.com/apache/fineract/pull/5037#discussion_r2408207178


##########
fineract-provider/src/main/java/org/apache/fineract/commands/api/MakercheckersApiResource.java:
##########
@@ -38,36 +38,40 @@
 import jakarta.ws.rs.core.MediaType;
 import jakarta.ws.rs.core.UriInfo;
 import java.util.List;
+import java.util.UUID;
+import java.util.function.Supplier;
 import lombok.RequiredArgsConstructor;
 import org.apache.commons.lang3.StringUtils;
+import org.apache.fineract.command.core.CommandPipeline;
+import org.apache.fineract.commands.command.ApproveRejectMakerCheckerCommand;
+import org.apache.fineract.commands.command.DeleteMakerCheckerCommand;
+import org.apache.fineract.commands.data.ApproveRejectMakerCheckerRequest;
+import org.apache.fineract.commands.data.ApproveRejectMakerCheckerResponse;
 import org.apache.fineract.commands.data.AuditData;
 import org.apache.fineract.commands.data.AuditSearchData;
+import org.apache.fineract.commands.data.DeleteMakerCheckerRequest;
+import org.apache.fineract.commands.data.DeleteMakerCheckerResponse;
 import org.apache.fineract.commands.data.request.MakerCheckerRequest;
 import org.apache.fineract.commands.service.AuditReadPlatformService;
-import org.apache.fineract.commands.service.PortfolioCommandSourceWritePlatformService;
 import org.apache.fineract.infrastructure.core.api.ApiRequestParameterHelper;
-import org.apache.fineract.infrastructure.core.data.CommandProcessingResult;
-import org.apache.fineract.infrastructure.core.exception.UnrecognizedQueryParamException;
 import org.apache.fineract.infrastructure.core.serialization.ApiRequestJsonSerializationSettings;
+import org.apache.fineract.infrastructure.core.service.DateUtils;
 import org.apache.fineract.infrastructure.security.utils.SQLBuilder;
 import org.springframework.stereotype.Component;
 
 @Path("/v1/makercheckers")
 @Component
 @Tag(name = "Maker Checker (or 4-eye) functionality")
+@Consumes({ MediaType.APPLICATION_JSON })

Review Comment:
   Let's leave per function annotations.



-- 
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: commits-unsubscribe@fineract.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] FINERACT-2250: New command processing - Maker Checker (org.apache.fineract.commands) [fineract]

Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] closed pull request #5037: FINERACT-2250: New command processing - Maker Checker (org.apache.fineract.commands)
URL: https://github.com/apache/fineract/pull/5037


-- 
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: commits-unsubscribe@fineract.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] FINERACT-2250: New command processing - Maker Checker (org.apache.fineract.commands) [fineract]

Posted by "vidakovic (via GitHub)" <gi...@apache.org>.
vidakovic commented on code in PR #5037:
URL: https://github.com/apache/fineract/pull/5037#discussion_r2408217824


##########
fineract-core/src/main/java/org/apache/fineract/commands/data/DeleteMakerCheckerResponse.java:
##########
@@ -0,0 +1,34 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.fineract.commands.data;
+
+import java.io.Serial;
+import java.io.Serializable;
+import lombok.Getter;
+import lombok.Setter;
+import lombok.experimental.SuperBuilder;
+
+@Getter
+@Setter
+@SuperBuilder
+public class DeleteMakerCheckerResponse extends MakerCheckerResponseDTO implements Serializable {

Review Comment:
   Request and responses should be as simple as possible... extending a parent is not. Embrace duplication (for request and response attributes), don't tie things to a common ancestor; this makes things very rigid... and over time use cases (and attributes) will diverge.



-- 
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: commits-unsubscribe@fineract.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org