public class DefaultResolutionManager extends AbstractIssueConstantsManager<Resolution> implements ResolutionManager, Startable
constantsManager, issueIndexingService, ofBizDelegator, queryDslAccessor
Constructor and Description |
---|
DefaultResolutionManager(ConstantsManager constantsManager,
IssueIndexingService issueIndexingService,
OfBizDelegator ofBizDelegator,
ApplicationProperties applicationProperties,
IssueConstantFactory factory,
com.atlassian.beehive.ClusterLockService clusterLockService,
IssueManager issueManager,
QueryDslAccessor queryDslAccessor) |
Modifier and Type | Method and Description |
---|---|
protected void |
clearCaches() |
Resolution |
createResolution(String name,
String description)
Adds a new resolution.
|
void |
editResolution(Resolution resolution,
String name,
String description)
Edits an existing resolution.
|
protected List<Resolution> |
getAllValues() |
Resolution |
getDefaultResolution()
Returns the default resolution.
|
protected String |
getIssueConstantField() |
Resolution |
getResolution(String id)
Returns a resolution with the specified id.
|
Resolution |
getResolutionByName(String name)
Returns the resolution with the specified name.
|
List<Resolution> |
getResolutions()
Return all resolutions.
|
void |
moveResolutionDown(String id)
Move the resolution down in the order.
|
void |
moveResolutionUp(String id)
Move the resolution up in the order.
|
protected void |
postProcess(Resolution resolution) |
void |
removeResolution(String resolutionId,
String newResolutionId)
Removes a resolution with the specified id.
|
void |
setDefaultResolution(String id)
Sets the default resolution.
|
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 DefaultResolutionManager(ConstantsManager constantsManager, IssueIndexingService issueIndexingService, OfBizDelegator ofBizDelegator, ApplicationProperties applicationProperties, IssueConstantFactory factory, com.atlassian.beehive.ClusterLockService clusterLockService, IssueManager issueManager, QueryDslAccessor queryDslAccessor)
public void start()
Startable
public Resolution createResolution(String name, String description)
ResolutionManager
createResolution
in interface ResolutionManager
name
- resolution name. Cannot be null or blank.description
- the resolution description. Can be null or blank.Resolution
.public void editResolution(Resolution resolution, String name, String description)
ResolutionManager
editResolution
in interface ResolutionManager
resolution
- resolution to edit.name
- the new name.description
- the new descriptionpublic List<Resolution> getResolutions()
ResolutionManager
ResolutionManager.moveResolutionDown(String)
or ResolutionManager.moveResolutionUp(String)
.getResolutions
in interface ResolutionManager
Resolution
spublic void removeResolution(String resolutionId, String newResolutionId)
ResolutionManager
removeResolution
in interface ResolutionManager
resolutionId
- resolution to remove.newResolutionId
- new resolution for issues which have the resolution which has been removed. Cannot be null.public Resolution getResolutionByName(String name)
ResolutionManager
getResolutionByName
in interface ResolutionManager
name
- the name of the resolution.Resolution
with the specified name.public Resolution getResolution(String id)
ResolutionManager
getResolution
in interface ResolutionManager
id
- resolution id.Resolution
with the specified id or null if no resolution whith this id exists.public void moveResolutionUp(String id)
ResolutionManager
moveResolutionUp
in interface ResolutionManager
id
- id of the resolution.public void moveResolutionDown(String id)
ResolutionManager
moveResolutionDown
in interface ResolutionManager
id
- id of the resolution.public void setDefaultResolution(String id)
ResolutionManager
You can pass null to clear the default.
setDefaultResolution
in interface ResolutionManager
id
- resolution id or null.public Resolution getDefaultResolution()
ResolutionManager
Will return null if no default is set.
getDefaultResolution
in interface ResolutionManager
protected void postProcess(Resolution resolution)
postProcess
in class AbstractIssueConstantsManager<Resolution>
protected void clearCaches()
clearCaches
in class AbstractIssueConstantsManager<Resolution>
protected String getIssueConstantField()
getIssueConstantField
in class AbstractIssueConstantsManager<Resolution>
protected List<Resolution> getAllValues()
getAllValues
in class AbstractIssueConstantsManager<Resolution>
Copyright © 2002-2017 Atlassian. All Rights Reserved.