Package com.comalatech.workflow.template
Interface LinkedTemplateManager
public interface LinkedTemplateManager
Manages the links between global templates and spaces workflows which enable
global workflows to exist on multiple spaces.
-
Method Summary
Modifier and TypeMethodDescriptionvoid
addSpaceLabelLink
(String label, String templateName) Add a link between a label (space category) and the given global workflow template name.void
addTemplateLink
(String spaceKey, String templateName) Links a global template to a space, the workflow will be applied to all pages in the space.Returns the global workflow template names that are linked to a specific space label.getLinkedLabelTemplates
(String label) Returns the global workflows that are linked to a specific space label.getLinkedSpaceLabels
(String templateName) Returns the labels (space categories) that are linked to a given global workflow template name.getLinkedSpaces
(String templateName) Get the spaces that are linked to a global templateList<com.atlassian.confluence.spaces.Space>
getLinkedSpacesList
(String templateName) Get the spaces that are linked to a global templategetLinkedTemplateNames
(String spaceKey) Get the names of the global workflow templates that are linked to a spacegetLinkedTemplates
(String spaceKey) Get the global workflow templates that are linked to a space.boolean
Returns true if the given space and global workflow template are linked.void
removeSpaceLabelLink
(String label, String templateName) Remove the link between label (space category) and the given global workflow template name.void
removeTemplateLink
(String spaceKey, String templateName) Remove a global template link from a space
-
Method Details
-
addTemplateLink
Links a global template to a space, the workflow will be applied to all pages in the space. Note, linking the template will not automatically initialise existing pages for things like initial assignees and due dates.- Parameters:
spaceKey
- the space to add the global workflow totemplateName
- the global template to add
-
removeTemplateLink
Remove a global template link from a space- Parameters:
spaceKey
- the space to remove the template link fromtemplateName
- the global template to remove
-
getLinkedTemplates
Get the global workflow templates that are linked to a space.- Parameters:
spaceKey
-- Returns:
- List of global templates that are linked to the given space
-
getLinkedTemplateNames
Get the names of the global workflow templates that are linked to a space- Parameters:
spaceKey
-- Returns:
- list of the names of global templates that are linked to the given space.
-
getLinkedSpaces
Get the spaces that are linked to a global template- Parameters:
templateName
- the global template to get the linked spaces for- Returns:
- a list of space keys that are linked to the given template
-
getLinkedSpacesList
Get the spaces that are linked to a global template- Parameters:
templateName
-- Returns:
- a list of spaces that are linked to the given template
-
isLinked
Returns true if the given space and global workflow template are linked.- Parameters:
spaceKey
-templateName
-- Returns:
- true and the given space and global template are linked, otherwise false
-
addSpaceLabelLink
Add a link between a label (space category) and the given global workflow template name. Blueprint spaces with the associate label will be linked with the global workflow on space creation.- Parameters:
label
-templateName
-
-
removeSpaceLabelLink
Remove the link between label (space category) and the given global workflow template name.- Parameters:
label
-templateName
-
-
getLinkedSpaceLabels
Returns the labels (space categories) that are linked to a given global workflow template name.- Parameters:
templateName
-- Returns:
-
getLinkedLabelTemplateNames
Returns the global workflow template names that are linked to a specific space label.- Parameters:
label
-- Returns:
-
getLinkedLabelTemplates
Returns the global workflows that are linked to a specific space label.- Parameters:
label
-- Returns:
-