public class DefaultStatusManager extends AbstractIssueConstantsManager<Status> implements StatusManager, Startable
constantsManager, issueIndexingService, issueManager, ofBizDelegator, queryDslAccessor
Constructor and Description |
---|
DefaultStatusManager(ConstantsManager constantsManager,
OfBizDelegator ofBizDelegator,
IssueIndexingService issueIndexingService,
WorkflowManager workflowManager,
IssueConstantFactory factory,
StatusCategoryManager statusCategoryManager,
com.atlassian.beehive.ClusterLockService clusterLockService,
IssueManager issueManager,
QueryDslAccessor queryDslAccessor,
com.atlassian.event.api.EventPublisher eventPublisher) |
Modifier and Type | Method and Description |
---|---|
protected void |
clearCaches() |
Status |
createStatus(String name,
String description,
String iconUrl)
Creates a new status.
|
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.
|
protected List<Status> |
getAllValues() |
protected String |
getIssueConstantField() |
Status |
getStatus(String id)
Get a status by id.
|
Collection<Status> |
getStatuses() |
void |
moveStatusDown(String id)
Move the status down in the order.
|
void |
moveStatusUp(String id)
Move the status up in the order.
|
protected void |
postProcess(Status constant) |
void |
removeStatus(String id)
Removes a status.
|
void |
start()
This method will be called after the plugin system is fully initialised and all components added to the
dependency injection framework.
|
createConstant, getMaxSequenceNo, getNextStringId, moveDown, moveUp, removeConstant, removePropertySet
public DefaultStatusManager(ConstantsManager constantsManager, OfBizDelegator ofBizDelegator, IssueIndexingService issueIndexingService, WorkflowManager workflowManager, IssueConstantFactory factory, StatusCategoryManager statusCategoryManager, com.atlassian.beehive.ClusterLockService clusterLockService, IssueManager issueManager, QueryDslAccessor queryDslAccessor, com.atlassian.event.api.EventPublisher eventPublisher)
public void start()
Startable
public Status createStatus(String name, String description, String iconUrl, StatusCategory statusCategory)
StatusManager
createStatus
in interface StatusManager
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 nullStatus
.public Status createStatus(String name, String description, String iconUrl)
StatusManager
createStatus
in interface StatusManager
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.Status
.public void editStatus(Status status, String name, String description, String iconUrl, StatusCategory statusCategory)
StatusManager
editStatus
in interface StatusManager
status
- status to edit.name
- new name. Has to be unique.description
- new descriptioniconUrl
- new icon urlstatusCategory
- status category of the status. Cannot be nullpublic void editStatus(Status status, String name, String description, String iconUrl)
StatusManager
editStatus
in interface StatusManager
status
- status to edit.name
- new name. Has to be unique.description
- new descriptioniconUrl
- new icon urlpublic Collection<Status> getStatuses()
getStatuses
in interface StatusManager
Status
espublic void removeStatus(String id)
StatusManager
removeStatus
in interface StatusManager
id
- status idpublic Status getStatus(String id)
StatusManager
getStatus
in interface StatusManager
id
- status idStatus
, or null if no status with this id exists.public void moveStatusUp(String id)
StatusManager
moveStatusUp
in interface StatusManager
id
- id of the status.public void moveStatusDown(String id)
StatusManager
moveStatusDown
in interface StatusManager
id
- id of the status.protected void postProcess(Status constant)
postProcess
in class AbstractIssueConstantsManager<Status>
protected void clearCaches()
clearCaches
in class AbstractIssueConstantsManager<Status>
protected String getIssueConstantField()
getIssueConstantField
in class AbstractIssueConstantsManager<Status>
protected List<Status> getAllValues()
getAllValues
in class AbstractIssueConstantsManager<Status>
Copyright © 2002-2024 Atlassian. All Rights Reserved.