com.atlassian.jira.config
Class DefaultConstantsManager

java.lang.Object
  extended bycom.atlassian.jira.config.DefaultConstantsManager
All Implemented Interfaces:
ConstantsManager

public class DefaultConstantsManager
extends Object
implements ConstantsManager


Field Summary
static org.apache.commons.collections.Predicate REGULAR_ISSUE_TYPE_PREDICATE
           
static org.apache.commons.collections.Predicate SUBTASK_PREDICATE
           
 
Fields inherited from interface com.atlassian.jira.config.ConstantsManager
ALL_ISSUE_TYPES, ALL_STANDARD_ISSUE_TYPES, ALL_SUB_TASK_ISSUE_TYPES, ISSUE_TYPE_CONSTANT_TYPE, PRIORITY_CONSTANT_TYPE, RESOLUTION_CONSTANT_TYPE, STATUS_CONSTANT_TYPE
 
Constructor Summary
DefaultConstantsManager(JiraAuthenticationContext authenticationContext)
           
 
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()
           
 org.ofbiz.core.entity.GenericValue getStatus(String id)
           
 Status getStatusByName(String name)
           
 Collection getStatuses()
           
 Status getStatusObject(String id)
           
 Collection getStatusObjects()
           
 Collection getSubTaskIssueTypeObjects()
           
 Collection getSubTaskIssueTypes()
          Retrieve subtask 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)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

SUBTASK_PREDICATE

public static final org.apache.commons.collections.Predicate SUBTASK_PREDICATE

REGULAR_ISSUE_TYPE_PREDICATE

public static final org.apache.commons.collections.Predicate REGULAR_ISSUE_TYPE_PREDICATE
Constructor Detail

DefaultConstantsManager

public DefaultConstantsManager(JiraAuthenticationContext authenticationContext)
Method Detail

getStatuses

public Collection getStatuses()
Specified by:
getStatuses in interface ConstantsManager

getStatusObjects

public Collection getStatusObjects()
Specified by:
getStatusObjects in interface ConstantsManager

getStatus

public org.ofbiz.core.entity.GenericValue getStatus(String id)
Specified by:
getStatus in interface ConstantsManager

getStatusObject

public Status getStatusObject(String id)
Specified by:
getStatusObject in interface ConstantsManager

refreshStatuses

public void refreshStatuses()
Specified by:
refreshStatuses in interface ConstantsManager

getConstant

public org.ofbiz.core.entity.GenericValue getConstant(String constantType,
                                                      String id)
Specified by:
getConstant in interface ConstantsManager

getConstantObject

public IssueConstant getConstantObject(String constantType,
                                       String id)
Description copied from interface: ConstantsManager
Returns an IssueConstant object for the given type & id.

Specified by:
getConstantObject in interface ConstantsManager
Parameters:
constantType - case insensitive
id - of the constant
Returns:
IssueConstant object. Null if does not exist

getConstantObjects

public Collection getConstantObjects(String constantType)
Specified by:
getConstantObjects in interface ConstantsManager

convertToConstantObjects

public List convertToConstantObjects(String constantType,
                                     Collection ids)
Description copied from interface: ConstantsManager
Converts the list of ids to the objects of appropriate types

Specified by:
convertToConstantObjects in interface ConstantsManager
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)
Specified by:
constantExists in interface ConstantsManager

getConstantByName

public org.ofbiz.core.entity.GenericValue getConstantByName(String constantType,
                                                            String name)
Specified by:
getConstantByName in interface ConstantsManager

createIssueType

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

Specified by:
createIssueType in interface ConstantsManager
Parameters:
name -
sequence -
style -
description -
iconurl -
Throws:
CreateException

validateCreateIssueType

public void validateCreateIssueType(String name,
                                    String style,
                                    String description,
                                    String iconurl,
                                    ErrorCollection errors,
                                    String nameFieldName)
Specified by:
validateCreateIssueType in interface ConstantsManager

updateIssueType

public void updateIssueType(String id,
                            String name,
                            Long sequence,
                            String style,
                            String description,
                            String iconurl)
                     throws StoreException
Specified by:
updateIssueType in interface ConstantsManager
Throws:
StoreException

removeIssueType

