Package com.comalatech.workflow
Interface WorkflowService
-
public interface WorkflowService
Provides services for manipulating workflows
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.String
CUSTOM_THEME_HTML_FOOTER
static java.lang.String
CUSTOM_THEME_HTML_HEADER
static java.lang.String
CUSTOM_THEME_HTML_MENU
-
Method Summary
All Methods Instance Methods Abstract Methods Deprecated Methods Modifier and Type Method Description void
activateSpaceWorkflow(com.atlassian.confluence.spaces.Space space, java.lang.String workflowName)
Activate the given space workflowvoid
addWorkflowTemplate(com.atlassian.confluence.spaces.Space space, java.lang.String workflowMarkup)
Deprecated.void
deactivateSpaceWorflow(com.atlassian.confluence.spaces.Space space, java.lang.String workflowName)
Deactivate the given space workflow.java.util.List<Workflow>
getActiveWorkflows(com.atlassian.confluence.core.ContentEntityObject content)
returns the workflow that is active on the given Content Object (Page, BlogPost)java.lang.String
getCustomThemeWorkflowHtml(com.atlassian.confluence.core.ContentEntityObject content)
Deprecated.java.lang.String
getVersion()
Retrieves the version of Ad hoc WorkflowsWorkflow
getWorkflow(com.atlassian.confluence.core.ContentEntityObject content)
Returns the workflow that is set on a content object (Page, Blogpost).Workflow
getWorkflow(com.atlassian.confluence.spaces.Space space, java.lang.String workflowName)
Returns the space workflow with the given name.java.util.Map<java.lang.String,java.lang.String>
getWorkflowHtmlElements(com.atlassian.confluence.core.ContentEntityObject content)
Provides the html content to include in a page to allow the Workflow menu and other items to be displayed in a custom theme.java.util.Map<java.lang.String,java.lang.String>
getWorkflowHtmlElements(com.atlassian.confluence.core.ContentEntityObject content, boolean publishedVersion)
Provides the html content to include in a page to allow the Workflow menu and other items to be displayed in a custom theme.java.util.List<Workflow>
getWorkflows(com.atlassian.confluence.spaces.Space space)
Returns the workflows for the given space.java.util.List<Workflow>
getWorkflowTemplates()
Deprecated.from 1.3 useWorkflowTemplateManager.getWorkflowTemplates()
java.util.List<Workflow>
getWorkflowTemplates(com.atlassian.confluence.spaces.Space space)
Deprecated.from 1.3 useWorkflowTemplateManager.getWorkflowTemplates(Space)
Workflow
loadWorkflow(com.atlassian.confluence.core.ContentEntityObject content, java.lang.String workflowMarkup)
Loads the given workflowMarkup into the contentWorkflow
loadWorkflow(com.atlassian.confluence.spaces.Space space, java.lang.String workflowMarkup)
Loads the given workflowMarkup as a space workflow.void
removeWorkflow(com.atlassian.confluence.core.ContentEntityObject content)
Removes the workflow from a given content objectvoid
removeWorkflow(com.atlassian.confluence.spaces.Space space, java.lang.String workflowName)
Removes the given workflow from a spacevoid
removeWorkflowTemplate(com.atlassian.confluence.spaces.Space space, java.lang.String workflowName)
Deprecated.
-
-
-
Field Detail
-
CUSTOM_THEME_HTML_MENU
static final java.lang.String CUSTOM_THEME_HTML_MENU
- See Also:
- Constant Field Values
-
CUSTOM_THEME_HTML_HEADER
static final java.lang.String CUSTOM_THEME_HTML_HEADER
- See Also:
- Constant Field Values
-
CUSTOM_THEME_HTML_FOOTER
static final java.lang.String CUSTOM_THEME_HTML_FOOTER
- See Also:
- Constant Field Values
-
-
Method Detail
-
getVersion
java.lang.String getVersion()
Retrieves the version of Ad hoc Workflows- Returns:
- the version number
-
loadWorkflow
Workflow loadWorkflow(com.atlassian.confluence.core.ContentEntityObject content, java.lang.String workflowMarkup) throws WorkflowException
Loads the given workflowMarkup into the content- Parameters:
content
- the content objectworkflowMarkup
- the workflow markup- Returns:
- the workflow
- Throws:
WorkflowException
- if the markup provided is not valid, or if there is a problem loading the workflow to the content
-
loadWorkflow
Workflow loadWorkflow(com.atlassian.confluence.spaces.Space space, java.lang.String workflowMarkup) throws WorkflowException
Loads the given workflowMarkup as a space workflow.- Parameters:
space
- the space to add the workflow toworkflowMarkup
- the workflow markup- Returns:
- the workflow
- Throws:
WorkflowException
- if the markup provided is not valid, or if there is a problem loading the workflow to the space
-
removeWorkflow
void removeWorkflow(com.atlassian.confluence.core.ContentEntityObject content)
Removes the workflow from a given content object- Parameters:
content
- the content object to remove the workflow from
-
removeWorkflow
void removeWorkflow(com.atlassian.confluence.spaces.Space space, java.lang.String workflowName)
Removes the given workflow from a space- Parameters:
space
- the space to remove the workflow fromworkflowName
- the name of the workflow to be removed
-
getWorkflow
Workflow getWorkflow(com.atlassian.confluence.core.ContentEntityObject content)
Returns the workflow that is set on a content object (Page, Blogpost). If there is no workflow set on the given content object null will be returned. Note a content workflow may not be set on a content object, but it may still be subject to a space wide workflow. SeegetActiveWorkflows(ContentEntityObject)
for all applicable workflows on a content object.- Parameters:
content
- the content to get the workflow for- Returns:
- The Workflow for the given content or null if no workflow is set.
-
getActiveWorkflows
java.util.List<Workflow> getActiveWorkflows(com.atlassian.confluence.core.ContentEntityObject content)
returns the workflow that is active on the given Content Object (Page, BlogPost)- Parameters:
content
-- Returns:
- the list of Workflows that apply to the given content.
-
getWorkflow
Workflow getWorkflow(com.atlassian.confluence.spaces.Space space, java.lang.String workflowName)
Returns the space workflow with the given name.- Parameters:
space
- the space where the workflow is setworkflowName
- the name of the workflow to return- Returns:
- the workflow with the given name on the given space, or null if there is no workflow with the given name.
-
getWorkflows
java.util.List<Workflow> getWorkflows(com.atlassian.confluence.spaces.Space space)
Returns the workflows for the given space.- Parameters:
space
-- Returns:
- a list of space workflows that are set on the given space.
-
activateSpaceWorkflow
void activateSpaceWorkflow(com.atlassian.confluence.spaces.Space space, java.lang.String workflowName)
Activate the given space workflow- Parameters:
space
-workflowName
- the name of the workflow to activate.
-
deactivateSpaceWorflow
void deactivateSpaceWorflow(com.atlassian.confluence.spaces.Space space, java.lang.String workflowName)
Deactivate the given space workflow.- Parameters:
space
-workflowName
- the name of the workflow to deactivate.
-
getWorkflowTemplates
java.util.List<Workflow> getWorkflowTemplates()
Deprecated.from 1.3 useWorkflowTemplateManager.getWorkflowTemplates()
Returns the global workflow templates- Returns:
- a list of workflows templates that are set globally
-
getWorkflowTemplates
java.util.List<Workflow> getWorkflowTemplates(com.atlassian.confluence.spaces.Space space)
Deprecated.from 1.3 useWorkflowTemplateManager.getWorkflowTemplates(Space)
Returns the workflow templates for a given space- Parameters:
space
- the space to get the workflow templates for- Returns:
- a list of workflow templates that are set on the given space.
-
addWorkflowTemplate
void addWorkflowTemplate(com.atlassian.confluence.spaces.Space space, java.lang.String workflowMarkup) throws WorkflowException
Deprecated.Adds a workflow template to a space- Parameters:
space
- the space to add the workflow template toworkflowMarkup
- the workflow markup to add- Throws:
WorkflowException
- if there was an error with the workflow markup
-
removeWorkflowTemplate
void removeWorkflowTemplate(com.atlassian.confluence.spaces.Space space, java.lang.String workflowName)
Deprecated.Removes a workflow template from a space.- Parameters:
space
- the space to remove the workflow template fromworkflowName
- the name of the workflow to remove
-
getCustomThemeWorkflowHtml
java.lang.String getCustomThemeWorkflowHtml(com.atlassian.confluence.core.ContentEntityObject content)
Deprecated.Provides the html content to include in a page to allow the Workflow menu to work. This content is normally included in the viewpage action by default, this method is only required if you have another custom plugin that overrides the view page action, or a custom theme that bypasses it completely. The custom theme/action still needs to include the workflow webitems in the appropriate location.- Parameters:
content
- the page to get the custom html for- Returns:
- html content that will allow the workflow menu to work
-
getWorkflowHtmlElements
java.util.Map<java.lang.String,java.lang.String> getWorkflowHtmlElements(com.atlassian.confluence.core.ContentEntityObject content)
Provides the html content to include in a page to allow the Workflow menu and other items to be displayed in a custom theme. This content is normally included in the viewpage action by default, this method is only required if you have another custom plugin that overrides the view page action, or a custom theme that bypasses it completely. The custom theme/action still needs to include the workflow webitems in the appropriate location. This method will return the status of the most recent version of the page, equivalent to callinggetWorkflowHtmlElements(ContentEntityObject, boolean)
with the false param.- Parameters:
content
-- Returns:
- Returns a map containing html display elements for the given page. See the static final variables prefixed with CUSTOM_THEME_HTML for valid key values.
-
getWorkflowHtmlElements
java.util.Map<java.lang.String,java.lang.String> getWorkflowHtmlElements(com.atlassian.confluence.core.ContentEntityObject content, boolean publishedVersion)
Provides the html content to include in a page to allow the Workflow menu and other items to be displayed in a custom theme. This content is normally included in the viewpage action by default, this method is only required if you have another custom plugin that overrides the view page action, or a custom theme that bypasses it completely. The custom theme/action still needs to include the workflow webitems in the appropriate location. Use the boolean param to specify if the status display part of the html elements should display the information on the latest workflow state, or the most recently published version (if it exists).- Parameters:
content
-publishedVersion
-- Returns:
- Returns a map containing html display elements for the given page. See the static final variables prefixed with CUSTOM_THEME_HTML for valid key values.
-
-