summaryrefslogtreecommitdiff
path: root/eaaf_core/src/main/java/at/gv/egiz/eaaf/core/api/utils/IPendingRequestIdGenerationStrategy.java
diff options
context:
space:
mode:
authorThomas Lenz <thomas.lenz@egiz.gv.at>2019-04-23 15:00:13 +0200
committerThomas Lenz <thomas.lenz@egiz.gv.at>2019-04-23 15:00:13 +0200
commit5c1b5b863fe8d6c08cfe0749fed7ce9594827f8a (patch)
treee96cf3ae1f3ed011b0588fd7a341038484c55017 /eaaf_core/src/main/java/at/gv/egiz/eaaf/core/api/utils/IPendingRequestIdGenerationStrategy.java
parentf689c1e404b5cf22d17346da75a296c825a3ba03 (diff)
downloadEAAF-Components-5c1b5b863fe8d6c08cfe0749fed7ce9594827f8a.tar.gz
EAAF-Components-5c1b5b863fe8d6c08cfe0749fed7ce9594827f8a.tar.bz2
EAAF-Components-5c1b5b863fe8d6c08cfe0749fed7ce9594827f8a.zip
add different strategies for pendingRequestId generation
Diffstat (limited to 'eaaf_core/src/main/java/at/gv/egiz/eaaf/core/api/utils/IPendingRequestIdGenerationStrategy.java')
-rw-r--r--eaaf_core/src/main/java/at/gv/egiz/eaaf/core/api/utils/IPendingRequestIdGenerationStrategy.java31
1 files changed, 31 insertions, 0 deletions
diff --git a/eaaf_core/src/main/java/at/gv/egiz/eaaf/core/api/utils/IPendingRequestIdGenerationStrategy.java b/eaaf_core/src/main/java/at/gv/egiz/eaaf/core/api/utils/IPendingRequestIdGenerationStrategy.java
new file mode 100644
index 00000000..443404eb
--- /dev/null
+++ b/eaaf_core/src/main/java/at/gv/egiz/eaaf/core/api/utils/IPendingRequestIdGenerationStrategy.java
@@ -0,0 +1,31 @@
+package at.gv.egiz.eaaf.core.api.utils;
+
+import org.springframework.lang.NonNull;
+import org.springframework.lang.Nullable;
+
+import at.gv.egiz.eaaf.core.exceptions.EAAFException;
+import at.gv.egiz.eaaf.core.exceptions.PendingReqIdValidationException;
+
+public interface IPendingRequestIdGenerationStrategy {
+
+ /**
+ * Generate a new external pending-request id
+ *
+ * @return
+ * @throws EAAFException
+ */
+ @NonNull
+ public String generateExternalPendingRequestId() throws EAAFException;
+
+ /**
+ * Validate a pendingRequestId according to implemented strategy
+ *
+ * @param pendingReqId pending-request Id that should be validated
+ * @return internalPendingRequestId
+ * @throws PendingReqIdValidationException
+ */
+ @NonNull
+ public String validateAndGetPendingRequestId(@Nullable String pendingReqId) throws PendingReqIdValidationException;
+
+
+}