Package com.day.cq.workflow.model
Interface WorkflowModel
- All Superinterfaces:
HasMetaData
WorkflowModel represents a model/definition of a workflow.
It provides methods for retrieving the entities of the model like
WorkflowNodes and
WorkflowTransitions as well as common model attributes
like name, description or version.-
Method Summary
Modifier and TypeMethodDescriptionCreates and returns aWorkflowNodecreateNode(String title, String type, String description) Creates and returns aWorkflowNodeCreates and returns aWorkflowTransitioncreateTransition(WorkflowNode from, WorkflowNode to, String rule) Creates and returns aWorkflowTransitionReturns the description of theWorkflowModel.Returns the end.WorkflowNodegetId()Returns the ID of theWorkflowModel.Returns thewith the given idWorkflowNodegetNodes()Returns the list ofs contained by theWorkflowNodeWorkflowModel.Returns the root/start.WorkflowNodegetTitle()Returns the title of theWorkflowModel.Returns the list ofs contained by theWorkflowTransitionWorkflowModel.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.voidSets the title of theWorkflowModel.voidvalidate()Validates the model.Methods inherited from interface com.day.cq.workflow.HasMetaData
getMetaData, getMetaDataMap
-
Method Details
-
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
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
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
Creates and returns aWorkflowNode- Parameters:
title- Title of node createdtype- Type of node createddescription- Description of node created- Returns:
- The
createdWorkflowNode
-
setRootNode
Sets the root node of theWorkflowModel.- Parameters:
node- The root node of theWorkflowModel.
-
setEndNode
Sets the end node of theWorkflowModel.- Parameters:
node- The end node of theWorkflowModel.
-
getNode
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
Creates and returns aWorkflowTransition- Parameters:
from- The from rangeWorkflowNodeto- The to rangeWorkflowNoderule- The ruleString- Returns:
- The
createdWorkflowTransition
-
validate
Validates the model.- Throws:
ValidationException-in case an error occursValidationException
-