Package com.atlassian.jira.config
Interface StatusManager
- All Known Implementing Classes:
DefaultStatusManager
@PublicApi
public interface StatusManager
Manager for
Status
es.- Since:
- v5.0
-
Method Summary
Modifier and TypeMethodDescriptioncreateStatus
(String name, String description, String iconUrl) Creates a new status.createStatus
(String name, String description, String iconUrl, StatusCategory statusCategory) Creates a new status.void
editStatus
(Status status, String name, String description, String iconUrl) Edit an existing status.void
editStatus
(Status status, String name, String description, String iconUrl, StatusCategory statusCategory) Edit an existing status.Get a status by id.void
moveStatusDown
(String id) Move the status down in the order.void
moveStatusUp
(String id) Move the status up in the order.void
removeStatus
(String id) Removes a status.
-
Method Details
-
createStatus
Creates a new status.- Parameters:
name
- name of the status. Cannot be blank or null and has to be unique.description
- description of the status.iconUrl
- icon url for this status. Cannot be blank or null.statusCategory
- status category of the status. Cannot be null- Returns:
- the new
Status
. - Since:
- 6.1
-
createStatus
Creates a new status.- Parameters:
name
- name of the status. Cannot be blank or null and has to be unique.description
- description of the status.iconUrl
- icon url for this status. Cannot be blank or null.- Returns:
- the new
Status
.
-
editStatus
void editStatus(Status status, String name, String description, String iconUrl, StatusCategory statusCategory) Edit an existing status.- Parameters:
status
- status to edit.name
- new name. Has to be unique.description
- new descriptioniconUrl
- new icon urlstatusCategory
- status category of the status. Cannot be null- Since:
- 6.1
-
editStatus
Edit an existing status.- Parameters:
status
- status to edit.name
- new name. Has to be unique.description
- new descriptioniconUrl
- new icon url
-
getStatuses
Collection<Status> getStatuses()- Returns:
- all
Status
es
-
removeStatus
Removes a status.- Parameters:
id
- status id- Throws:
IllegalStateException
- if this status is associated with any workflow.IllegalArgumentException
- if a status with the given id does not exist.
-
getStatus
Get a status by id.- Parameters:
id
- status id- Returns:
- the
Status
, or null if no status with this id exists.
-
moveStatusUp
Move the status up in the order.- Parameters:
id
- id of the status.- Throws:
IllegalArgumentException
- if a status with the given id does not exist.
-
moveStatusDown
Move the status down in the order.- Parameters:
id
- id of the status.- Throws:
IllegalArgumentException
- if a status with the given id does not exist.
-