public class StateUtils
extends java.lang.Object
Modifier and Type | Class and Description |
---|---|
static class |
StateUtils.CtxItem |
Constructor and Description |
---|
StateUtils() |
Modifier and Type | Method and Description |
---|---|
static StepContextId |
first(StepIdentifier stepIdentifier) |
static boolean |
isContainedStep(StepContextId general,
StepContextId specific) |
static boolean |
isMatchedIdentifier(StepIdentifier parent,
StepIdentifier child,
boolean substep) |
static boolean |
isMatchedIdentifier(java.lang.String parent,
java.lang.String child,
boolean substep) |
static StepContextId |
last(StepIdentifier stepIdentifier) |
static java.lang.String |
parameterString(java.util.Map<java.lang.String,java.lang.String> params) |
static java.lang.String |
parameterString(StepContextId contextId)
Generate string for a context id's parameter section, if present
|
static java.util.Map<java.lang.String,java.lang.String> |
parseParameterString(java.lang.String t) |
static void |
setupNodeStates(WorkflowStateImpl current)
Configure the nodeStates map for the workflow, by visiting each step in the workflow, and connecting the
step+node state for nodeSteps to the nodeStates map
|
static StepContextId |
stepContextId(int step,
boolean errorhandler) |
static StepContextId |
stepContextId(int step,
boolean errorhandler,
java.util.Map<java.lang.String,java.lang.String> params) |
static StepContextId |
stepContextIdFromString(java.lang.String s) |
static StepIdentifier |
stepIdentifier(int... ids) |
static StepIdentifier |
stepIdentifier(int id) |
static StepIdentifier |
stepIdentifier(java.util.List<StepContextId> context) |
static StepIdentifier |
stepIdentifier(StepContextId... context) |
static StepIdentifier |
stepIdentifierAppend(StepIdentifier identifier,
StepIdentifier identifier2) |
static StepIdentifier |
stepIdentifierFromString(java.lang.String input) |
static StepIdentifier |
stepIdentifierTail(StepIdentifier identifier) |
static java.lang.String |
stepIdentifierToString(StepIdentifier ident) |
static StepState |
stepState(ExecutionState state) |
static StepState |
stepState(ExecutionState state,
java.util.Map metadata) |
static StepState |
stepState(ExecutionState state,
java.util.Map metadata,
java.lang.String errorMessage) |
static StepState |
stepState(ExecutionState state,
java.util.Map metadata,
java.lang.String errorMessage,
java.util.Date startTime,
java.util.Date updateTime,
java.util.Date endTime) |
static StepStateChange |
stepStateChange(StepState state) |
static StepStateChange |
stepStateChange(StepState state,
java.lang.String nodeName) |
static WorkflowNodeState |
workflowNodeState(java.lang.String nodeName,
StepState nodeState,
StepIdentifier lastIdentifier,
java.util.Map<StepIdentifier,? extends StepState> stepStates) |
static WorkflowState |
workflowState(java.util.List<java.lang.String> nodeSet,
java.util.List<java.lang.String> allNodes,
long stepCount,
ExecutionState executionState,
java.util.Date updateTime,
java.util.Date startTime,
java.util.Date endTime,
java.lang.String serverNode,
java.util.List<WorkflowStepState> stepStates,
boolean setupNodeStates) |
static WorkflowState |
workflowState(java.util.List<java.lang.String> nodeSet,
java.util.List<java.lang.String> allNodes,
long stepCount,
ExecutionState executionState,
java.util.Date timestamp,
java.util.Date startTime,
java.util.Date endTime,
java.lang.String serverNode,
java.util.List<WorkflowStepState> stepStates,
java.util.Map<java.lang.String,WorkflowNodeState> nodeStates) |
static WorkflowStepState |
workflowStepState(StepState stepState,
java.util.Map<java.lang.String,StepState> nodeStateMap,
StepIdentifier stepIdentifier,
WorkflowState subWorkflowState,
java.util.List<java.lang.String> nodeStepTargets,
boolean nodeStep) |
public static StepState stepState(ExecutionState state)
public static StepState stepState(ExecutionState state, java.util.Map metadata)
public static StepState stepState(ExecutionState state, java.util.Map metadata, java.lang.String errorMessage)
public static StepState stepState(ExecutionState state, java.util.Map metadata, java.lang.String errorMessage, java.util.Date startTime, java.util.Date updateTime, java.util.Date endTime)
public static StepStateChange stepStateChange(StepState state)
public static StepStateChange stepStateChange(StepState state, java.lang.String nodeName)
public static java.lang.String parameterString(StepContextId contextId)
contextId
- context idpublic static java.lang.String parameterString(java.util.Map<java.lang.String,java.lang.String> params)
params
- paramspublic static java.lang.String stepIdentifierToString(StepIdentifier ident)
ident
- identpublic static StepIdentifier stepIdentifierFromString(java.lang.String input)
input
- identifier stringpublic static StepContextId stepContextIdFromString(java.lang.String s)
s
- context idpublic static java.util.Map<java.lang.String,java.lang.String> parseParameterString(java.lang.String t)
t
- parameterpublic static boolean isMatchedIdentifier(java.lang.String parent, java.lang.String child, boolean substep)
parent
- parent identifierchild
- child identifiersubstep
- if true, allow the child identifier to be longer than the parent,
otherwise require exact same lengthpublic static boolean isMatchedIdentifier(StepIdentifier parent, StepIdentifier child, boolean substep)
parent
- parent identifierchild
- child identifiersubstep
- if true, allow the child identifier to be longer than the parent,
otherwise require exact same lengthpublic static boolean isContainedStep(StepContextId general, StepContextId specific)
public static StepContextId stepContextId(int step, boolean errorhandler)
public static StepContextId stepContextId(int step, boolean errorhandler, java.util.Map<java.lang.String,java.lang.String> params)
public static StepIdentifier stepIdentifier(java.util.List<StepContextId> context)
public static StepIdentifier stepIdentifier(StepContextId... context)
public static StepIdentifier stepIdentifier(int id)
public static StepIdentifier stepIdentifier(int... ids)
public static StepContextId last(StepIdentifier stepIdentifier)
public static StepContextId first(StepIdentifier stepIdentifier)
public static StepIdentifier stepIdentifierTail(StepIdentifier identifier)
public static StepIdentifier stepIdentifierAppend(StepIdentifier identifier, StepIdentifier identifier2)
public static WorkflowState workflowState(java.util.List<java.lang.String> nodeSet, java.util.List<java.lang.String> allNodes, long stepCount, ExecutionState executionState, java.util.Date updateTime, java.util.Date startTime, java.util.Date endTime, java.lang.String serverNode, java.util.List<WorkflowStepState> stepStates, boolean setupNodeStates)
public static WorkflowState workflowState(java.util.List<java.lang.String> nodeSet, java.util.List<java.lang.String> allNodes, long stepCount, ExecutionState executionState, java.util.Date timestamp, java.util.Date startTime, java.util.Date endTime, java.lang.String serverNode, java.util.List<WorkflowStepState> stepStates, java.util.Map<java.lang.String,WorkflowNodeState> nodeStates)
public static void setupNodeStates(WorkflowStateImpl current)
current
- workflow to visitpublic static WorkflowStepState workflowStepState(StepState stepState, java.util.Map<java.lang.String,StepState> nodeStateMap, StepIdentifier stepIdentifier, WorkflowState subWorkflowState, java.util.List<java.lang.String> nodeStepTargets, boolean nodeStep)
public static WorkflowNodeState workflowNodeState(java.lang.String nodeName, StepState nodeState, StepIdentifier lastIdentifier, java.util.Map<StepIdentifier,? extends StepState> stepStates)