mirror of
https://github.com/Fishwaldo/rundeck-api-java-client.git
synced 2025-07-07 13:38:23 +00:00
Update javadoc for workflow state domain classes
This commit is contained in:
parent
ba136cfc44
commit
6c1f93af49
6 changed files with 66 additions and 6 deletions
|
@ -5,7 +5,7 @@ import java.util.List;
|
|||
import java.util.Set;
|
||||
|
||||
/**
|
||||
* $INTERFACE is ... User: greg Date: 1/17/14 Time: 11:26 AM
|
||||
* Base execution status for a step
|
||||
*/
|
||||
public class BaseState {
|
||||
private Date startTime;
|
||||
|
@ -13,6 +13,10 @@ public class BaseState {
|
|||
private Date updateTime;
|
||||
private RundeckWFExecState executionState;
|
||||
|
||||
/**
|
||||
* Time that the execution of this step started
|
||||
* @return
|
||||
*/
|
||||
public Date getStartTime() {
|
||||
return startTime;
|
||||
}
|
||||
|
@ -21,6 +25,10 @@ public class BaseState {
|
|||
this.startTime = startTime;
|
||||
}
|
||||
|
||||
/**
|
||||
* Time that the execution of this step finished, or null if it has not completed
|
||||
* @return
|
||||
*/
|
||||
public Date getEndTime() {
|
||||
return endTime;
|
||||
}
|
||||
|
@ -29,6 +37,10 @@ public class BaseState {
|
|||
this.endTime = endTime;
|
||||
}
|
||||
|
||||
/**
|
||||
* Current state of the execution
|
||||
* @return
|
||||
*/
|
||||
public RundeckWFExecState getExecutionState() {
|
||||
return executionState;
|
||||
}
|
||||
|
@ -37,6 +49,10 @@ public class BaseState {
|
|||
this.executionState = executionState;
|
||||
}
|
||||
|
||||
/**
|
||||
* Time that this state was last updated
|
||||
* @return
|
||||
*/
|
||||
public Date getUpdateTime() {
|
||||
return updateTime;
|
||||
}
|
||||
|
|
|
@ -5,13 +5,17 @@ import java.util.Map;
|
|||
import java.util.Set;
|
||||
|
||||
/**
|
||||
* $INTERFACE is ... User: greg Date: 1/16/14 Time: 5:41 PM
|
||||
* The state of an Execution
|
||||
*/
|
||||
public class RundeckExecutionState extends WorkflowState{
|
||||
private long executionId;
|
||||
private Set<RundeckNodeIdentity> allNodes;
|
||||
private Map<String, List<WorkflowStepContextState>> nodeStates;
|
||||
|
||||
/**
|
||||
* Return the set of all rundeck nodes targetted in this execution
|
||||
* @return
|
||||
*/
|
||||
public Set<RundeckNodeIdentity> getAllNodes() {
|
||||
return allNodes;
|
||||
}
|
||||
|
@ -20,6 +24,10 @@ public class RundeckExecutionState extends WorkflowState{
|
|||
this.allNodes = allNodes;
|
||||
}
|
||||
|
||||
/**
|
||||
* Return the map of node name to step state list
|
||||
* @return
|
||||
*/
|
||||
public Map<String, List<WorkflowStepContextState>> getNodeStates() {
|
||||
return nodeStates;
|
||||
}
|
||||
|
@ -28,6 +36,10 @@ public class RundeckExecutionState extends WorkflowState{
|
|||
this.nodeStates = nodeStates;
|
||||
}
|
||||
|
||||
/**
|
||||
* Return this execution's ID
|
||||
* @return
|
||||
*/
|
||||
public long getExecutionId() {
|
||||
return executionId;
|
||||
}
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
package org.rundeck.api.domain;
|
||||
|
||||
/**
|
||||
* $INTERFACE is ... User: greg Date: 1/17/14 Time: 11:27 AM
|
||||
* An execution state for a workflow or node step
|
||||
*/
|
||||
public enum RundeckWFExecState {
|
||||
/**
|
||||
|
|
|
@ -6,13 +6,17 @@ import java.util.Map;
|
|||
import java.util.Set;
|
||||
|
||||
/**
|
||||
* $INTERFACE is ... User: greg Date: 1/16/14 Time: 5:44 PM
|
||||
* Represents the state of a workflow of steps
|
||||
*/
|
||||
public class WorkflowState extends BaseState{
|
||||
public class WorkflowState extends BaseState {
|
||||
private int stepCount;
|
||||
private Set<RundeckNodeIdentity> targetNodes;
|
||||
private List<WorkflowStepState> steps;
|
||||
|
||||
/**
|
||||
* Return the number of steps in this workflow
|
||||
* @return
|
||||
*/
|
||||
public int getStepCount() {
|
||||
return stepCount;
|
||||
}
|
||||
|
@ -21,6 +25,10 @@ public class WorkflowState extends BaseState{
|
|||
this.stepCount = stepCount;
|
||||
}
|
||||
|
||||
/**
|
||||
* Identify the target nodes of this workflow
|
||||
* @return
|
||||
*/
|
||||
public Set<RundeckNodeIdentity> getTargetNodes() {
|
||||
return targetNodes;
|
||||
}
|
||||
|
@ -29,6 +37,10 @@ public class WorkflowState extends BaseState{
|
|||
this.targetNodes = targetNodes;
|
||||
}
|
||||
|
||||
/**
|
||||
* Return the list of steps for this workflow
|
||||
* @return
|
||||
*/
|
||||
public List<WorkflowStepState> getSteps() {
|
||||
return steps;
|
||||
}
|
||||
|
|
|
@ -7,6 +7,10 @@ public class WorkflowStepContextState extends BaseState {
|
|||
private String stepContextId;
|
||||
private String stepNum;
|
||||
|
||||
/**
|
||||
* The context id for the step in the form "#[/#[/#[...]]]" where "#" is a number
|
||||
* @return
|
||||
*/
|
||||
public String getStepContextId() {
|
||||
return stepContextId;
|
||||
}
|
||||
|
@ -15,6 +19,10 @@ public class WorkflowStepContextState extends BaseState {
|
|||
this.stepContextId = stepContextId;
|
||||
}
|
||||
|
||||
/**
|
||||
* The step number of this step in the current workflow, 1 indexed.
|
||||
* @return
|
||||
*/
|
||||
public String getStepNum() {
|
||||
return stepNum;
|
||||
}
|
||||
|
|
|
@ -4,13 +4,17 @@ import java.util.List;
|
|||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* $INTERFACE is ... User: greg Date: 1/17/14 Time: 12:03 PM
|
||||
* Represents the state of a step in a workflow
|
||||
*/
|
||||
public class WorkflowStepState extends WorkflowStepContextState {
|
||||
private boolean nodeStep;
|
||||
private WorkflowState subWorkflow;
|
||||
private Map<String, WorkflowStepContextState> nodeStates;
|
||||
|
||||
/**
|
||||
* Return true if this step runs on each target node
|
||||
* @return
|
||||
*/
|
||||
public boolean isNodeStep() {
|
||||
return nodeStep;
|
||||
}
|
||||
|
@ -19,6 +23,10 @@ public class WorkflowStepState extends WorkflowStepContextState {
|
|||
this.nodeStep = nodeStep;
|
||||
}
|
||||
|
||||
/**
|
||||
* Return sub workflow if this step has one
|
||||
* @return
|
||||
*/
|
||||
public WorkflowState getSubWorkflow() {
|
||||
return subWorkflow;
|
||||
}
|
||||
|
@ -27,6 +35,10 @@ public class WorkflowStepState extends WorkflowStepContextState {
|
|||
this.subWorkflow = subWorkflow;
|
||||
}
|
||||
|
||||
/**
|
||||
* Return the state of each target node if this step runs on each target node
|
||||
* @return
|
||||
*/
|
||||
public Map<String, WorkflowStepContextState> getNodeStates() {
|
||||
return nodeStates;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue