Package io.nflow.engine.workflow.curated
Class State
- java.lang.Object
-
- io.nflow.engine.model.ModelObject
-
- io.nflow.engine.workflow.curated.State
-
- All Implemented Interfaces:
WorkflowState
public class State extends ModelObject implements WorkflowState
A simple implementation of the WorkflowState interface that can be used in any workflow definition, if more advanced implementation is not needed.
-
-
Constructor Summary
Constructors Constructor Description State(String name)Creates a workflow state with given name and typenormal.State(String name, WorkflowStateType type)Creates a workflow state with given name and type.State(String name, WorkflowStateType type, String description)Creates a workflow state with given name, description and type.State(String name, String description)Creates a workflow state with given name and description and typenormal.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description StringgetDescription()Return the description of the workflow state.WorkflowStateTypegetType()Return the workflow state type.Stringname()Return the name of the workflow state.-
Methods inherited from class io.nflow.engine.model.ModelObject
equals, hashCode, toString
-
-
-
-
Constructor Detail
-
State
public State(String name)
Creates a workflow state with given name and typenormal. The name is also used as the description of the state.- Parameters:
name- The name of the state.
-
State
public State(String name, WorkflowStateType type)
Creates a workflow state with given name and type. The name is also used as the description of the state.- Parameters:
name- The name of the state.type- The workflow state type.
-
State
public State(String name, String description)
Creates a workflow state with given name and description and typenormal.- Parameters:
name- The name of the state.description- The longer description of the state.
-
State
public State(String name, WorkflowStateType type, String description)
Creates a workflow state with given name, description and type.- Parameters:
name- The name of the state.type- The workflow state type.description- The longer description of the state.
-
-
Method Detail
-
name
public String name()
Description copied from interface:WorkflowStateReturn the name of the workflow state.- Specified by:
namein interfaceWorkflowState- Returns:
- The name.
-
getType
public WorkflowStateType getType()
Description copied from interface:WorkflowStateReturn the workflow state type.- Specified by:
getTypein interfaceWorkflowState- Returns:
- The workflow state type.
-
getDescription
public String getDescription()
Description copied from interface:WorkflowStateReturn the description of the workflow state. Default implementation returnsWorkflowState.name().- Specified by:
getDescriptionin interfaceWorkflowState- Returns:
- The description.
-
-