psdi.workflow

Class Workflow

  • java.lang.Object
    • psdi.workflow.Workflow
  • All Implemented Interfaces:
    java.io.Serializable


    public class Workflow
    extends java.lang.Object
    implements java.io.Serializable

    This class holds all the data required to display and edit a workflow through the design tool

    See Also:
    Serialized Form
    • Field Summary

      Fields 
      Modifier and Type Field and Description
      protected java.lang.Object documentType
      The document type
      protected java.lang.Object id
      The workflow ID
      static java.lang.String NODE_COL 
      static java.lang.String NODE_ERROR_KEY 
      static java.lang.String NODE_ID 
      static java.lang.String NODE_ROW 
      static java.lang.String NODE_STATE 
      static java.lang.String NODE_TITLE 
      static java.lang.String NODE_TYPE 
      protected java.util.Hashtable nodeIndex
      The node index
      protected java.util.Vector nodes
      The node list
      static java.lang.String REL_FROMID 
      static java.lang.String REL_NEGATIVE 
      static java.lang.String REL_TOID 
      protected java.util.Vector relationships
      The relationship list
      protected java.lang.String title
      The workflow title
      protected boolean validated
      The validated flag
    • Constructor Summary

      Constructors 
      Constructor and Description
      Workflow(java.lang.Object id)
      Constructs a workflow object
    • Field Detail

      • title

        protected java.lang.String title
        The workflow title
      • documentType

        protected java.lang.Object documentType
        The document type
      • validated

        protected boolean validated
        The validated flag
      • id

        protected java.lang.Object id
        The workflow ID
      • nodes

        protected transient java.util.Vector nodes
        The node list
      • relationships

        protected transient java.util.Vector relationships
        The relationship list
      • nodeIndex

        protected transient java.util.Hashtable nodeIndex
        The node index
    • Constructor Detail

      • Workflow

        public Workflow(java.lang.Object id)
        Constructs a workflow object
        Parameters:
        id - The workflow id
    • Method Detail

      • getTitle

        public java.lang.String getTitle()
        Gets the title
        Returns:
        The title
      • setTitle

        public void setTitle(java.lang.String title)
        Sets the title
        Parameters:
        title - The title
      • getDocumentType

        public java.lang.Object getDocumentType()
        Gets the document type
        Returns:
        The document type
      • setDocumentType

        public void setDocumentType(java.lang.Object documentType)
        Sets the document type
        Parameters:
        docuemntType - The document type
      • isValidated

        public boolean isValidated()
        Returns true if the workflow is validated
        Returns:
        The validation state
      • setValidated

        public void setValidated(boolean validated)
        Sets the workflow validation state
        Parameters:
        validated - The validation state
      • getId

        public java.lang.Object getId()
        Gets the workflow ID
        Returns:
        The workflow ID
      • setId

        public void setId(java.lang.Object id)
        Sets the workflow ID
        Parameters:
        The - workflow ID
      • addNode

        public void addNode(WorkflowNode node)
        Adds a workflow node to the workflow
        Parameters:
        node - The workflow node
      • removeAllNodes

        public void removeAllNodes()
        Removes all nodes from the workflow
      • removeNode

        public void removeNode(WorkflowNode node)
        Removes a workflow node from the workflow
        Parameters:
        node - The workflow node
      • getNode

        public WorkflowNode getNode(java.lang.Object nodeID)
        Gets a workflow node by id
        Parameters:
        nodeID - The workflow node's id
        Returns:
        The workflow node
      • getNodes

        public java.util.Vector getNodes()
        Returns all the nodes in the workflow
        Returns:
        The workflow node list
      • addRelationship

        public void addRelationship(WorkflowRelationship relationship)
        Adds a workflow relationship to the workflow
        Parameters:
        node - The workflow relationship
      • removeAllRelationships

        public void removeAllRelationships()
        Removes all relationships from the workflow
      • removeRelationship

        public void removeRelationship(WorkflowRelationship relationship)
        Removes a workflow relationship from the workflow
        Parameters:
        node - The workflow relationship
      • getRelationships

        public java.util.Vector getRelationships()
        Returns all the relationships in the workflow
        Returns:
        The workflow relationship list
      • getRelationships

        public java.util.Vector getRelationships(WorkflowNode node)
        Returns all the relationships in the workflow associated with the node.
        Parameters:
        node - The workflow node
        Returns:
        The workflow relationship list
      • getRowCount

        public int getRowCount()
        Returns the count of the rows in the workflow
        Returns:
        The row count
      • getColumnCount

        public int getColumnCount()
        Returns the count of the columns in the workflow
        Returns:
        The column count
      • getNextNodeId

        public java.lang.Object getNextNodeId()
        Gets the next node ID
        Returns:
        The next node ID
      • getNodeById

        public WorkflowNode getNodeById(java.lang.Object nodeID)
        Gets the node by idID
        Parameters:
        nodeID - The node ID
        Returns:
        The node or null if not found
      • toString

        public java.lang.String toString()
        Returns the string representation of the workflow
        Overrides:
        toString in class java.lang.Object
        Returns:
        The string representation
      • buildFromProperties

        public void buildFromProperties(java.util.Vector nodeList,
                                        java.util.Vector rels)
        Builds the workflow from the node and realtionships expressed as propertry tables
        Parameters:
        nodeList - The list of nodes as property tables
        rels - The list of relationships as property tables
      • getRelationshipsAsProperties

        public java.util.Vector getRelationshipsAsProperties()
        Returns the relationship list as a vector of relationships expressed as properties
        Returns:
        The list of relationships
      • getNodesAsProperties

        public java.util.Vector getNodesAsProperties()
        Returns the node list as a vector of relationships expressed as properties
        Returns:
        The list of nodes