Zeyad2003 commented on code in PR #3994:
URL: https://github.com/apache/fineract/pull/3994#discussion_r1694235284


##########
custom/v3/commands/service/src/main/java/org/apache/fineract/v3/commands/service/CommandTypedWrapperBuilder.java:
##########
@@ -0,0 +1,115 @@
+/**
+ * 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.v3.commands.service;
+
+import lombok.AllArgsConstructor;
+import lombok.Builder;
+import lombok.Getter;
+import lombok.NoArgsConstructor;
+import org.apache.fineract.v3.commands.data.CommandTypedWrapper;
+
+@Getter
+@NoArgsConstructor
+@AllArgsConstructor
+@Builder(toBuilder = true)
+public class CommandTypedWrapperBuilder<T> {
+
+    private Long officeId;
+    private Long groupId;
+    private Long clientId;
+    private Long loanId;
+    private Long savingsId;
+    private String actionName;
+    private String entityName;
+    private Long entityId;
+    private Long subentityId;
+    private String href;
+    private T requestBody;
+    private String transactionId;
+    private Long productId;
+    private Long templateId;
+    private Long creditBureauId;
+    private Long organisationCreditBureauId;
+    private String jobName;
+    private String idempotencyKey;
+
+    public CommandTypedWrapper<T> buildCommandWrapper() {
+        return CommandTypedWrapper.<T>builder() //
+                .officeId(this.officeId) //
+                .groupId(this.groupId) //
+                .clientId(this.clientId) //
+                .loanId(this.loanId) //
+                .savingsId(this.savingsId) //
+                .actionName(this.actionName) //
+                .entityName(this.entityName) //
+                .taskPermissionName(this.actionName + "_" + this.entityName) //
+                .entityId(this.entityId) //
+                .subentityId(this.subentityId) //
+                .href(this.href) //
+                .requestBody(this.requestBody) //
+                .transactionId(this.transactionId) //
+                .productId(this.productId) //
+                .templateId(this.templateId) //
+                .creditBureauId(this.creditBureauId) //
+                .organisationCreditBureauId(this.organisationCreditBureauId) //
+                .jobName(this.jobName) //
+                .idempotencyKey(this.idempotencyKey) //
+                .build(); //
+    }
+
+    public CommandTypedWrapperBuilder<T> createNote(final 
CommandTypedWrapper<T> resourceDetails, final String resourceType,

Review Comment:
   The entire `CommandTypedWrapperBuilder` class has been removed. Now, I've 
implemented the `NoteUtilityMethods` class, which only contains the specialized 
methods for notes.



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