|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.atlassian.jira.config.DefaultConstantsManager
public class DefaultConstantsManager
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)
Checks if a constant exists. |
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 Also see ConstantsManager.ALL_STANDARD_ISSUE_TYPES , ConstantsManager.ALL_SUB_TASK_ISSUE_TYPES and
ConstantsManager.ALL_ISSUE_TYPES . |
List |
getAllIssueTypeIds()
Returns all issueType Ids. |
Collection |
getAllIssueTypeObjects()
Returns a list of IssueTypes. |
List |
getAllIssueTypes()
Returns a list of IssueTypes. |
org.ofbiz.core.entity.GenericValue |
getConstant(String constantType,
String id)
Generic method to retrieve a particular constant type. |
org.ofbiz.core.entity.GenericValue |
getConstantByName(String constantType,
String name)
Returns a constant by name. |
IssueConstant |
getConstantObject(String constantType,
String id)
Returns an IssueConstant object for the given type & id. |
Collection |
getConstantObjects(String constantType)
Returns all IssueConstant objects for the given type. |
org.ofbiz.core.entity.GenericValue |
getDefaultPriority()
Returns the default priority configured in JIRA. |
List |
getEditableSubTaskIssueTypes()
Retrieves an editable list of sub-task issues. |
IssueConstant |
getIssueConstant(org.ofbiz.core.entity.GenericValue issueConstantGV)
Converts a constant GenericValue to an IssueConstant object. |
org.ofbiz.core.entity.GenericValue |
getIssueType(String id)
Given an issueType ID this method retrieves that issueType. |
IssueType |
getIssueTypeObject(String id)
Given an issueType ID this method retrieves that issueType. |
Collection |
getIssueTypes()
Retrieve regular (non-subtask) issue types. |
Collection |
getPriorities()
Retrieve all Priorities in JIRA. |
org.ofbiz.core.entity.GenericValue |
getPriority(String id)
Given a priority ID, this method retrieves that priority. |
String |
getPriorityName(String id)
Returns the priority Name for a given priority ID. |
Priority |
getPriorityObject(String id)
Given a priority ID, this method retrieves that priority. |
Collection |
getPriorityObjects()
Retrieve all Priorities in JIRA. |
Collection |
getRegularIssueTypeObjects()
Retrieve regular (non-subtask) issue types. |
org.ofbiz.core.entity.GenericValue |
getResolution(String id)
Given a resolution ID, this method retrieves that resolution. |
Resolution |
getResolutionObject(String id)
Given a resolution ID, this method retrieves that resolution. |
Collection |
getResolutionObjects()
Retrieve all Resolutions in JIRA. |
Collection |
getResolutions()
Retrieve all Resolutions in JIRA. |
org.ofbiz.core.entity.GenericValue |
getStatus(String id)
Returns a Status given an id. |
Status |
getStatusByName(String name)
Searches for a given status by name. |
Collection |
getStatuses()
Returns all statuses |
Status |
getStatusObject(String id)
Returns a Status given an id. |
Collection |
getStatusObjects()
Returns all statuses |
Collection |
getSubTaskIssueTypeObjects()
Retrieves all the sub-task issue types |
Collection |
getSubTaskIssueTypes()
Retrieve subtask issue types. |
void |
refresh()
Sets all cached copies of constant to null. |
void |
refreshIssueTypes()
Reloads all IssueTypes from the DB. |
void |
refreshPriorities()
Reloads all priorities from the DB. |
void |
refreshResolutions()
Reloads all resolutions from the DB. |
void |
refreshStatuses()
Reloads all statuses from DB. |
void |
removeIssueType(String id)
Removes an existing issueType. |
void |
storeIssueTypes(List issueTypes)
Bulk operation to store a list of issueTypes. |
void |
updateIssueType(String id,
String name,
Long sequence,
String style,
String description,
String iconurl)
Updates an existing issueType. |
void |
validateCreateIssueType(String name,
String style,
String description,
String iconurl,
ErrorCollection errors,
String nameFieldName)
Validates creation of a new issuetype. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final org.apache.commons.collections.Predicate SUBTASK_PREDICATE
public static final org.apache.commons.collections.Predicate REGULAR_ISSUE_TYPE_PREDICATE
Constructor Detail |
---|
public DefaultConstantsManager(JiraAuthenticationContext authenticationContext)
Method Detail |
---|
public Collection getStatuses()
ConstantsManager
getStatuses
in interface ConstantsManager
GenericValue
s.public Collection getStatusObjects()
ConstantsManager
getStatusObjects
in interface ConstantsManager
Status
objectspublic org.ofbiz.core.entity.GenericValue getStatus(String id)
ConstantsManager
getStatus
in interface ConstantsManager
id
- The id of a status
GenericValue
public Status getStatusObject(String id)
ConstantsManager
getStatusObject
in interface ConstantsManager
id
- The id of a status
Status
object.public void refreshStatuses()
ConstantsManager
refreshStatuses
in interface ConstantsManager
public org.ofbiz.core.entity.GenericValue getConstant(String constantType, String id)
ConstantsManager
getConstant
in interface ConstantsManager
constantType
- See ConstantsManager.PRIORITY_CONSTANT_TYPE
, ConstantsManager.STATUS_CONSTANT_TYPE
, ConstantsManager.RESOLUTION_CONSTANT_TYPE
, ConstantsManager.ISSUE_TYPE_CONSTANT_TYPE
id
- The id of the constant.
GenericValue
containing the constant. Null if it doesn't exist.public IssueConstant getConstantObject(String constantType, String id)
ConstantsManager
IssueConstant
object for the given type & id.
getConstantObject
in interface ConstantsManager
constantType
- See ConstantsManager.PRIORITY_CONSTANT_TYPE
, ConstantsManager.STATUS_CONSTANT_TYPE
, ConstantsManager.RESOLUTION_CONSTANT_TYPE
, ConstantsManager.ISSUE_TYPE_CONSTANT_TYPE
id
- The id of the constant.
IssueConstant
object. Null if it doesn't exist.public Collection getConstantObjects(String constantType)
ConstantsManager
IssueConstant
objects for the given type.
getConstantObjects
in interface ConstantsManager
constantType
- See ConstantsManager.PRIORITY_CONSTANT_TYPE
, ConstantsManager.STATUS_CONSTANT_TYPE
, ConstantsManager.RESOLUTION_CONSTANT_TYPE
, ConstantsManager.ISSUE_TYPE_CONSTANT_TYPE
IssueConstant
object.public List convertToConstantObjects(String constantType, Collection ids)
ConstantsManager
convertToConstantObjects
in interface ConstantsManager
constantType
- the constant type. Case insenstiveids
- list of constant ids or GenericValues
public boolean constantExists(String constantType, String name)
ConstantsManager
constantExists
in interface ConstantsManager
constantType
- See ConstantsManager.PRIORITY_CONSTANT_TYPE
, ConstantsManager.STATUS_CONSTANT_TYPE
, ConstantsManager.RESOLUTION_CONSTANT_TYPE
, ConstantsManager.ISSUE_TYPE_CONSTANT_TYPE
name
- The name of the constant.
public org.ofbiz.core.entity.GenericValue getConstantByName(String constantType, String name)
ConstantsManager
getConstantByName
in interface ConstantsManager
constantType
- See ConstantsManager.PRIORITY_CONSTANT_TYPE
, ConstantsManager.STATUS_CONSTANT_TYPE
, ConstantsManager.RESOLUTION_CONSTANT_TYPE
, ConstantsManager.ISSUE_TYPE_CONSTANT_TYPE
name
- The Name of the constant.
GenericValue
public org.ofbiz.core.entity.GenericValue createIssueType(String name, Long sequence, String style, String description, String iconurl) throws CreateException
ConstantsManager
ConstantsManager.validateCreateIssueType(String, String, String, String, com.atlassian.jira.util.ErrorCollection, String)
createIssueType
in interface ConstantsManager
name
- Name of the new IssueTypesequence
- Sequence number used for ordering the issuetypes in the UI.style
- Used to record the type of issue, such as SUBTASK. Null for regular issues.description
- A short description of the new issue type.iconurl
- A URL to an icon to be used for the new issueType.
CreateException
public void validateCreateIssueType(String name, String style, String description, String iconurl, ErrorCollection errors, String nameFieldName)
ConstantsManager
validateCreateIssueType
in interface ConstantsManager
name
- Name of the new IssueTypestyle
- Used to record the type of issue, such as SUBTASK. Null for regular issues.description
- A short description of the new issue type.iconurl
- A URL to an icon to be used for the new issueType.errors
- A collection of errors used to pass back any problems.nameFieldName
- The field to which the errors should be added.public void updateIssueType(String id, String name, Long sequence, String style, String description, String iconurl) throws StoreException
ConstantsManager
updateIssueType
in interface ConstantsManager
id
- ID of the existing issuetype.name
- Name of the new IssueTypesequence
- Sequence number used for ordering the issuetypes in the UI.style
- Used to record the type of issue, such as SUBTASK. Null for regular issues.description
- A short description of the new issue type.iconurl
- A URL to an icon to be used for the new issueType.
StoreException
public void removeIssueType(String id) throws RemoveException
ConstantsManager
removeIssueType
in interface ConstantsManager
id
- ID of an existing issueType
RemoveException
- if the issueType with id doesn't exist, or an error occured removing the issue.public void storeIssueTypes(List issueTypes) throws StoreException
ConstantsManager
storeIssueTypes
in interface ConstantsManager
issueTypes
- A list of IssueType GenericValue
s
StoreException
public void refresh()
ConstantsManager
refresh
in interface ConstantsManager
public List expandIssueTypeIds(Collection issueTypeIds)
ConstantsManager
ConstantsManager.ALL_STANDARD_ISSUE_TYPES
, ConstantsManager.ALL_SUB_TASK_ISSUE_TYPES
and
ConstantsManager.ALL_ISSUE_TYPES
.
expandIssueTypeIds
in interface ConstantsManager
issueTypeIds
- A collection of the issuetype Ids to retrieve.public List getAllIssueTypeIds()
ConstantsManager
getAllIssueTypeIds
in interface ConstantsManager
public IssueConstant getIssueConstant(org.ofbiz.core.entity.GenericValue issueConstantGV)
ConstantsManager
GenericValue
to an IssueConstant
object.
getIssueConstant
in interface ConstantsManager
issueConstantGV
- the constant GenericValue
.
IssueConstant
object.public Collection getPriorities()
ConstantsManager
getPriorities
in interface ConstantsManager
GenericValue
s.public Collection getPriorityObjects()
ConstantsManager
getPriorityObjects
in interface ConstantsManager
Priority
s.public Priority getPriorityObject(String id)
ConstantsManager
getPriorityObject
in interface ConstantsManager
id
- The id of the priority
Priority
object.public org.ofbiz.core.entity.GenericValue getDefaultPriority()
ConstantsManager
getDefaultPriority
in interface ConstantsManager
GenericValue
.public org.ofbiz.core.entity.GenericValue getPriority(String id)
ConstantsManager
getPriority
in interface ConstantsManager
id
- The id of the priority
GenericValue
public String getPriorityName(String id)
ConstantsManager
getPriorityName
in interface ConstantsManager
id
- the id of a priority
public Resolution getResolutionObject(String id)
ConstantsManager
getResolutionObject
in interface ConstantsManager
id
- The id of the resolution
Resolution
object.public void refreshPriorities()
ConstantsManager
refreshPriorities
in interface ConstantsManager
public Collection getResolutions()
ConstantsManager
getResolutions
in interface ConstantsManager
GenericValue
s.public Collection getResolutionObjects()
ConstantsManager
getResolutionObjects
in interface ConstantsManager
Resolution
objects.public org.ofbiz.core.entity.GenericValue getResolution(String id)
ConstantsManager
getResolution
in interface ConstantsManager
id
- The id of the resolution
GenericValue
public void refreshResolutions()
ConstantsManager
refreshResolutions
in interface ConstantsManager
public Collection getIssueTypes()
ConstantsManager
getIssueTypes
in interface ConstantsManager
GenericValue
spublic Collection getAllIssueTypeObjects()
ConstantsManager
getAllIssueTypeObjects
in interface ConstantsManager
IssueType
objects.public Collection getRegularIssueTypeObjects()
ConstantsManager
getRegularIssueTypeObjects
in interface ConstantsManager
IssueType
spublic Collection getSubTaskIssueTypeObjects()
ConstantsManager
getSubTaskIssueTypeObjects
in interface ConstantsManager
IssueType
s.public Status getStatusByName(String name)
ConstantsManager
getStatusByName
in interface ConstantsManager
name
- The name of the status.
Status
object with the given name, or null
if none found.public Collection getSubTaskIssueTypes()
getSubTaskIssueTypes
in interface ConstantsManager
GenericValue
spublic List getEditableSubTaskIssueTypes()
ConstantsManager
getEditableSubTaskIssueTypes
in interface ConstantsManager
GenericValue
spublic List getAllIssueTypes()
ConstantsManager
getAllIssueTypes
in interface ConstantsManager
GenericValue
issueTypes.public org.ofbiz.core.entity.GenericValue getIssueType(String id)
ConstantsManager
getIssueType
in interface ConstantsManager
id
- The ID of the IssueType.
GenericValue
public IssueType getIssueTypeObject(String id)
ConstantsManager
getIssueTypeObject
in interface ConstantsManager
id
- The ID of the IssueType.
IssueType
objectpublic void refreshIssueTypes()
ConstantsManager
refreshIssueTypes
in interface ConstantsManager
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |