Package org.opencastproject.workflow.api
Interface WorkflowDefinition
- All Superinterfaces:
Comparable<WorkflowDefinition>
- All Known Implementing Classes:
WorkflowDefinitionImpl
A workflow definition.
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final StringThe variable in a workflow definition that is to be replaced by the reason for an operation's failure. -
Method Summary
Modifier and TypeMethodDescriptionvoidadd(WorkflowOperationDefinition operation) Appends the operation to the workflow definition.voidadd(WorkflowOperationDefinition operation, int position) Inserts the operation at the given position into the workflow definition.voidTags the workflow definition with the given tag.voidRemoves all tags associated with this workflow definitionbooleancontainsTag(String tag) Returnstrueif the workflow definition contains the given tag.booleancontainsTag(Collection<String> tags) Returnstrueif the workflow definition contains at least one of the given tags.get(int position) Returns the operation at the given position.A XML String describing the configuration parameter/panel for this WorkflowDefinition.A JSON String describing the configuration parameter/panel for this WorkflowDefinition.A longer description of this workflow definitionintAn integer describing the display order for this workflow definition.getId()The short title of this workflow definitionThe operations, listed in order, that this workflow definition includes.Gets the organization associated with this workflow (ornull, if it's global)getRoles()Returns the roles for this workflow definitionThe custom state mappings to use for this workflow.String[]getTags()Returns the tags for this workflow definition or an empty array if there are no tags.getTitle()The title for this workflow definitionremove(int position) Removes the workflow operation at the indicated position and returns it.voidRemoves the tag from the workflow definition.voidsetDescription(String description) Sets the descriptionvoidsetDisplayOrder(int displayOrder) Set the display ordervoidSets the identifiervoidSets the titleMethods inherited from interface java.lang.Comparable
compareTo
-
Field Details
-
FAILURE_KEY
The variable in a workflow definition that is to be replaced by the reason for an operation's failure.- See Also:
-
-
Method Details
-
getId
String getId()The short title of this workflow definition -
setId
Sets the identifier- Parameters:
id- the workflow definition identifier
-
getTitle
String getTitle()The title for this workflow definition -
setTitle
Sets the title- Parameters:
title- the workflow definition title
-
getDescription
String getDescription()A longer description of this workflow definition -
setDescription
Sets the description- Parameters:
description- the workflow definition description
-
getConfigurationPanel
String getConfigurationPanel()A XML String describing the configuration parameter/panel for this WorkflowDefinition. -
getConfigurationPanelJson
String getConfigurationPanelJson()A JSON String describing the configuration parameter/panel for this WorkflowDefinition. -
getDisplayOrder
int getDisplayOrder()An integer describing the display order for this workflow definition. The display order is supposed to define the order workflow lists as displayed to users. Default is 0. -
setDisplayOrder
void setDisplayOrder(int displayOrder) Set the display order- Parameters:
displayOrder- the workflow definition display order
-
getOperations
List<WorkflowOperationDefinition> getOperations()The operations, listed in order, that this workflow definition includes. -
getStateMappings
Set<WorkflowStateMapping> getStateMappings()The custom state mappings to use for this workflow. -
addTag
Tags the workflow definition with the given tag.- Parameters:
tag- the tag
-
removeTag
Removes the tag from the workflow definition.- Parameters:
tag- the tag
-
containsTag
Returnstrueif the workflow definition contains the given tag.- Parameters:
tag- the tag- Returns:
trueif the element is tagged
-
containsTag
Returnstrueif the workflow definition contains at least one of the given tags. If there are no tags contained in the set, then the definition is considered to match as well.- Parameters:
tags- the set of tag- Returns:
trueif the element is tagged accordingly
-
getTags
String[] getTags()Returns the tags for this workflow definition or an empty array if there are no tags.- Returns:
- the tags
-
getRoles
Collection<String> getRoles()Returns the roles for this workflow definition- Returns:
- the tags
-
clearTags
void clearTags()Removes all tags associated with this workflow definition -
getOrganization
String getOrganization()Gets the organization associated with this workflow (ornull, if it's global)- Returns:
- the organization
-
add
Appends the operation to the workflow definition.- Parameters:
operation- the operation
-
add
Inserts the operation at the given position into the workflow definition.- Parameters:
operation- the operationposition- the position to add the workflow operation to- Throws:
IndexOutOfBoundsException- ifpositionis larger than the number of operations + 1
-
get
Returns the operation at the given position.- Parameters:
position- the operation's position- Throws:
IndexOutOfBoundsException- ifpositionis larger than the number of operations
-
remove
Removes the workflow operation at the indicated position and returns it.- Parameters:
position- the operation's position- Returns:
- the removed workflow operation
- Throws:
IndexOutOfBoundsException- ifpositionis larger than the number of operations
-