Package com.comalatech.workflow
Interface WorkflowParameterManager
- 
public interface WorkflowParameterManagerManages space and page level workflow parameters. 
- 
- 
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description PageWorkflowParametergetPageWorkflowParameter(com.atlassian.confluence.pages.AbstractPage page, java.lang.String parameterName)Returns the workflow parameter that is associated with an specific page.java.util.Map<java.lang.String,java.util.List<PageWorkflowParameter>>getParametersForAnyTransition(com.atlassian.confluence.pages.AbstractPage page, Workflow.State state, boolean isAdmin)Retrieves the required parameters information for all the states that can be reached from the given state using built in transitions.java.util.List<PageWorkflowParameter>getParametersForTransition(com.atlassian.confluence.pages.AbstractPage page, Workflow.State targetState)Gets the list of the required parameters to transition to the given target stateWorkflowParametergetSpaceWorkflowParameter(java.lang.String spaceKey, java.lang.String parameterName)Returns the workflow parameter of a space that matches the given parameter name.java.util.List<WorkflowParameter>getSpaceWorkflowsParameters(java.lang.String spaceKey)Returns a list of existing Workflow Parameters in a certain space.booleanisTransitionAllowed(com.atlassian.confluence.pages.AbstractPage page, Workflow.State targetState)Checks in the given page if the transition to the given workflows state is allowed with the current state of the its parameters.voidsetPageWorkflowParameterValue(com.atlassian.confluence.pages.AbstractPage page, WorkflowParameter workflowParameter)Sets a workflow parameter value on a given page.voidsetSpaceWorkflowParameter(java.lang.String spaceKey, WorkflowParameter workflowParameter)Sets a workflow parameter in the given space. 
 - 
 
- 
- 
Method Detail
- 
getSpaceWorkflowsParameters
java.util.List<WorkflowParameter> getSpaceWorkflowsParameters(java.lang.String spaceKey)
Returns a list of existing Workflow Parameters in a certain space.- Parameters:
 spaceKey- key of the space from which to get the workflow parameters- Returns:
 - a list containing all the workflow parameters defined in the given space
 
 
- 
getSpaceWorkflowParameter
WorkflowParameter getSpaceWorkflowParameter(java.lang.String spaceKey, java.lang.String parameterName)
Returns the workflow parameter of a space that matches the given parameter name.- Parameters:
 spaceKey- key of the space from which to get the workflow parameterparameterName- name of the workflow parameter- Returns:
 - a workflow parameter that matches the given name in the given space
 
 
- 
setSpaceWorkflowParameter
void setSpaceWorkflowParameter(java.lang.String spaceKey, WorkflowParameter workflowParameter) throws WorkflowExceptionSets a workflow parameter in the given space. A workflow parameter with the same name must already exist.- Parameters:
 spaceKey- key of the space in which to set the workflow parameterworkflowParameter- workflow parameter to be set in the given space- Throws:
 WorkflowException- if the provided parameter“s value does not match the parameter type
 
- 
getPageWorkflowParameter
PageWorkflowParameter getPageWorkflowParameter(com.atlassian.confluence.pages.AbstractPage page, java.lang.String parameterName)
Returns the workflow parameter that is associated with an specific page.- Parameters:
 page- page that contains the requested workflow parameterparameterName- name of the workflow parameter- Returns:
 - the page workflow parameter of the given page which name matches the given parameter. If the given page has a "single page workflow", it will return null.
 
 
- 
setPageWorkflowParameterValue
void setPageWorkflowParameterValue(com.atlassian.confluence.pages.AbstractPage page, WorkflowParameter workflowParameter) throws WorkflowExceptionSets a workflow parameter value on a given page. The page must already have a workflow parameter which name matches the one of the parameter to be set.- Parameters:
 page- page where to set the given workflow parameterworkflowParameter- workflow parameter to override the existing one- Throws:
 WorkflowException- if the provided parameter“s value does not match the parameter type
 
- 
getParametersForTransition
java.util.List<PageWorkflowParameter> getParametersForTransition(com.atlassian.confluence.pages.AbstractPage page, Workflow.State targetState)
Gets the list of the required parameters to transition to the given target state- Parameters:
 page- context pagetargetState- desired next state- Returns:
 - the list of page parameters for the requested transition
 - Since:
 - 6.2.0
 
 
- 
isTransitionAllowed
boolean isTransitionAllowed(com.atlassian.confluence.pages.AbstractPage page, Workflow.State targetState)Checks in the given page if the transition to the given workflows state is allowed with the current state of the its parameters.- Parameters:
 page- context pagetargetState- desired next state- Returns:
 - if the transition is allowed given the state of its parameters
 - Since:
 - 6.2.0
 
 
- 
getParametersForAnyTransition
java.util.Map<java.lang.String,java.util.List<PageWorkflowParameter>> getParametersForAnyTransition(com.atlassian.confluence.pages.AbstractPage page, Workflow.State state, boolean isAdmin)
Retrieves the required parameters information for all the states that can be reached from the given state using built in transitions. (ie, approve/reject/submit)- Parameters:
 page- contextual pagestate- set as an origin to identify the transition states and the required parametersisAdmin- admin override enabled- Returns:
 - all state names that can be reached from the given state linked to their required parameters
 - Since:
 - 6.2.0
 
 
 - 
 
 -