com.atlassian.jira.config
Class DefaultStatusManager

java.lang.Object
  extended by com.atlassian.jira.config.AbstractIssueConstantsManager<Status>
      extended by com.atlassian.jira.config.DefaultStatusManager
All Implemented Interfaces:
StatusManager, Startable

public class DefaultStatusManager
extends AbstractIssueConstantsManager<Status>
implements StatusManager, Startable

Since:
v5.0

Field Summary
 
Fields inherited from class com.atlassian.jira.config.AbstractIssueConstantsManager
constantsManager, issueIndexManager, ofBizDelegator
 
Constructor Summary
DefaultStatusManager(ConstantsManager constantsManager, OfBizDelegator ofBizDelegator, IssueIndexManager issueIndexManager, WorkflowManager workflowManager, IssueConstantFactory factory, StatusCategoryManager statusCategoryManager, com.atlassian.beehive.ClusterLockService clusterLockService)
           
 
Method Summary
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 wil be called after the plugin system is fully initialised and all components added to the dependency injection framework.
 
Methods inherited from class com.atlassian.jira.config.AbstractIssueConstantsManager
createConstant, getMatchingIssues, getMaxSequenceNo, getNextStringId, moveDown, moveUp, removeConstant, removePropertySet
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DefaultStatusManager

public DefaultStatusManager(ConstantsManager constantsManager,
                            OfBizDelegator ofBizDelegator,
                            IssueIndexManager issueIndexManager,
                            WorkflowManager workflowManager,
                            IssueConstantFactory factory,
                            StatusCategoryManager statusCategoryManager,
                            com.atlassian.beehive.ClusterLockService clusterLockService)
Method Detail

start

public void start()
Description copied from interface: Startable
This method wil be called after the plugin system is fully initialised and all components added to the dependency injection framework.

Specified by:
start in interface Startable

createStatus

public Status createStatus(String name,
                           String description,
                           String iconUrl,
                           StatusCategory statusCategory)
Description copied from interface: StatusManager
Creates a new status.

Specified by:
createStatus in interface StatusManager
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.

createStatus

public Status createStatus(String name,
                           String description,
                           String iconUrl)
Description copied from interface: StatusManager
Creates a new status.

Specified by:
createStatus in interface StatusManager
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

public void editStatus(Status status,
                       String name,
                       String description,
                       String iconUrl,
                       StatusCategory statusCategory)
Description copied from interface: StatusManager
Edit an existing status.

Specified by:
editStatus in interface StatusManager
Parameters:
status - status to edit.
name - new name. Has to be unique.
description - new description
iconUrl - new icon url
statusCategory - status category of the status. Cannot be null

editStatus

public void editStatus(Status status,
                       String name,
                       String description,
                       String iconUrl)
Description copied from interface: StatusManager
Edit an existing status.

Specified by:
editStatus in interface StatusManager
Parameters:
status - status to edit.
name - new name. Has to be unique.
description - new description
iconUrl - new icon url

getStatuses

public Collection<Status> getStatuses()
Specified by:
getStatuses in interface StatusManager
Returns:
all Statuses

removeStatus

public void removeStatus(String id)
Description copied from interface: StatusManager
Removes a status.

Specified by:
removeStatus in interface StatusManager
Parameters:
id - status id

getStatus

public Status getStatus(String id)
Description copied from interface: StatusManager
Get a status by id.

Specified by:
getStatus in interface StatusManager
Parameters:
id - status id
Returns:
the Status, or null if no status with this id exists.

moveStatusUp

public void moveStatusUp(String id)
Description copied from interface: StatusManager
Move the status up in the order.

Specified by:
moveStatusUp in interface StatusManager
Parameters:
id - id of the status.

moveStatusDown

public void moveStatusDown(String id)
Description copied from interface: StatusManager
Move the status down in the order.

Specified by:
moveStatusDown in interface StatusManager
Parameters:
id - id of the status.

postProcess

protected void postProcess(Status constant)
Overrides:
postProcess in class AbstractIssueConstantsManager<Status>

clearCaches

protected void clearCaches()
Overrides:
clearCaches in class AbstractIssueConstantsManager<Status>

getIssueConstantField

protected String getIssueConstantField()
Specified by:
getIssueConstantField in class AbstractIssueConstantsManager<Status>

getAllValues

protected List<Status> getAllValues()
Specified by:
getAllValues in class AbstractIssueConstantsManager<Status>


Copyright © 2002-2015 Atlassian. All Rights Reserved.