Package com.day.cq.workflow.model
Interface WorkflowModel
-
- All Superinterfaces:
HasMetaData
public interface WorkflowModel extends HasMetaData
WorkflowModelrepresents a model/definition of a workflow. It provides methods for retrieving the entities of the model likes andWorkflowNodes 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 WorkflowNodecreateNode()Creates and returns aWorkflowNodeWorkflowNodecreateNode(String title, String type, String description)Creates and returns aWorkflowNodeWorkflowTransitioncreateTransition()Creates and returns aWorkflowTransitionWorkflowTransitioncreateTransition(WorkflowNode from, WorkflowNode to, String rule)Creates and returns aWorkflowTransitionStringgetDescription()Returns the description of theWorkflowModel.WorkflowNodegetEndNode()Returns the end.WorkflowNodeStringgetId()Returns the ID of theWorkflowModel.WorkflowNodegetNode(String id)Returns thewith the given idWorkflowNodeList<WorkflowNode>getNodes()Returns the list ofs contained by theWorkflowNodeWorkflowModel.WorkflowNodegetRootNode()Returns the root/start.WorkflowNodeStringgetTitle()Returns the title of theWorkflowModel.List<WorkflowTransition>getTransitions()Returns the list ofs contained by theWorkflowTransitionWorkflowModel.StringgetVersion()Returns the version of theWorkflowModel.voidsetDescription(String description)Sets the description of theWorkflowModel.voidsetEndNode(WorkflowNode node)Sets the end node of theWorkflowModel.voidsetRootNode(WorkflowNode node)Sets the root node of theWorkflowModel.voidsetTitle(String title)Sets the title of theWorkflowModel.voidvalidate()Validates the model.-
Methods inherited from interface com.day.cq.workflow.HasMetaData
getMetaData, getMetaDataMap
-
-
-
-
Method Detail
-
getId
String getId()
Returns the ID of theWorkflowModel.- Returns:
- The ID of the
WorkflowModel.
-
getTitle
String getTitle()
Returns the title of theWorkflowModel.- Returns:
- The title of the
WorkflowModel.
-
setTitle
void setTitle(String title)
Sets the title of theWorkflowModel.- Parameters:
title- The new title of theWorkflowModel.
-
getDescription
String getDescription()
Returns the description of theWorkflowModel.- Returns:
- The description of the
WorkflowModel.
-
setDescription
void setDescription(String description)
Sets the description of theWorkflowModel.- Parameters:
description- The new description of theWorkflowModel.
-
getVersion
String getVersion()
Returns the version of theWorkflowModel.- Returns:
- The version of the
WorkflowModel.
-
getNodes
List<WorkflowNode> getNodes()
Returns the list ofs contained by theWorkflowNodeWorkflowModel.- Returns:
- The list of
s of theWorkflowNodeWorkflowModel.
-
createNode
WorkflowNode createNode()
Creates and returns aWorkflowNode- Returns:
- The
createdWorkflowNode
-
createNode
WorkflowNode createNode(String title, String type, 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(String id)
Returns thewith the given idWorkflowNode- Parameters:
id- The ID of the.WorkflowNode- Returns:
- The
WorkflowNodeor 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
List<WorkflowTransition> getTransitions()
Returns the list ofs contained by theWorkflowTransitionWorkflowModel.- Returns:
- The list of
s of theWorkflowTransitionWorkflowModel.
-
createTransition
WorkflowTransition createTransition()
Creates and returns aWorkflowTransition- Returns:
- The
createdWorkflowTransition
-
createTransition
WorkflowTransition createTransition(WorkflowNode from, WorkflowNode to, String rule)
Creates and returns aWorkflowTransition- Parameters:
from- The from rangeWorkflowNodeto- The to rangeWorkflowNoderule- The ruleString- Returns:
- The
createdWorkflowTransition
-
validate
void validate() throws ValidationExceptionValidates the model.- Throws:
ValidationException-in case an error occursValidationException
-
-