com.atlassian.jira.config
Interface ConstantsManager

All Known Implementing Classes:
DefaultConstantsManager

public interface ConstantsManager

Manager for issue types, statuses, priorities and resolutions.


Field Summary
static String ALL_ISSUE_TYPES
           
static String ALL_STANDARD_ISSUE_TYPES
           
static String ALL_SUB_TASK_ISSUE_TYPES
           
static String ISSUE_TYPE_CONSTANT_TYPE
           
static String PRIORITY_CONSTANT_TYPE
           
static String RESOLUTION_CONSTANT_TYPE
           
static String STATUS_CONSTANT_TYPE
           
 
Method Summary
 boolean constantExists(String constantType, String name)
           
 List convertToConstantObjects(String constantType, Collection ids)
          Converts the list of ids to the objects of appropriate types
 org.ofbiz.core.entity.GenericValue createIssueType(String name, Long sequence, String style, String description, String iconurl)
          Note this metod does not validate the input - i.e.
 List expandIssueTypeIds(Collection issueTypeIds)
          Converts the 'special' ids of issue types to a list of issue type ids For example, converts a special id to a list of all sub-task issue types
 List getAllIssueTypeIds()
           
 Collection getAllIssueTypeObjects()
           
 List getAllIssueTypes()
           
 org.ofbiz.core.entity.GenericValue getConstant(String constantType, String id)
           
 org.ofbiz.core.entity.GenericValue getConstantByName(String constantType, String name)
           
 IssueConstant getConstantObject(String constantType, String id)
          Returns an IssueConstant object for the given type & id.
 Collection getConstantObjects(String constantType)
           
 org.ofbiz.core.entity.GenericValue getDefaultPriority()
           
 List getEditableSubTaskIssueTypes()
           
 IssueConstant getIssueConstant(org.ofbiz.core.entity.GenericValue issueConstantGV)
           
 org.ofbiz.core.entity.GenericValue getIssueType(String id)
           
 IssueType getIssueTypeObject(String id)
           
 Collection getIssueTypes()
          Retrieve regular (non-subtask) issue types.
 Collection getPriorities()
           
 org.ofbiz.core.entity.GenericValue getPriority(String id)
           
 Priority getPriorityObject(String id)
           
 Collection getPriorityObjects()
           
 Collection getRegularIssueTypeObjects()
           
 org.ofbiz.core.entity.GenericValue getResolution(String id)
           
 Resolution getResolutionObject(String id)
           
 Collection getResolutionObjects()
           
 Collection getResolutions()
          Deprecated. We should look to use getResolutionObjects instead
 org.ofbiz.core.entity.GenericValue getStatus(String id)
           
 Status getStatusByName(String name)
           
 Collection getStatuses()
           
 Status getStatusObject(String id)
           
 Collection getStatusObjects()
           
 Collection getSubTaskIssueTypeObjects()
           
 Collection getSubTaskIssueTypes()
          Retrieves all the sub-task issue types
 void refresh()
           
 void refreshIssueTypes()
           
 void refreshPriorities()
           
 void refreshResolutions()
           
 void refreshStatuses()
           
 void removeIssueType(String id)
           
 void storeIssueTypes(List issueTypes)
           
 void updateIssueType(String id, String name, Long sequence, String style, String description, String iconurl)
           
 void validateCreateIssueType(String name, String style, String description, String iconurl, ErrorCollection errors, String nameFieldName)
           
 

Field Detail

ALL_STANDARD_ISSUE_TYPES

public static final String ALL_STANDARD_ISSUE_TYPES
See Also:
Constant Field Values

ALL_SUB_TASK_ISSUE_TYPES

public static final String ALL_SUB_TASK_ISSUE_TYPES
See Also:
Constant Field Values

ALL_ISSUE_TYPES

public static final String ALL_ISSUE_TYPES
See Also:
Constant Field Values

PRIORITY_CONSTANT_TYPE

public static final String PRIORITY_CONSTANT_TYPE
See Also:
Constant Field Values

STATUS_CONSTANT_TYPE

public static final String STATUS_CONSTANT_TYPE
See Also:
Constant Field Values

RESOLUTION_CONSTANT_TYPE

public static final String RESOLUTION_CONSTANT_TYPE
See Also:
Constant Field Values

ISSUE_TYPE_CONSTANT_TYPE

public static final String ISSUE_TYPE_CONSTANT_TYPE
See Also:
Constant Field Values
Method Detail

