ezolnbl-dpc commented on code in PR #2718:
URL: https://github.com/apache/fineract/pull/2718#discussion_r1012267251
##########
fineract-provider/src/main/java/org/apache/fineract/commands/service/SynchronousCommandProcessingService.java:
##########
@@ -147,6 +151,34 @@ public CommandProcessingResult executeCommand(final
CommandWrapper wrapper, fina
return result;
}
+ private String getIdempotencyKey(CommandWrapper wrapper) {
Review Comment:
basically a few getters and setters but I will move it
##########
fineract-provider/src/main/java/org/apache/fineract/infrastructure/core/exception/DuplicateCommandException.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.infrastructure.core.exception;
+
+/**
+ * Exception thrown when command is sent with same action, entity and
idempotency key
+ */
+public class DuplicateCommandException extends AbstractPlatformException {
+
+ private final String action;
+ private final String entity;
+ private final String idempotencyKey;
+ private final String response;
+ private final int processingResult;
+
+ public DuplicateCommandException(String action, String entity, String
idempotencyKey, String response, int processingResult) {
+ super(null, null);
+ this.action = action;
+ this.entity = entity;
+ this.idempotencyKey = idempotencyKey;
+ this.response = response;
+ this.processingResult = processingResult;
+ }
+
+ @Override
+ public String toString() {
Review Comment:
will do
--
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]