Package com.atlassian.jira.workflow.edit
Class WorkflowGlobalTransitionsImpl
java.lang.Object
com.atlassian.jira.workflow.edit.WorkflowGlobalTransitionsImpl
- All Implemented Interfaces:
WorkflowGlobalTransitions
-
Constructor Summary
ConstructorsConstructorDescriptionWorkflowGlobalTransitionsImpl
(StatusManager statusManager, Workflows workflows, FieldScreenManager fieldScreenManager, JiraAuthenticationContext jiraAuthenticationContext, OutcomeHelper outcomeHelper, WorkflowService workflowService) -
Method Summary
Modifier and TypeMethodDescriptionaddGlobalTransitionToWorkflow
(String workflowName, String statusId, String globalTransitionName, String globalTransitionDescription, Long screenId) Add a global transition with the specified properties to the named workflow.createGlobalTransition
(String statusId, String workflowName, String globalTransitionName, String globalTransitionDescription, Long screenId) Create a global transition to a specified status on a workflow.deleteGlobalTransition
(String globalTransitionId, String workflowName) Delete the global transition in the specified workflow.resolveUniqueGlobalTransitionName
(Workflow workflow, String globalTransitionName) Checks if a global transition name conflict occurs, returns a generated unique name if it doesupdateGlobalTransition
(int transitionId, String name, String description, Long screenId, String workflowName) Update the global transition identified by the specified transition id with the supplied properties.verifyGlobalTransitionCanBeUpdated
(int transitionId, String name, String workflowName, Long screenId)
-
Constructor Details
-
WorkflowGlobalTransitionsImpl
public WorkflowGlobalTransitionsImpl(StatusManager statusManager, Workflows workflows, FieldScreenManager fieldScreenManager, JiraAuthenticationContext jiraAuthenticationContext, OutcomeHelper outcomeHelper, WorkflowService workflowService)
-
-
Method Details
-
createGlobalTransition
public ServiceOutcome<Workflow> createGlobalTransition(String statusId, String workflowName, String globalTransitionName, String globalTransitionDescription, Long screenId) Description copied from interface:WorkflowGlobalTransitions
Create a global transition to a specified status on a workflow. An error will be returned in the case of:- the status already existing on the workflow
- duplicate name of existing global transition
- failing validation due to workflow, status not existing or a blank global transition name
- Specified by:
createGlobalTransition
in interfaceWorkflowGlobalTransitions
- Parameters:
statusId
-workflowName
-globalTransitionName
-globalTransitionDescription
-screenId
-- Returns:
- A
ServiceOutcome
containing the updated workflow.
-
addGlobalTransitionToWorkflow
public ServiceOutcome<TransitionData> addGlobalTransitionToWorkflow(String workflowName, String statusId, String globalTransitionName, String globalTransitionDescription, Long screenId) Description copied from interface:WorkflowGlobalTransitions
Add a global transition with the specified properties to the named workflow.- Specified by:
addGlobalTransitionToWorkflow
in interfaceWorkflowGlobalTransitions
- Returns:
- ServiceOutcome
New transition data.
-
deleteGlobalTransition
public ServiceOutcome<Workflow> deleteGlobalTransition(String globalTransitionId, String workflowName) Description copied from interface:WorkflowGlobalTransitions
Delete the global transition in the specified workflow.- Specified by:
deleteGlobalTransition
in interfaceWorkflowGlobalTransitions
- Parameters:
globalTransitionId
- The global transition to delete.workflowName
- The workflow to delete the global transition from.- Returns:
- A
ServiceOutcome
containing the updated workflow.
-
updateGlobalTransition
public ServiceOutcome<Workflow> updateGlobalTransition(int transitionId, String name, String description, Long screenId, String workflowName) Description copied from interface:WorkflowGlobalTransitions
Update the global transition identified by the specified transition id with the supplied properties.- Specified by:
updateGlobalTransition
in interfaceWorkflowGlobalTransitions
- Parameters:
transitionId
-name
-description
-screenId
-workflowName
-- Returns:
- ServiceOutcome
The updated workflow.
-
verifyGlobalTransitionCanBeUpdated
public ServiceOutcome<Workflow> verifyGlobalTransitionCanBeUpdated(int transitionId, String name, String workflowName, Long screenId) - Specified by:
verifyGlobalTransitionCanBeUpdated
in interfaceWorkflowGlobalTransitions
-
resolveUniqueGlobalTransitionName
Description copied from interface:WorkflowGlobalTransitions
Checks if a global transition name conflict occurs, returns a generated unique name if it does- Specified by:
resolveUniqueGlobalTransitionName
in interfaceWorkflowGlobalTransitions
- Parameters:
workflow
- derived names are only unique within this workflowglobalTransitionName
- The desired name for the global transition- Returns:
- String a unique global transition name
-