Package com.atlassian.jira.config
Class DefaultPriorityManager
java.lang.Object
com.atlassian.jira.config.AbstractIssueConstantsManager<Priority>
com.atlassian.jira.config.DefaultPriorityManager
- All Implemented Interfaces:
PriorityManager,Startable
public class DefaultPriorityManager
extends AbstractIssueConstantsManager<Priority>
implements PriorityManager, Startable
- Since:
- v5.0
-
Field Summary
Fields inherited from class com.atlassian.jira.config.AbstractIssueConstantsManager
constantsManager, issueIndexingService, issueManager, ofBizDelegator, queryDslAccessor -
Constructor Summary
ConstructorsConstructorDescriptionDefaultPriorityManager(ConstantsManager constantsManager, OfBizDelegator ofBizDelegator, IssueIndexingService issueIndexingService, ApplicationProperties applicationProperties, IssueConstantFactory issueConstantFactory, com.atlassian.beehive.ClusterLockService clusterLockService, IssueManager issueManager, QueryDslAccessor queryDslAccessor, PrioritySchemeManager prioritySchemeManager, com.atlassian.event.api.EventPublisher eventPublisher, I18nHelper i18nHelper, ProjectManager projectManager, PrioritySchemeUtil prioritySchemeUtil) -
Method Summary
Modifier and TypeMethodDescriptionprotected voidcreatePriority(String name, String description, String iconUrl, String color) Create a new priority.voidEdit an existing priority.findPriorities(String substring, Set<Long> projectIds) Returns priorities whose names start with or fully match given substring.Returns the default priority.protected StringReturns all priorities.getPriority(String id) Returns a priority.voidMove the resolution down in the order.voidmovePriorityUp(String id) Move the resolution up in the order.protected voidpostProcess(Priority priority) voidremovePriority(String id, String newPriorityId) Removes a priority.voidSets the default priority.voidstart()This method will 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, getMaxSequenceNo, getNextStringId, moveDown, moveUp, removeConstant, removePropertySet
-
Constructor Details
-
DefaultPriorityManager
public DefaultPriorityManager(ConstantsManager constantsManager, OfBizDelegator ofBizDelegator, IssueIndexingService issueIndexingService, ApplicationProperties applicationProperties, IssueConstantFactory issueConstantFactory, com.atlassian.beehive.ClusterLockService clusterLockService, IssueManager issueManager, QueryDslAccessor queryDslAccessor, PrioritySchemeManager prioritySchemeManager, com.atlassian.event.api.EventPublisher eventPublisher, I18nHelper i18nHelper, ProjectManager projectManager, PrioritySchemeUtil prioritySchemeUtil)
-
-
Method Details
-
start
public void start()Description copied from interface:StartableThis method will be called after the plugin system is fully initialised and all components added to the dependency injection framework. -
createPriority
Description copied from interface:PriorityManagerCreate a new priority. Newly added priority will be added to default priority scheme.- Specified by:
createPriorityin interfacePriorityManager- Parameters:
name- name of the priority. Cannot be blank or null. Must be unique.description- description of the priorityiconUrl- icon url of the prioritycolor- 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:PriorityManagerEdit an existing priority.- Specified by:
editPriorityin interfacePriorityManager- Parameters:
priority- existing priority.name- name of the prioritydescription- description of the priorityiconUrl- icon Url of the prioritycolor- color of the priority
-
getPriorities
Description copied from interface:PriorityManagerReturns all priorities. Sorted by sequence. The order can be modified by callingPriorityManager.movePriorityDown(String)orPriorityManager.movePriorityUp(String)- Specified by:
getPrioritiesin interfacePriorityManager- Returns:
- a List of
Priority
-
removePriority
Description copied from interface:PriorityManagerRemoves 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. Priority will be also removed from all priority schemes.- Specified by:
removePriorityin interfacePriorityManager- 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
Description copied from interface:PriorityManagerReturns a priority.- Specified by:
getPriorityin interfacePriorityManager- Parameters:
id- priority id- Returns:
- a
Priorityor null if no priority with the specified id could be found.
-
setDefaultPriority
Description copied from interface:PriorityManagerSets the default priority.- Specified by:
setDefaultPriorityin interfacePriorityManager- Parameters:
id- priority id
-
getDefaultPriority
Description copied from interface:PriorityManagerReturns the default priority.- Specified by:
getDefaultPriorityin interfacePriorityManager- Returns:
- the default
Priorityor if none configured null.
-
movePriorityUp
Description copied from interface:PriorityManagerMove the resolution up in the order.- Specified by:
movePriorityUpin interfacePriorityManager- Parameters:
id- id of the resolution.
-
movePriorityDown
Description copied from interface:PriorityManagerMove the resolution down in the order.- Specified by:
movePriorityDownin interfacePriorityManager- Parameters:
id- id of the resolution.
-
getValues
-
postProcess
- Overrides:
postProcessin classAbstractIssueConstantsManager<Priority>
-
clearCaches
protected void clearCaches()- Overrides:
clearCachesin classAbstractIssueConstantsManager<Priority>
-
getIssueConstantField
- Specified by:
getIssueConstantFieldin classAbstractIssueConstantsManager<Priority>
-
getAllValues
- Specified by:
getAllValuesin classAbstractIssueConstantsManager<Priority>
-
findPriorities
Description copied from interface:PriorityManagerReturns priorities whose names start with or fully match given substring.- Specified by:
findPrioritiesin interfacePriorityManager- Parameters:
substring- the string that priority names will be matched withprojectIds- the set of project ids to filter priorities
-