getPriorities

public Collection getPriorities()

getPriorityObjects

public Collection getPriorityObjects()

getPriority

public org.ofbiz.core.entity.GenericValue getPriority(String id)

getPriorityObject

public Priority getPriorityObject(String id)

getDefaultPriority

public org.ofbiz.core.entity.GenericValue getDefaultPriority()

refreshPriorities

public void refreshPriorities()

getResolutions

public Collection getResolutions()
Deprecated. We should look to use getResolutionObjects instead

Returns:
A List of Resolution GenericValues.

getResolutionObjects

public Collection getResolutionObjects()

getResolution

public org.ofbiz.core.entity.GenericValue getResolution(String id)

getResolutionObject

public Resolution getResolutionObject(String id)

refreshResolutions

public void refreshResolutions()

getIssueTypes

public Collection getIssueTypes()
Retrieve regular (non-subtask) issue types.

Returns:
A collection of IssueType GenericValues

getIssueType

public org.ofbiz.core.entity.GenericValue getIssueType(String id)

getIssueTypeObject

public IssueType getIssueTypeObject(String id)

refreshIssueTypes

public void refreshIssueTypes()

getStatus

public org.ofbiz.core.entity.GenericValue getStatus(String id)

getStatusObject

public Status getStatusObject(String id)

getStatuses

public Collection getStatuses()

getStatusObjects

public Collection getStatusObjects()

refreshStatuses

public void refreshStatuses()

getConstant

public org.ofbiz.core.entity.GenericValue getConstant(String constantType,
                                                      String id)

getConstantObject

public IssueConstant getConstantObject(String constantType,
                                       String id)
Returns an IssueConstant object for the given type & id.

Parameters:
constantType - case insensitive
id - of the constant
Returns:
IssueConstant object. Null if does not exist

getConstantObjects

public Collection getConstantObjects(String constantType)

convertToConstantObjects

public List convertToConstantObjects(String constantType,
                                     Collection ids)
Converts the list of ids to the objects of appropriate types

Parameters:
constantType - the constant type. Case insenstive
ids - list of constant ids or GenericValues
Returns:
List of IssueConstant subclasses. Null if constantType is null or the ids are empty

constantExists

public boolean constantExists(String constantType,
                              String name)

createIssueType

public org.ofbiz.core.entity.GenericValue createIssueType(String name,
                                                          Long sequence,
                                                          String style,
                                                          String description,
                                                          String iconurl)
                                                   throws CreateException
Note this metod does not validate the input - i.e. It does not check for duplicate names etc.

Parameters:
name -
sequence -
style -
description -
iconurl -
Throws:
CreateException

validateCreateIssueType

public void validateCreateIssueType(String name,
                                    String style,
                                    String description,
                                    String iconurl,
                                    ErrorCollection errors,
                                    String nameFieldName)

updateIssueType

public void updateIssueType(String id,
                            String name,
                            Long sequence,
                            String style,
                            String description,
                            String iconurl)
                     throws StoreException
Throws:
StoreException

removeIssueType

public void removeIssueType(String id)
                     throws RemoveException
Throws:
RemoveException

getConstantByName

public org.ofbiz.core.entity.GenericValue getConstantByName(String constantType,
                                                            String name)

getSubTaskIssueTypes

public Collection getSubTaskIssueTypes()
Retrieves all the sub-task issue types


getEditableSubTaskIssueTypes

public List getEditableSubTaskIssueTypes()

getAllIssueTypes

public List getAllIssueTypes()

storeIssueTypes

public void storeIssueTypes(List issueTypes)
                     throws StoreException
Throws:
StoreException

refresh

public void refresh()

expandIssueTypeIds

public List expandIssueTypeIds(Collection issueTypeIds)
Converts the 'special' ids of issue types to a list of issue type ids For example, converts a special id to a list of all sub-task issue types

Parameters:
issueTypeIds -

getAllIssueTypeIds

public List getAllIssueTypeIds()

getIssueConstant

public IssueConstant getIssueConstant(org.ofbiz.core.entity.GenericValue issueConstantGV)

getAllIssueTypeObjects

public Collection getAllIssueTypeObjects()

getRegularIssueTypeObjects

public Collection getRegularIssueTypeObjects()

getSubTaskIssueTypeObjects

public Collection getSubTaskIssueTypeObjects()

getStatusByName

public Status getStatusByName(String name)


Copyright © 2002-2006 Atlassian. All Rights Reserved.