com.atlassian.jira.config
Interface ResolutionManager

All Known Implementing Classes:
DefaultResolutionManager

@PublicApi
public interface ResolutionManager

Manager for Resolutions.

Since:
v5.0

Method Summary
 Resolution createResolution(String name, String description)
          Adds a new resolution.
 void editResolution(Resolution resolution, String name, String description)
          Edits an existing resolution.
 Resolution getDefaultResolution()
          Returns the default resolution.
 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.
 void removeResolution(String resolutionId, String newResolutionId)
          Removes a resolution with the specified id.
 void setDefaultResolution(String id)
          Sets the default resolution.
 

Method Detail

createResolution

Resolution createResolution(String name,
                            String description)
Adds a new resolution. The new resolution must have a unique name.

Parameters:
name - resolution name. Cannot be null or blank.
description - the resolution description. Can be null or blank.
Returns:
the new Resolution.

editResolution

void editResolution(Resolution resolution,
                    String name,
                    String description)
Edits an existing resolution.

Parameters:
resolution - resolution to edit.
name - the new name.
description - the new description

getResolutions

List<Resolution> getResolutions()
Return all resolutions. The list is ordered by the sequence. The order can be modified by calling moveResolutionDown(String) or moveResolutionUp(String).

Returns:
a list of Resolutions

removeResolution

void removeResolution(String resolutionId,
                      String newResolutionId)
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.

Parameters:
resolutionId - resolution to remove.
newResolutionId - new resolution for issues which have the resolution which has been removed. Cannot be null.

getResolutionByName

Resolution getResolutionByName(String name)
Returns the resolution with the specified name. It is case insensitive.

Parameters:
name - the name of the resolution.
Returns:
a Resolution with the specified name.

getResolution

Resolution getResolution(String id)
Returns a resolution with the specified id.

Parameters:
id - resolution id.
Returns:
a Resolution with the specified id or null if no resolution whith this id exists.

moveResolutionUp

void moveResolutionUp(String id)
Move the resolution up in the order.

Parameters:
id - id of the resolution.

moveResolutionDown

void moveResolutionDown(String id)
Move the resolution down in the order.

Parameters:
id - id of the resolution.

setDefaultResolution

void setDefaultResolution(String id)
Sets the default resolution.

You can pass null to clear the default.

Parameters:
id - resolution id or null.

getDefaultResolution

Resolution getDefaultResolution()
Returns the default resolution.

Will return null if no default is set.

Returns:
the default resolution.


Copyright © 2002-2012 Atlassian. All Rights Reserved.