com.atlassian.jira.bc.config
Class DefaultConstantsService

java.lang.Object
  extended by com.atlassian.jira.bc.config.DefaultConstantsService
All Implemented Interfaces:
ConstantsService

public class DefaultConstantsService
extends java.lang.Object
implements ConstantsService

This class implements constant-related business cases.

Since:
v4.2

Constructor Summary
DefaultConstantsService(I18nHelper i18n, ConstantsManager constantsManager, PermissionManager permissionManager, WorkflowSchemeManager workflowSchemeMgr, WorkflowManager workflowMgr, IssueTypeSchemeManager issueTypeSchemeMgr)
          Creates a new DefaultConstantsService.
 
Method Summary
 ServiceOutcome<IssueType> getIssueTypeById(com.opensymphony.user.User user, java.lang.String issueTypeId)
          Returns a ServiceOutcome containing the IssueType that has the given id.
 ServiceOutcome<Status> getStatusById(com.opensymphony.user.User user, java.lang.String statusId)
          Returns a ServiceOutcome containing the Status that has the given id.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DefaultConstantsService

public DefaultConstantsService(I18nHelper i18n,
                               ConstantsManager constantsManager,
                               PermissionManager permissionManager,
                               WorkflowSchemeManager workflowSchemeMgr,
                               WorkflowManager workflowMgr,
                               IssueTypeSchemeManager issueTypeSchemeMgr)
Creates a new DefaultConstantsService.

Parameters:
i18n - a I18nHelper
constantsManager - a ConstantsManager
permissionManager - a PermissionManager
workflowSchemeMgr - a WorkflowSchemeManager
workflowMgr - a WorkflowManager
issueTypeSchemeMgr - an IssueTypeSchemeManager
Method Detail

getStatusById

public ServiceOutcome<Status> getStatusById(com.opensymphony.user.User user,
                                            java.lang.String statusId)
Description copied from interface: ConstantsService
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.

Specified by:
getStatusById in interface ConstantsService
Parameters:
user - the calling user
statusId - a String containing a Status id
Returns:
a ServiceOutcome

getIssueTypeById

public ServiceOutcome<IssueType> getIssueTypeById(com.opensymphony.user.User user,
                                                  java.lang.String issueTypeId)
Description copied from interface: ConstantsService
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.

Specified by:
getIssueTypeById in interface ConstantsService
Parameters:
user - the calling user
issueTypeId - a String containing an IssueType id
Returns:
a ServiceOutcome


Copyright © 2002-2010 Atlassian. All Rights Reserved.