From 6a3322cf36c54f22225b50ed56b2b58f70a4a9ec Mon Sep 17 00:00:00 2001 From: Lane Spade Date: Mon, 15 Apr 2024 13:08:34 -0700 Subject: [PATCH] Added JavaDocs for new generic parameter --- .../java/io/iworkflow/core/StateDecision.java | 6 +++- .../java/io/iworkflow/core/StateMovement.java | 30 +++++++++++-------- 2 files changed, 22 insertions(+), 14 deletions(-) diff --git a/src/main/java/io/iworkflow/core/StateDecision.java b/src/main/java/io/iworkflow/core/StateDecision.java index 89eb78b..c282ba6 100644 --- a/src/main/java/io/iworkflow/core/StateDecision.java +++ b/src/main/java/io/iworkflow/core/StateDecision.java @@ -107,7 +107,7 @@ public static StateDecision forceCompleteIfInternalChannelEmptyOrElse(final Obje .build(); } - public static StateDecision forceCompleteIfSignalChannelEmptyOrElse(final String signalChannelName, final Class> orElseStateClass) { + public static StateDecision forceCompleteIfSignalChannelEmptyOrElse(final String signalChannelName, final Class> orElseStateClass) { return forceCompleteIfSignalChannelEmptyOrElse(signalChannelName, orElseStateClass, null); } @@ -147,6 +147,7 @@ public static StateDecision forceCompleteIfSignalChannelEmptyOrElse(final Object } /** + * @param Class type of the WorkflowState input * @param stateClass required * @param stateInput optional, can be null * @param stateOptionsOverride optional, can be null. It is used to override the defined one in the State class @@ -157,6 +158,7 @@ public static StateDecision singleNextState(final Class Class type of the WorkflowState input * @param stateClass required * @param stateInput optional, can be null * @return state decision @@ -166,6 +168,7 @@ public static StateDecision singleNextState(final Class Class type of the WorkflowState input * @param stateClass required * @return state decision */ @@ -176,6 +179,7 @@ public static StateDecision singleNextState(final Class Class type of the WorkflowState input * @param stateId required. StateId of next state * @param stateInput optional, can be null. Input for next state * @param stateOptionsOverride optional, can be null. It is used to override the defined one in the State class diff --git a/src/main/java/io/iworkflow/core/StateMovement.java b/src/main/java/io/iworkflow/core/StateMovement.java index cbdccb4..3bdae3d 100644 --- a/src/main/java/io/iworkflow/core/StateMovement.java +++ b/src/main/java/io/iworkflow/core/StateMovement.java @@ -11,6 +11,7 @@ public abstract class StateMovement { public abstract String getStateId(); public abstract Optional getStateInput(); + public abstract Optional getStateOptionsOverride(); public final static String RESERVED_STATE_ID_PREFIX = "_SYS_"; @@ -53,10 +54,10 @@ public static StateMovement forceFailWorkflow(final Object output) { } /** - * - * @param stateClass required - * @param stateInput optional, can be null - * @param stateOptionsOverride optional, can be null. It is used to override the defined one in the State class + * @param Class type of the WorkflowState input + * @param stateClass required + * @param stateInput optional, can be null + * @param stateOptionsOverride optional, can be null. It is used to override the defined one in the State class * @return state movement */ public static StateMovement create(final Class> stateClass, final I stateInput, final WorkflowStateOptions stateOptionsOverride) { @@ -64,9 +65,9 @@ public static StateMovement create(final Class Class type of the WorkflowState input + * @param stateClass required + * @param stateInput optional, can be null * @return state movement */ public static StateMovement create(final Class> stateClass, final I stateInput) { @@ -74,8 +75,8 @@ public static StateMovement create(final Class Class type of the WorkflowState input + * @param stateClass required * @return state movement */ public static StateMovement create(final Class> stateClass) { @@ -84,9 +85,11 @@ public static StateMovement create(final Class Class type of the WorkflowState input + * @param stateId required + * @param stateInput optional, can be null + * @param stateOptionsOverride optional, can be null. It is used to override the defined one in the State class * @return state movement */ public static StateMovement create(final String stateId, final I stateInput, final WorkflowStateOptions stateOptionsOverride) { @@ -110,7 +113,8 @@ public static StateMovement create(final String stateId, final I stateInput, /** * use the other one with WorkflowState class param if the stateId is provided by default, to make your code cleaner - * @param stateId stateId + * + * @param stateId stateId * @return state movement */ public static StateMovement create(final String stateId) {