Package com.atlassian.jira.bc.workflow
Class DefaultWorkflowTransitionService
java.lang.Object
com.atlassian.jira.bc.workflow.DefaultWorkflowTransitionService
- All Implemented Interfaces:
WorkflowTransitionService
-
Constructor Summary
ConstructorsConstructorDescriptionDefaultWorkflowTransitionService(JiraAuthenticationContext jiraAuthenticationContext, WorkflowService workflowService) -
Method Summary
Modifier and TypeMethodDescriptionaddConditionToWorkflow(String transitionName, com.opensymphony.workflow.loader.ConditionDescriptor condition, JiraWorkflow workflow) Addsconditionto all transitions whose name match the giventransitionNameinworkflow.addPostFunctionToWorkflow(String transitionName, com.opensymphony.workflow.loader.FunctionDescriptor function, JiraWorkflow workflow) Addsfunctionto all transitions whose name match the giventransitionNameinworkflow.setScreen(String transitionName, FieldScreen screen, JiraWorkflow workflow) Sets the givenscreento all transitions whose name match the giventransitionNameinworkflow.
-
Constructor Details
-
DefaultWorkflowTransitionService
public DefaultWorkflowTransitionService(JiraAuthenticationContext jiraAuthenticationContext, WorkflowService workflowService)
-
-
Method Details
-
addConditionToWorkflow
public ErrorCollection addConditionToWorkflow(@Nonnull String transitionName, @Nonnull com.opensymphony.workflow.loader.ConditionDescriptor condition, @Nonnull JiraWorkflow workflow) Description copied from interface:WorkflowTransitionServiceAddsconditionto all transitions whose name match the giventransitionNameinworkflow.- Specified by:
addConditionToWorkflowin interfaceWorkflowTransitionService- Parameters:
transitionName- Name of the transitions to be updated with thecondition. This is case-insensitive.condition- The condition to be applied to all matched transitions.workflow- The JIRA workflow to be updated.- Returns:
- A resulting
ErrorCollectionfor the operation. UseErrorCollection.hasAnyErrors()to check whether there are any errors.
-
addPostFunctionToWorkflow
public ErrorCollection addPostFunctionToWorkflow(@Nonnull String transitionName, @Nonnull com.opensymphony.workflow.loader.FunctionDescriptor function, @Nonnull JiraWorkflow workflow) Description copied from interface:WorkflowTransitionServiceAddsfunctionto all transitions whose name match the giventransitionNameinworkflow.- Specified by:
addPostFunctionToWorkflowin interfaceWorkflowTransitionService- Parameters:
transitionName- Name of the transitions to be updated with thefunction. This is case-insensitive.function- The function to be applied to all matched transitions.workflow- The JIRA workflow to be updated.- Returns:
- A resulting
ErrorCollectionfor the operation. UseErrorCollection.hasAnyErrors()to check whether there are any errors.
-
setScreen
public ErrorCollection setScreen(@Nonnull String transitionName, @Nullable FieldScreen screen, @Nonnull JiraWorkflow workflow) Description copied from interface:WorkflowTransitionServiceSets the givenscreento all transitions whose name match the giventransitionNameinworkflow.- Specified by:
setScreenin interfaceWorkflowTransitionService- Parameters:
transitionName- Name of the transitions to be updated with thecondition. This is case-insensitive.screen- The screen to be set for all matched transitions.workflow- The JIRA workflow to be updated.- Returns:
- A resulting
ErrorCollectionfor the operation. UseErrorCollection.hasAnyErrors()to check whether there are any errors.
-