com.dtolabs.rundeck.core.execution.workflow.state
Class StateUtils

java.lang.Object
  extended by com.dtolabs.rundeck.core.execution.workflow.state.StateUtils

public class StateUtils
extends java.lang.Object

$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 StepContextId last(StepIdentifier stepIdentifier)
           
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 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 stepIdentifierTail(StepIdentifier 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

StateUtils

public StateUtils()
Method Detail

stepState

public static StepState stepState(ExecutionState state)

stepState

public static StepState stepState(ExecutionState state,
                                  java.util.Map metadata)

stepState

public static StepState stepState(ExecutionState state,
                                  java.util.Map metadata,
                                  java.lang.String errorMessage)

stepState

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)

stepStateChange

public static StepStateChange stepStateChange(StepState state)

stepStateChange

public static StepStateChange stepStateChange(StepState state,
                                              java.lang.String nodeName)

stepContextId

public static StepContextId stepContextId(int step,
                                          boolean errorhandler)

stepIdentifier

public static StepIdentifier stepIdentifier(java.util.List<StepContextId> context)

stepIdentifier

public static StepIdentifier stepIdentifier(StepContextId... context)

stepIdentifier

public static StepIdentifier stepIdentifier(int id)

stepIdentifier

public static StepIdentifier stepIdentifier(int... ids)

last

public static StepContextId last(StepIdentifier stepIdentifier)

first

public static StepContextId first(StepIdentifier stepIdentifier)

stepIdentifierTail

public static StepIdentifier stepIdentifierTail(StepIdentifier identifier)

stepIdentifierAppend

public static StepIdentifier stepIdentifierAppend(StepIdentifier identifier,
                                                  StepIdentifier identifier2)

workflowState

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)

workflowState

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)

setupNodeStates

public 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

Parameters:
current - workflow to visit

workflowStepState

public 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)

workflowNodeState

public static WorkflowNodeState workflowNodeState(java.lang.String nodeName,
                                                  StepState nodeState,
                                                  StepIdentifier lastIdentifier,
                                                  java.util.Map<StepIdentifier,? extends StepState> stepStates)