com.atlassian.jira.config
Class DefaultResolutionManager

java.lang.Object
  extended by com.atlassian.jira.config.AbstractIssueConstantsManager<Resolution>
      extended by com.atlassian.jira.config.DefaultResolutionManager
All Implemented Interfaces:
ResolutionManager

public class DefaultResolutionManager
extends AbstractIssueConstantsManager<Resolution>
implements ResolutionManager

Since:
v5.0

Field Summary
 
Fields inherited from class com.atlassian.jira.config.AbstractIssueConstantsManager
constantsManager, issueIndexManager, ofBizDelegator
 
Constructor Summary
DefaultResolutionManager(ConstantsManager constantsManager, TranslationManager translationManager, JiraAuthenticationContext jiraAuthenticationContext, IssueIndexManager issueIndexManager, OfBizDelegator ofBizDelegator, ApplicationProperties applicationProperties)
           
 
Method Summary
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.
 
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

DefaultResolutionManager

public DefaultResolutionManager(ConstantsManager constantsManager,
                                TranslationManager translationManager,
                                JiraAuthenticationContext jiraAuthenticationContext,
                                IssueIndexManager issueIndexManager,
                                OfBizDelegator ofBizDelegator,
                                ApplicationProperties applicationProperties)
Method Detail

createResolution

public Resolution createResolution(String name,
                                   String description)
Description copied from interface: ResolutionManager
Adds a new resolution. The new resolution must have a unique name.

Specified by:
createResolution in interface ResolutionManager
Parameters:
name - resolution name. Cannot be null or blank.
description - the resolution description. Can be null or blank.
Returns:
the new Resolution.

editResolution

public void editResolution(Resolution resolution,
                           String name,
                           String description)
Description copied from interface: ResolutionManager
Edits an existing resolution.

Specified by:
editResolution in interface ResolutionManager
Parameters:
resolution - resolution to edit.
name - the new name.
description - the new description

getResolutions

public List<Resolution> getResolutions()
Description copied from interface: ResolutionManager
Return all resolutions. The list is ordered by the sequence. The order can be modified by calling ResolutionManager.moveResolutionDown(String) or ResolutionManager.moveResolutionUp(String).

Specified by:
getResolutions in interface ResolutionManager
Returns:
a list of Resolutions

removeResolution

public void removeResolution(String resolutionId,
                             String newResolutionId)
Description copied from interface: ResolutionManager
Removes a resolution with the specified id. When removing a resolution all issues which have this resolution will have to be migrated to use a different resultion specified by the second argument.

Specified by:
removeResolution in interface ResolutionManager
Parameters:
resolutionId - resolution to remove.
newResolutionId - new resolution for issues which have the resolution which has been removed. Cannot be null.

getResolutionByName

public Resolution getResolutionByName(String name)
Description copied from interface: ResolutionManager
Returns the resolution with the specified name. It is case insensitive.

Specified by:
getResolutionByName in interface ResolutionManager
Parameters:
name - the name of the resolution.
Returns:
a Resolution with the specified name.

getResolution

public Resolution getResolution(String id)
Description copied from interface: ResolutionManager
Returns a resolution with the specified id.

Specified by:
getResolution in interface ResolutionManager
Parameters:
id - resolution id.
Returns:
a Resolution with the specified id or null if no resolution whith this id exists.

moveResolutionUp

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

Specified by:
moveResolutionUp in interface ResolutionManager
Parameters:
id - id of the resolution.

moveResolutionDown

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

Specified by:
moveResolutionDown in interface ResolutionManager
Parameters:
id - id of the resolution.

setDefaultResolution

public void setDefaultResolution(String id)
Description copied from interface: ResolutionManager
Sets the default resolution.

You can pass null to clear the default.

Specified by:
setDefaultResolution in interface ResolutionManager
Parameters:
id - resolution id or null.

getDefaultResolution

public Resolution getDefaultResolution()
Description copied from interface: ResolutionManager
Returns the default resolution.

Will return null if no default is set.

Specified by:
getDefaultResolution in interface ResolutionManager
Returns:
the default resolution.

postProcess

protected void postProcess(Resolution resolution)
Overrides:
postProcess in class AbstractIssueConstantsManager<Resolution>

clearCaches

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

getIssueConstantField

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

getAllValues

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


Copyright © 2002-2012 Atlassian. All Rights Reserved.