Class WorkflowModel
- java.lang.Object
-
- com.adobe.cq.testing.client.workflow.WorkflowModel
-
public class WorkflowModel extends Object
A simple wrapper around the JSON representing a workflow model requested from the server.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description classWorkflowModel.NodeSimple inner class wrapping a JSON node defining a model nodeclassWorkflowModel.TransitionSimple inner class wrapping a JSON node defining a transition between nodes
-
Constructor Summary
Constructors Constructor Description WorkflowModel(com.fasterxml.jackson.databind.JsonNode rootNode)The only constructor
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description StringgetDescription()the description of this modelprotected Map<String,String>getFieldsMap(com.fasterxml.jackson.databind.JsonNode node)StringgetId()The id of this modelMapgetMetaData()Any meta data stored in this modelWorkflowModel.NodegetNodeById(String nodeId)Map<String,WorkflowModel.Node>getNodes()Returns a map of all nodes defined in this modelStringgetTitle()The title of this modelArrayList<WorkflowModel.Transition>getTransitions()Returns a list of all transitions defined between the nodes.StringgetVersion()the version of this modelintgetVersionMajor()the major version number, usually 1intgetVersionMinor()the minor version number.
-
-
-
Method Detail
-
getId
public String getId()
The id of this model- Returns:
- the id
-
getTitle
public String getTitle()
The title of this model- Returns:
- the title
-
getDescription
public String getDescription()
the description of this model- Returns:
- the description
-
getVersion
public String getVersion()
the version of this model- Returns:
- the version
-
getVersionMajor
public int getVersionMajor()
the major version number, usually 1- Returns:
- the major version number
-
getVersionMinor
public int getVersionMinor()
the minor version number.- Returns:
- the minor version number
-
getMetaData
public Map getMetaData()
Any meta data stored in this model- Returns:
- Map of metadata, where key is the properties name.
-
getNodes
public Map<String,WorkflowModel.Node> getNodes()
Returns a map of all nodes defined in this model- Returns:
- a map of all nodes where the key is the node id, and the value is a
WorkflowModel.Nodeobject.
-
getNodeById
public WorkflowModel.Node getNodeById(String nodeId)
-
getTransitions
public ArrayList<WorkflowModel.Transition> getTransitions()
Returns a list of all transitions defined between the nodes.- Returns:
- List of
WorkflowModel.Transitionobjects
-
-