com.atlassian.jira.config
Class DefaultPriorityManager

java.lang.Object
  extended by com.atlassian.jira.config.AbstractIssueConstantsManager<Priority>
      extended by com.atlassian.jira.config.DefaultPriorityManager
All Implemented Interfaces:
PriorityManager

public class DefaultPriorityManager
extends AbstractIssueConstantsManager<Priority>
implements PriorityManager

Since:
v5.0

Field Summary
 
Fields inherited from class com.atlassian.jira.config.AbstractIssueConstantsManager
constantsManager, issueIndexManager, ofBizDelegator
 
Constructor Summary
DefaultPriorityManager(ConstantsManager constantsManager, OfBizDelegator ofBizDelegator, IssueIndexManager issueIndexManager, ApplicationProperties applicationProperties, IssueConstantFactory issueConstantFactory)
           
 
Method Summary
protected  void clearCaches()
           
 Priority createPriority(String name, String description, String iconUrl, String color)
          Create a new priority.
 void editPriority(Priority priority, String name, String description, String iconUrl, String color)
          Edit an existing priority.
protected  List<Priority> getAllValues()
           
 Priority getDefaultPriority()
          Returns the default priority.
protected  String getIssueConstantField()
           
 List<Priority> getPriorities()
          Returns all priorities.
 Priority getPriority(String id)
          Returns a priority.
protected  List<Priority> getValues()
           
 void movePriorityDown(String id)
          Move the resolution down in the order.
 void movePriorityUp(String id)
          Move the resolution up in the order.
protected  void postProcess(Priority priority)
           
 void removePriority(String id, String newPriorityId)
          Removes a priority.
 void setDefaultPriority(String id)
          Sets the default priority.
 
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

DefaultPriorityManager

public DefaultPriorityManager(ConstantsManager constantsManager,
                              OfBizDelegator ofBizDelegator,
                              IssueIndexManager issueIndexManager,
                              ApplicationProperties applicationProperties,
                              IssueConstantFactory issueConstantFactory)
Method Detail

createPriority

public Priority createPriority(String name,
                               String description,
                               String iconUrl,
                               String color)
Description copied from interface: PriorityManager
Create a new priority.

Specified by:
createPriority in interface PriorityManager
Parameters:
name - name of the priority. Cannot be blank or null. Must be unique.
description - description of the priority
iconUrl - icon url of the priority
color - color for the priority.
Returns:
the new Priority

editPriority

public void editPriority(Priority priority,
                         String name,
                         String description,
                         String iconUrl,
                         String color)
Description copied from interface: PriorityManager
Edit an existing priority.

Specified by:
editPriority in interface PriorityManager
Parameters:
priority - existing priority.
name - name of the priority
description - description of the priority
iconUrl - icon Url of the priority
color - color of the priority

getPriorities

public List<Priority> getPriorities()
Description copied from interface: PriorityManager
Returns all priorities. Sorted by sequence. The order can be modified by calling PriorityManager.movePriorityDown(String) or PriorityManager.movePriorityUp(String)

Specified by:
getPriorities in interface PriorityManager
Returns:
a List of Priority

removePriority

public void removePriority(String id,
                           String newPriorityId)
Description copied from interface: PriorityManager
Removes a priority. When removing the priority it will change the priority of all issues which have the priority that has been deleted to the priority with id specified as the second argument.

Specified by:
removePriority in interface PriorityManager
Parameters:
id - priority id to remove.
newPriorityId - priority to use for all issues which have the priority which has been removed. Cannot be null.

getPriority

public Priority getPriority(String id)
Description copied from interface: PriorityManager
Returns a priority.

Specified by:
getPriority in interface PriorityManager
Parameters:
id - priority id
Returns:
a Priority or null if no priority with the specified id could be found.

setDefaultPriority

public void setDefaultPriority(String id)
Description copied from interface: PriorityManager
Sets the default priority.

Specified by:
setDefaultPriority in interface PriorityManager
Parameters:
id - priority id

getDefaultPriority

public Priority getDefaultPriority()
Description copied from interface: PriorityManager
Returns the default priority.

Specified by:
getDefaultPriority in interface PriorityManager
Returns:
the default Priority or if none configured null.

movePriorityUp

public void movePriorityUp(String id)
Description copied from interface: PriorityManager
Move the resolution up in the order.

Specified by:
movePriorityUp in interface PriorityManager
Parameters:
id - id of the resolution.

movePriorityDown

public void movePriorityDown(String id)
Description copied from interface: PriorityManager
Move the resolution down in the order.

Specified by:
movePriorityDown in interface PriorityManager
Parameters:
id - id of the resolution.

getValues

protected List<Priority> getValues()

postProcess

protected void postProcess(Priority priority)
Overrides:
postProcess in class AbstractIssueConstantsManager<Priority>

clearCaches

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

getIssueConstantField

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

getAllValues

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


Copyright © 2002-2013 Atlassian. All Rights Reserved.