From 6c1f93af49c153e5ac3ed86a9c5e2aedc3478075 Mon Sep 17 00:00:00 2001 From: Greg Schueler Date: Sat, 18 Jan 2014 10:33:12 -0800 Subject: [PATCH] Update javadoc for workflow state domain classes --- .../java/org/rundeck/api/domain/BaseState.java | 18 +++++++++++++++++- .../api/domain/RundeckExecutionState.java | 14 +++++++++++++- .../rundeck/api/domain/RundeckWFExecState.java | 2 +- .../org/rundeck/api/domain/WorkflowState.java | 16 ++++++++++++++-- .../api/domain/WorkflowStepContextState.java | 8 ++++++++ .../rundeck/api/domain/WorkflowStepState.java | 14 +++++++++++++- 6 files changed, 66 insertions(+), 6 deletions(-) diff --git a/src/main/java/org/rundeck/api/domain/BaseState.java b/src/main/java/org/rundeck/api/domain/BaseState.java index 7c7c146..f97fa23 100644 --- a/src/main/java/org/rundeck/api/domain/BaseState.java +++ b/src/main/java/org/rundeck/api/domain/BaseState.java @@ -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; } diff --git a/src/main/java/org/rundeck/api/domain/RundeckExecutionState.java b/src/main/java/org/rundeck/api/domain/RundeckExecutionState.java index 139a76d..518a1d8 100644 --- a/src/main/java/org/rundeck/api/domain/RundeckExecutionState.java +++ b/src/main/java/org/rundeck/api/domain/RundeckExecutionState.java @@ -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 allNodes; private Map> nodeStates; + /** + * Return the set of all rundeck nodes targetted in this execution + * @return + */ public Set 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> 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; } diff --git a/src/main/java/org/rundeck/api/domain/RundeckWFExecState.java b/src/main/java/org/rundeck/api/domain/RundeckWFExecState.java index f15f8ea..86b0466 100644 --- a/src/main/java/org/rundeck/api/domain/RundeckWFExecState.java +++ b/src/main/java/org/rundeck/api/domain/RundeckWFExecState.java @@ -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 { /** diff --git a/src/main/java/org/rundeck/api/domain/WorkflowState.java b/src/main/java/org/rundeck/api/domain/WorkflowState.java index 753ecab..3ce17a2 100644 --- a/src/main/java/org/rundeck/api/domain/WorkflowState.java +++ b/src/main/java/org/rundeck/api/domain/WorkflowState.java @@ -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 targetNodes; private List 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 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 getSteps() { return steps; } diff --git a/src/main/java/org/rundeck/api/domain/WorkflowStepContextState.java b/src/main/java/org/rundeck/api/domain/WorkflowStepContextState.java index 3bebc05..e54ab7d 100644 --- a/src/main/java/org/rundeck/api/domain/WorkflowStepContextState.java +++ b/src/main/java/org/rundeck/api/domain/WorkflowStepContextState.java @@ -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; } diff --git a/src/main/java/org/rundeck/api/domain/WorkflowStepState.java b/src/main/java/org/rundeck/api/domain/WorkflowStepState.java index b7e6306..49a8d93 100644 --- a/src/main/java/org/rundeck/api/domain/WorkflowStepState.java +++ b/src/main/java/org/rundeck/api/domain/WorkflowStepState.java @@ -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 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 getNodeStates() { return nodeStates; }