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 class
WorkflowModel.Node
Simple inner class wrapping a JSON node defining a model nodeclass
WorkflowModel.Transition
Simple 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 String
getDescription()
the description of this modelprotected Map<String,String>
getFieldsMap(com.fasterxml.jackson.databind.JsonNode node)
String
getId()
The id of this modelMap
getMetaData()
Any meta data stored in this modelWorkflowModel.Node
getNodeById(String nodeId)
Map<String,WorkflowModel.Node>
getNodes()
Returns a map of all nodes defined in this modelString
getTitle()
The title of this modelArrayList<WorkflowModel.Transition>
getTransitions()
Returns a list of all transitions defined between the nodes.String
getVersion()
the version of this modelint
getVersionMajor()
the major version number, usually 1int
getVersionMinor()
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.Node
object.
-
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.Transition
objects
-
-