Package com.day.cq.workflow.model
Interface WorkflowModel
-
- All Superinterfaces:
HasMetaData
public interface WorkflowModel extends HasMetaData
WorkflowModel
represents a model/definition of a workflow. It provides methods for retrieving the entities of the model like
s andWorkflowNode
s as well as common model attributes like name, description or version.WorkflowTransition
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description WorkflowNode
createNode()
Creates and returns aWorkflowNode
WorkflowNode
createNode(java.lang.String title, java.lang.String type, java.lang.String description)
Creates and returns aWorkflowNode
WorkflowTransition
createTransition()
Creates and returns aWorkflowTransition
WorkflowTransition
createTransition(WorkflowNode from, WorkflowNode to, java.lang.String rule)
Creates and returns aWorkflowTransition
java.lang.String
getDescription()
Returns the description of theWorkflowModel
.WorkflowNode
getEndNode()
Returns the end
.WorkflowNode
java.lang.String
getId()
Returns the ID of theWorkflowModel
.WorkflowNode
getNode(java.lang.String id)
Returns the
with the given idWorkflowNode
java.util.List<WorkflowNode>
getNodes()
Returns the list of
s contained by theWorkflowNode
WorkflowModel
.WorkflowNode
getRootNode()
Returns the root/start
.WorkflowNode
java.lang.String
getTitle()
Returns the title of theWorkflowModel
.java.util.List<WorkflowTransition>
getTransitions()
Returns the list of
s contained by theWorkflowTransition
WorkflowModel
.java.lang.String
getVersion()
Returns the version of theWorkflowModel
.void
setDescription(java.lang.String description)
Sets the description of theWorkflowModel
.void
setEndNode(WorkflowNode node)
Sets the end node of theWorkflowModel
.void
setRootNode(WorkflowNode node)
Sets the root node of theWorkflowModel
.void
setTitle(java.lang.String title)
Sets the title of theWorkflowModel
.void
validate()
Validates the model.-
Methods inherited from interface com.day.cq.workflow.HasMetaData
getMetaData, getMetaDataMap
-
-
-
-
Method Detail
-
getId
java.lang.String getId()
Returns the ID of theWorkflowModel
.- Returns:
- The ID of the
WorkflowModel
.
-
getTitle
java.lang.String getTitle()
Returns the title of theWorkflowModel
.- Returns:
- The title of the
WorkflowModel
.
-
setTitle
void setTitle(java.lang.String title)
Sets the title of theWorkflowModel
.- Parameters:
title
- The new title of theWorkflowModel
.
-
getDescription
java.lang.String getDescription()
Returns the description of theWorkflowModel
.- Returns:
- The description of the
WorkflowModel
.
-
setDescription
void setDescription(java.lang.String description)
Sets the description of theWorkflowModel
.- Parameters:
description
- The new description of theWorkflowModel
.
-
getVersion
java.lang.String getVersion()
Returns the version of theWorkflowModel
.- Returns:
- The version of the
WorkflowModel
.
-
getNodes
java.util.List<WorkflowNode> getNodes()
Returns the list of
s contained by theWorkflowNode
WorkflowModel
.- Returns:
- The list of
s of theWorkflowNode
WorkflowModel
.
-
createNode
WorkflowNode createNode()
Creates and returns aWorkflowNode
- Returns:
- The
createdWorkflowNode
-
createNode
WorkflowNode createNode(java.lang.String title, java.lang.String type, java.lang.String description)
Creates and returns aWorkflowNode
- Parameters:
title
- Title of node createdtype
- Type of node createddescription
- Description of node created- Returns:
- The
createdWorkflowNode
-
setRootNode
void setRootNode(WorkflowNode node)
Sets the root node of theWorkflowModel
.- Parameters:
node
- The root node of theWorkflowModel
.
-
setEndNode
void setEndNode(WorkflowNode node)
Sets the end node of theWorkflowModel
.- Parameters:
node
- The end node of theWorkflowModel
.
-
getNode
WorkflowNode getNode(java.lang.String id)
Returns the
with the given idWorkflowNode
- Parameters:
id
- The ID of the
.WorkflowNode
- Returns:
- The
WorkflowNode
or null if not found.
-
getRootNode
WorkflowNode getRootNode()
Returns the root/start
.WorkflowNode
- Returns:
- The root
.WorkflowNode
-
getEndNode
WorkflowNode getEndNode()
Returns the end
.WorkflowNode
- Returns:
- The end
.WorkflowNode
-
getTransitions
java.util.List<WorkflowTransition> getTransitions()
Returns the list of
s contained by theWorkflowTransition
WorkflowModel
.- Returns:
- The list of
s of theWorkflowTransition
WorkflowModel
.
-
createTransition
WorkflowTransition createTransition()
Creates and returns aWorkflowTransition
- Returns:
- The
createdWorkflowTransition
-
createTransition
WorkflowTransition createTransition(WorkflowNode from, WorkflowNode to, java.lang.String rule)
Creates and returns aWorkflowTransition
- Parameters:
from
- The from rangeWorkflowNode
to
- The to rangeWorkflowNode
rule
- The ruleString
- Returns:
- The
createdWorkflowTransition
-
validate
void validate() throws ValidationException
Validates the model.- Throws:
ValidationException
-
in case an error occursValidationException
-
-