|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.dtolabs.rundeck.core.execution.workflow.state.StateUtils
public class StateUtils
$INTERFACE is ... User: greg Date: 10/17/13 Time: 12:36 PM
Nested Class Summary | |
---|---|
static class |
StateUtils.CtxItem
|
Constructor Summary | |
---|---|
StateUtils()
|
Method Summary | |
---|---|
static StepContextId |
first(StepIdentifier stepIdentifier)
|
static boolean |
isContainedStep(StepContextId general,
StepContextId specific)
|
static boolean |
isMatchedIdentifier(StepIdentifier parent,
StepIdentifier child,
boolean substep)
Return true if the identifier is a subcontext of the parent identifier, optionally allowing sub steps |
static boolean |
isMatchedIdentifier(java.lang.String parent,
java.lang.String child,
boolean substep)
Return true if the identifier represents a subcontext context of the parent identifier, optionally allowing sub steps |
static StepContextId |
last(StepIdentifier stepIdentifier)
|
static java.lang.String |
parameterString(java.util.Map<java.lang.String,java.lang.String> params)
Generate the parameter string for a map of parameters |
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)
Parse a paramter string to a parameter map |
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)
Generate a step context id from a string |
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)
Parse a step identifier from a string |
static StepIdentifier |
stepIdentifierTail(StepIdentifier identifier)
|
static java.lang.String |
stepIdentifierToString(StepIdentifier ident)
Generate a string representing the step identifier |
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)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public StateUtils()
Method Detail |
---|
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
-
public static java.lang.String parameterString(java.util.Map<java.lang.String,java.lang.String> params)
params
-
public static java.lang.String stepIdentifierToString(StepIdentifier ident)
ident
-
public static StepIdentifier stepIdentifierFromString(java.lang.String input)
input
-
public static StepContextId stepContextIdFromString(java.lang.String s)
s
-
public static java.util.Map<java.lang.String,java.lang.String> parseParameterString(java.lang.String t)
t
-
public 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 length
public 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 length
public 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)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |