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.
  • Constructor Details

    • WorkflowModel

      public WorkflowModel(com.fasterxml.jackson.databind.JsonNode rootNode)
      The only constructor
      Parameters:
      rootNode - the root JSON node containing all the info
  • Method Details

    • 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
    • getFieldsMap

      protected Map<String,String> getFieldsMap(com.fasterxml.jackson.databind.JsonNode node)