Package com.atlassian.jira.workflow.edit
Class WorkflowStatusesImpl
java.lang.Object
com.atlassian.jira.workflow.edit.WorkflowStatusesImpl
- All Implemented Interfaces:
WorkflowStatuses
-
Field Summary
Fields inherited from interface com.atlassian.jira.workflow.edit.WorkflowStatuses
DEFAULT_ICON_URL -
Constructor Summary
ConstructorsConstructorDescriptionWorkflowStatusesImpl(JiraAuthenticationContext authenticationContext, ConstantsService constantsService, StatusService statusService, Workflows workflows, StatusManager statusManager, WorkflowService workflowService, OutcomeHelper outcomeHelper, WorkflowStatusesValidator workflowStatusesValidator) -
Method Summary
Modifier and TypeMethodDescriptionaddStatusAndGlobalTransitionToWorkflow(Status status, String workflowName) Add a status and a global transition to that status to a workflow.addStatusToWorkflow(Status status, String workflowName) Add a status to a workflow.createAndAddStatusToWorkflow(boolean createGlobalTransition, String description, String name, String statusCategoryId, String workflowName) Create a status and add it to a workflow.getStatuses(String workflowName) removeStatus(String statusId, String workflowName) Remove the status represented by the supplied status from the named workflow.updateStatus(String description, String name, String statusCategoryId, String statusId, String workflowName) Update a status, setting its description, name, and status category.verifyStatusCanBeRemoved(@NotNull Status status, String workflowName) verifyStatusCanBeRemoved(String statusId, String workflowName)
-
Constructor Details
-
WorkflowStatusesImpl
public WorkflowStatusesImpl(JiraAuthenticationContext authenticationContext, ConstantsService constantsService, StatusService statusService, Workflows workflows, StatusManager statusManager, WorkflowService workflowService, OutcomeHelper outcomeHelper, WorkflowStatusesValidator workflowStatusesValidator)
-
-
Method Details
-
createAndAddStatusToWorkflow
public ServiceOutcome<Workflow> createAndAddStatusToWorkflow(boolean createGlobalTransition, String description, String name, String statusCategoryId, String workflowName) Description copied from interface:WorkflowStatusesCreate a status and add it to a workflow.- Specified by:
createAndAddStatusToWorkflowin interfaceWorkflowStatuses- Parameters:
createGlobalTransition- Whether a global transition to the new status should also be created.description- The status's description.name- The status's name.statusCategoryId- The ID of the status category to use.workflowName- The name of the workflow to add the status to.- Returns:
- ServiceOutcome
The updated workflow.
-
addStatusAndGlobalTransitionToWorkflow
public ServiceOutcome<Workflow> addStatusAndGlobalTransitionToWorkflow(Status status, String workflowName) Description copied from interface:WorkflowStatusesAdd a status and a global transition to that status to a workflow. If the workflow is inactive it is modified directly, otherwise its draft is modified.- Specified by:
addStatusAndGlobalTransitionToWorkflowin interfaceWorkflowStatuses- Parameters:
status- The status.workflowName- The workflow's name.- Returns:
- A
ServiceOutcomecontaining the new workflow step.
-
addStatusToWorkflow
Description copied from interface:WorkflowStatusesAdd a status to a workflow. If the workflow is inactive it is modified directly, otherwise its draft is modified.- Specified by:
addStatusToWorkflowin interfaceWorkflowStatuses- Parameters:
status- The status.workflowName- The workflow's name.- Returns:
- A
ServiceOutcomecontaining the updated workflow.
-
removeStatus
Remove the status represented by the supplied status from the named workflow.- Specified by:
removeStatusin interfaceWorkflowStatuses- Parameters:
statusId-workflowName-- Returns:
- A
ServiceOutcomecontaining the updated workflow.
-
updateStatus
public ServiceOutcome<Workflow> updateStatus(String description, String name, String statusCategoryId, String statusId, String workflowName) Update a status, setting its description, name, and status category.- Specified by:
updateStatusin interfaceWorkflowStatuses- Parameters:
description- The status's new description.name- The status's new name.statusCategoryId- The ID of the status's new category.statusId- The status's ID.workflowName- The name of the workflow to operate on.- Returns:
- The updated workflow.
-
verifyStatusCanBeRemoved
public ServiceOutcome<Pair<Workflow,Status>> verifyStatusCanBeRemoved(String statusId, String workflowName) - Specified by:
verifyStatusCanBeRemovedin interfaceWorkflowStatuses
-
verifyStatusCanBeRemoved
public ServiceOutcome<Pair<Workflow,Status>> verifyStatusCanBeRemoved(@NotNull @NotNull Status status, String workflowName) - Specified by:
verifyStatusCanBeRemovedin interfaceWorkflowStatuses
-
getStatus
- Specified by:
getStatusin interfaceWorkflowStatuses
-
getStatuses
- Specified by:
getStatusesin interfaceWorkflowStatuses- Parameters:
workflowName-- Returns:
- Information about all statuses in the system or error response if user can not edit specified workflow.
-