com.atlassian.jira.bc.config
Interface ConstantsService

All Known Implementing Classes:
DefaultConstantsService

public interface ConstantsService

This class contains methods for managing JIRA constants such as issue types, statuses, priorities and resolutions.

Since:
v4.2

Method Summary
 ServiceOutcome<Collection<IssueType>> getAllIssueTypes(com.atlassian.crowd.embedded.api.User user)
          Returns a ServiceOutcome containing all IssueTypes.
 ServiceOutcome<Collection<Status>> getAllStatuses(com.atlassian.crowd.embedded.api.User user)
          Returns a ServiceOutcome containing all Statuses.
 ServiceOutcome<IssueType> getIssueTypeById(com.atlassian.crowd.embedded.api.User user, String issueTypeId)
          Returns a ServiceOutcome containing the IssueType that has the given id.
 ServiceOutcome<Status> getStatusById(com.atlassian.crowd.embedded.api.User user, String statusId)
          Returns a ServiceOutcome containing the Status that has the given id.
 ServiceOutcome<Status> getStatusByName(com.atlassian.crowd.embedded.api.User user, String statusName)
          Returns a ServiceOutcome containing the Status that has the given Name.
 ServiceOutcome<Status> getStatusByTranslatedName(com.atlassian.crowd.embedded.api.User user, String statusName)
          Returns a ServiceOutcome containing the Status that has the given Name.
 

Method Detail

getStatusById

ServiceOutcome<Status> getStatusById(com.atlassian.crowd.embedded.api.User user,
                                     String statusId)
Returns a ServiceOutcome containing the Status that has the given id. If the Status with the provided id is not found, or if the calling user does not have permission to see the Status, the ServiceOutcome will contain the appropriate error. Otherwise, the status can be obtained by calling ServiceOutcome.getReturnedValue() on the returned ServiceOutcome.

Parameters:
user - the calling user
statusId - a String containing a Status id
Returns:
a ServiceOutcome

getStatusByName

ServiceOutcome<Status> getStatusByName(com.atlassian.crowd.embedded.api.User user,
                                       String statusName)
Returns a ServiceOutcome containing the Status that has the given Name. If the Status with the provided Name is not found, or if the calling user does not have permission to see the Status, the ServiceOutcome will contain the appropriate error. Otherwise, the status can be obtained by calling ServiceOutcome.getReturnedValue() on the returned ServiceOutcome.

Parameters:
user - the calling user
statusName - a String containing a Status name
Returns:
a ServiceOutcome

getStatusByTranslatedName

ServiceOutcome<Status> getStatusByTranslatedName(com.atlassian.crowd.embedded.api.User user,
                                                 String statusName)
Returns a ServiceOutcome containing the Status that has the given Name. The preference is to find the status by its translated name. If no matching translated name is found the true (untranslated) name will be tried. If the Status with the provided Name is not found, or if the calling user does not have permission to see the Status, the ServiceOutcome will contain the appropriate error. Otherwise, the status can be obtained by calling ServiceOutcome.getReturnedValue() on the returned ServiceOutcome.

Parameters:
user - the calling user
statusName - a String containing a Status name
Returns:
a ServiceOutcome

getAllStatuses

ServiceOutcome<Collection<Status>> getAllStatuses(com.atlassian.crowd.embedded.api.User user)
Returns a ServiceOutcome containing all Statuses. Only statuses that the calling user has permission to see will be returned in the ServiceOutcome

Parameters:
user - the calling user
Returns:
a ServiceOutcome

getAllIssueTypes

ServiceOutcome<Collection<IssueType>> getAllIssueTypes(com.atlassian.crowd.embedded.api.User user)
Returns a ServiceOutcome containing all IssueTypes. Only issue types that the calling user has permission to see will be returned in the ServiceOutcome

Parameters:
user - the calling user
Returns:
a ServiceOutcome

getIssueTypeById

ServiceOutcome<IssueType> getIssueTypeById(com.atlassian.crowd.embedded.api.User user,
                                           String issueTypeId)
Returns a ServiceOutcome containing the IssueType that has the given id. If there is no IssueType with the given id, or if the calling user does not have permission to see the IssueType, the ServiceOutcome will contain an error message to that effect. Otherwise, the IssueType can be obtained by calling ServiceOutcome.getReturnedValue() on the returned ServiceOutcome.

Parameters:
user - the calling user
issueTypeId - a String containing an IssueType id
Returns:
a ServiceOutcome


Copyright © 2002-2012 Atlassian. All Rights Reserved.