Package com.adobe.granite.workflow.model
Interface WorkflowModel
-
- All Superinterfaces:
HasMetaData
@ProviderType 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()WorkflowNodecreateNode(java.lang.String title, java.lang.String type, java.lang.String description)WorkflowTransitioncreateTransition()WorkflowTransitioncreateTransition(WorkflowNode from, WorkflowNode to, java.lang.String rule)VariableTemplatecreateVariableTemplate(java.lang.String name, java.lang.String dataType)java.lang.StringgetDescription()Returns the description of theWorkflowModel.WorkflowNodegetEndNode()Returns the end.WorkflowNodejava.lang.StringgetId()Returns the ID of theWorkflowModel.WorkflowNodegetNode(java.lang.String id)Returns thewith the given idWorkflowNodejava.util.List<WorkflowNode>getNodes()Returns the list ofs contained by theWorkflowNodeWorkflowModel.WorkflowNodegetRootNode()Returns the root/start.WorkflowNodejava.lang.StringgetTitle()Returns the title of theWorkflowModel.java.util.List<WorkflowTransition>getTransitions()Returns the list ofs contained by theWorkflowTransitionWorkflowModel.java.util.Map<java.lang.String,VariableTemplate>getVariableTemplates()java.lang.StringgetVersion()Returns the version of theWorkflowModel.voidsetDescription(java.lang.String description)Sets the description of theWorkflowModel.voidsetEndNode(WorkflowNode node)voidsetRootNode(WorkflowNode node)voidsetTitle(java.lang.String title)Sets the title of theWorkflowModel.voidvalidate()Validates the model.-
Methods inherited from interface com.adobe.granite.workflow.HasMetaData
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 ofs contained by theWorkflowNodeWorkflowModel.- Returns:
- The list of
s of theWorkflowNodeWorkflowModel.
-
createNode
WorkflowNode createNode()
- Returns:
- the created workflow node
-
createNode
WorkflowNode createNode(java.lang.String title, java.lang.String type, java.lang.String description)
- Parameters:
title- the titletype- the typedescription- the description- Returns:
- the created workflow node
-
setRootNode
void setRootNode(WorkflowNode node)
- Parameters:
node- the workflow node
-
setEndNode
void setEndNode(WorkflowNode node)
- Parameters:
node- the workflow node
-
getNode
WorkflowNode getNode(java.lang.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
java.util.List<WorkflowTransition> getTransitions()
Returns the list ofs contained by theWorkflowTransitionWorkflowModel.- Returns:
- The list of
s of theWorkflowTransitionWorkflowModel.
-
createTransition
WorkflowTransition createTransition()
- Returns:
- the created workflow transition
-
createTransition
WorkflowTransition createTransition(WorkflowNode from, WorkflowNode to, java.lang.String rule)
- Parameters:
from- the workflow node to begin the transition withto- the workflow node to end the transition withrule- the rule- Returns:
- the created workflow transition
-
validate
void validate() throws ValidationExceptionValidates the model.- Throws:
ValidationException- in case the validation fails
-
getVariableTemplates
java.util.Map<java.lang.String,VariableTemplate> getVariableTemplates()
- Returns:
- a
Mapwith keys as variables' names and values ass .VariableTemplate
-
createVariableTemplate
VariableTemplate createVariableTemplate(java.lang.String name, java.lang.String dataType)
- Parameters:
name- the name of the variabledataType- the type of the variable in java fully qualified class name format- Returns:
- the created variable template
-
-