public void removeIssueType(String id)
                     throws RemoveException
Specified by:
removeIssueType in interface ConstantsManager
Throws:
RemoveException

storeIssueTypes

public void storeIssueTypes(List issueTypes)
                     throws StoreException
Specified by:
storeIssueTypes in interface ConstantsManager
Throws:
StoreException

refresh

public void refresh()
Specified by:
refresh in interface ConstantsManager

expandIssueTypeIds

public List expandIssueTypeIds(Collection issueTypeIds)
Description copied from interface: ConstantsManager
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

Specified by:
expandIssueTypeIds in interface ConstantsManager
Parameters:
issueTypeIds -

getAllIssueTypeIds

public List getAllIssueTypeIds()
Specified by:
getAllIssueTypeIds in interface ConstantsManager

getIssueConstant

public IssueConstant getIssueConstant(org.ofbiz.core.entity.GenericValue issueConstantGV)
Specified by:
getIssueConstant in interface ConstantsManager

getPriorities

public Collection getPriorities()
Specified by:
getPriorities in interface ConstantsManager

getPriorityObjects

public Collection getPriorityObjects()
Specified by:
getPriorityObjects in interface ConstantsManager

getPriorityObject

public Priority getPriorityObject(String id)
Specified by:
getPriorityObject in interface ConstantsManager

getDefaultPriority

public org.ofbiz.core.entity.GenericValue getDefaultPriority()
Specified by:
getDefaultPriority in interface ConstantsManager

getPriority

public org.ofbiz.core.entity.GenericValue getPriority(String id)
Specified by:
getPriority in interface ConstantsManager

getResolutionObject

public Resolution getResolutionObject(String id)
Specified by:
getResolutionObject in interface ConstantsManager

refreshPriorities

public void refreshPriorities()
Specified by:
refreshPriorities in interface ConstantsManager

getResolutions

public Collection getResolutions()
Specified by:
getResolutions in interface ConstantsManager
Returns:
A List of Resolution GenericValues.

getResolutionObjects

public Collection getResolutionObjects()
Specified by:
getResolutionObjects in interface ConstantsManager

getResolution

public org.ofbiz.core.entity.GenericValue getResolution(String id)
Specified by:
getResolution in interface ConstantsManager

refreshResolutions

public void refreshResolutions()
Specified by:
refreshResolutions in interface ConstantsManager

getIssueTypes

public Collection getIssueTypes()
Description copied from interface: ConstantsManager
Retrieve regular (non-subtask) issue types.

Specified by:
getIssueTypes in interface ConstantsManager
Returns:
A collection of IssueType GenericValues

getAllIssueTypeObjects

public Collection getAllIssueTypeObjects()
Specified by:
getAllIssueTypeObjects in interface ConstantsManager

getRegularIssueTypeObjects

public Collection getRegularIssueTypeObjects()
Specified by:
getRegularIssueTypeObjects in interface ConstantsManager

getSubTaskIssueTypeObjects

public Collection getSubTaskIssueTypeObjects()
Specified by:
getSubTaskIssueTypeObjects in interface ConstantsManager

getStatusByName

public Status getStatusByName(String name)
Specified by:
getStatusByName in interface ConstantsManager

getSubTaskIssueTypes

public Collection getSubTaskIssueTypes()
Retrieve subtask issue types.

Specified by:
getSubTaskIssueTypes in interface ConstantsManager
Returns:
A collection of IssueType GenericValues

getEditableSubTaskIssueTypes

public List getEditableSubTaskIssueTypes()
Specified by:
getEditableSubTaskIssueTypes in interface ConstantsManager

getAllIssueTypes

public List getAllIssueTypes()
Specified by:
getAllIssueTypes in interface ConstantsManager

getIssueType

public org.ofbiz.core.entity.GenericValue getIssueType(String id)
Specified by:
getIssueType in interface ConstantsManager

getIssueTypeObject

public IssueType getIssueTypeObject(String id)
Specified by:
getIssueTypeObject in interface ConstantsManager

refreshIssueTypes

public void refreshIssueTypes()
Specified by:
refreshIssueTypes in interface ConstantsManager


Copyright © 2002-2006 Atlassian. All Rights Reserved.