com.atlassian.jira.config.ConstantsManager |
![]() |
Clients of @PublicApi
can expect
that programs compiled against a given version will remain binary compatible with later versions of the
@PublicApi
as per each product's API policy as long as the client does not implement/extend
@PublicApi
interfaces or classes (refer to each product's API policy for the exact
guarantee---usually binary compatibility is guaranteed at least across minor versions).
@PublicApi
interfaces and classes are not designed to be implemented or extended by clients,
we may perform certain types of binary-incompatible changes to these classes and interfaces, but these will not
affect well-behaved clients that do not extend/implement these types (in general, only classes and interfaces
annotated with @PublicSpi
are safe to extend/implement).
Manager for issue types, statuses, priorities and resolutions. This manager is responsible for caching these constants as well as all the usual update, delete, add operations in the database.
Constants | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
String | ALL_ISSUE_TYPES | Used to retrieve all IssueTypes. | |||||||||
String | ALL_STANDARD_ISSUE_TYPES | Used to retrieve a standard IssueTypes. | |||||||||
String | ALL_SUB_TASK_ISSUE_TYPES | Used to retrieve a subtask IssueTypes. | |||||||||
String | ISSUE_TYPE_CONSTANT_TYPE | Used in the generic getConstantObject(String, String) method
|
|||||||||
String | PRIORITY_CONSTANT_TYPE | Used in the generic getConstantObject(String, String) method
|
|||||||||
String | RESOLUTION_CONSTANT_TYPE | Used in the generic getConstantObject(String, String) method
|
|||||||||
String | STATUS_CONSTANT_TYPE | Used in the generic getConstantObject(String, String) method
|
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Checks if a constant exists.
| |||||||||||
Converts the list of ids to the objects of appropriate types
| |||||||||||
This method is deprecated.
Use
insertIssueType(String, Long, String, String, String) instead. Since v5.0.
| |||||||||||
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
ALL_STANDARD_ISSUE_TYPES , ALL_SUB_TASK_ISSUE_TYPES and
ALL_ISSUE_TYPES . | |||||||||||
Returns all issueType Ids.
| |||||||||||
Returns a list of IssueTypes.
| |||||||||||
This method is deprecated.
Use
getAllIssueTypeObjects() instead. Deprecated since v4.0
| |||||||||||
This method is deprecated.
Use
getIssueConstantByName(String, String) . Since v4.3
| |||||||||||
Returns a constant by name ignoring the case of the name passed in.
| |||||||||||
Returns an
IssueConstant object for the given type & id. | |||||||||||
Returns all
IssueConstant objects for the given type. | |||||||||||
This method is deprecated.
Use
getDefaultPriorityObject() instead. Since v4.0
| |||||||||||
Returns the default priority configured in JIRA.
| |||||||||||
Retrieves an editable list of sub-task issues.
| |||||||||||
Converts a constant GenericValue to an
IssueConstant object. | |||||||||||
Returns a constant by name.
| |||||||||||
This method is deprecated.
Use
getIssueTypeObject(String) instead. Since 5.0
| |||||||||||
Given an IssueType ID this method retrieves that IssueType.
| |||||||||||
This method is deprecated.
Use
getRegularIssueTypeObjects() instead.
| |||||||||||
This method is deprecated.
since 1.99. Use
getPriorityObjects() instead
| |||||||||||
Returns the priority Name for a given priority ID.
| |||||||||||
Given a priority ID, this method retrieves that priority.
| |||||||||||
Retrieve all Priorities in JIRA.
| |||||||||||
Retrieve regular (non-subtask) issue types.
| |||||||||||
This method is deprecated.
Use
getResolutionObject(String) instead.
| |||||||||||
Given a resolution ID, this method retrieves that resolution.
| |||||||||||
Retrieve all Resolutions in JIRA.
| |||||||||||
This method is deprecated.
Use
getResolutionObjects() instead.
| |||||||||||
This method is deprecated.
Use
getStatusObject(String) instead. Deprecated since v4.0
| |||||||||||
Searches for a given status by name.
| |||||||||||
Searches for a given status by name ignoring case.
| |||||||||||
Searches for a given status by its translated name.
| |||||||||||
Returns a Status given an id.
| |||||||||||
Returns all statuses
| |||||||||||
This method is deprecated.
Use
getStatusObjects() instead. Deprecated since v4.0
| |||||||||||
Retrieves all the sub-task issue types
| |||||||||||
This method is deprecated.
Use
getSubTaskIssueTypeObjects() instead. Deprecated since v4.0
| |||||||||||
Creates a new IssueType.
| |||||||||||
This method is deprecated.
Use
insertIssueType(String, Long, String, String, Long) instead. Since v6.3.
| |||||||||||
Clear the cache for this Issue Constant.
| |||||||||||
Sets all cached copies of constant to null.
| |||||||||||
This method is deprecated.
since v6.2. Use
invalidateAll()
| |||||||||||
Reloads all IssueTypes from the DB.
| |||||||||||
Reloads all priorities from the DB.
| |||||||||||
Reloads all resolutions from the DB.
| |||||||||||
Reloads all statuses from DB.
| |||||||||||
Removes an existing issueType.
| |||||||||||
Bulk operation to store a list of issueTypes.
| |||||||||||
Updates an existing issueType.
| |||||||||||
This method is deprecated.
use
updateIssueType(String, String, Long, String, String, Long) since v6.3
| |||||||||||
Validates creation of a new issuetype.
| |||||||||||
Validates creation of a new issuetype.
|
Used to retrieve a standard IssueTypes.
Used to retrieve a subtask IssueTypes.
Used in the generic getConstantObject(String, String)
method
Used in the generic getConstantObject(String, String)
method
Used in the generic getConstantObject(String, String)
method
Used in the generic getConstantObject(String, String)
method
Checks if a constant exists.
constantType | See PRIORITY_CONSTANT_TYPE , STATUS_CONSTANT_TYPE , RESOLUTION_CONSTANT_TYPE , ISSUE_TYPE_CONSTANT_TYPE |
---|---|
name | The name of the constant. |
Converts the list of ids to the objects of appropriate types
constantType | the constant type. Case insenstive |
---|---|
ids | list of constant ids or GenericValues |
This method is deprecated.
Use insertIssueType(String, Long, String, String, String)
instead. Since v5.0.
Note this metod does not validate the input - i.e. It does not check for duplicate names etc. Use
this method in conjunction with validateCreateIssueType(String, String, String, String, com.atlassian.jira.util.ErrorCollection, String)
name | Name of the new IssueType |
---|---|
sequence | 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 | If there is an error creating this Issue Type. |
---|
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 ALL_STANDARD_ISSUE_TYPES
, ALL_SUB_TASK_ISSUE_TYPES
and
ALL_ISSUE_TYPES
.
issueTypeIds | A collection of the issuetype Ids to retrieve. |
---|
Returns all issueType Ids.
Returns a list of IssueTypes.
IssueType
objects.
This method is deprecated.
Use getAllIssueTypeObjects()
instead. Deprecated since v4.0
Returns a list of IssueTypes.
This method is deprecated.
Use getIssueConstantByName(String, String)
. Since v4.3
Returns a constant by name.
constantType | See PRIORITY_CONSTANT_TYPE , STATUS_CONSTANT_TYPE , RESOLUTION_CONSTANT_TYPE , ISSUE_TYPE_CONSTANT_TYPE |
---|---|
name | The Name of the constant. |
Returns a constant by name ignoring the case of the name passed in.
constantType | See PRIORITY_CONSTANT_TYPE , STATUS_CONSTANT_TYPE , RESOLUTION_CONSTANT_TYPE , ISSUE_TYPE_CONSTANT_TYPE |
---|---|
name | The Name of the constant, case-insensitive. |
Returns an IssueConstant
object for the given type & id.
constantType | See PRIORITY_CONSTANT_TYPE , STATUS_CONSTANT_TYPE , RESOLUTION_CONSTANT_TYPE , ISSUE_TYPE_CONSTANT_TYPE |
---|---|
id | The id of the constant. |
IssueConstant
object. Null if it doesn't exist.
Returns all IssueConstant
objects for the given type.
constantType | See PRIORITY_CONSTANT_TYPE , STATUS_CONSTANT_TYPE , RESOLUTION_CONSTANT_TYPE , ISSUE_TYPE_CONSTANT_TYPE |
---|
IssueConstant
object.
This method is deprecated.
Use getDefaultPriorityObject()
instead. Since v4.0
Returns the default priority configured in JIRA.
Returns the default priority configured in JIRA.
Retrieves an editable list of sub-task issues.
Converts a constant GenericValue to an IssueConstant
object.
issueConstantGV | the constant GenericValue. |
---|
IssueConstant
object.
Returns a constant by name.
constantType | See PRIORITY_CONSTANT_TYPE , STATUS_CONSTANT_TYPE , RESOLUTION_CONSTANT_TYPE , ISSUE_TYPE_CONSTANT_TYPE |
---|---|
name | The Name of the constant. |
This method is deprecated.
Use getIssueTypeObject(String)
instead. Since 5.0
Given an IssueType ID this method retrieves that IssueType.
id | The ID of the IssueType. |
---|
Given an IssueType ID this method retrieves that IssueType.
id | The ID of the IssueType. |
---|
IssueType
object
This method is deprecated.
Use getRegularIssueTypeObjects()
instead.
Retrieve regular (non-subtask) issue types.
This method is deprecated.
since 1.99. Use getPriorityObjects()
instead
Retrieve all Priorities in JIRA.
Returns the priority Name for a given priority ID.
id | The id of a priority |
---|
Given a priority ID, this method retrieves that priority.
id | The id of the priority |
---|
Priority
object.
Retrieve all Priorities in JIRA.
Priority
s.
Retrieve regular (non-subtask) issue types.
IssueType
s
This method is deprecated.
Use getResolutionObject(String)
instead.
Given a resolution ID, this method retrieves that resolution.
id | The id of the resolution |
---|
Given a resolution ID, this method retrieves that resolution.
id | The id of the resolution |
---|
Resolution
object.
Retrieve all Resolutions in JIRA.
Resolution
objects.
This method is deprecated.
Use getResolutionObjects()
instead.
Retrieve all Resolutions in JIRA.
This method is deprecated.
Use getStatusObject(String)
instead. Deprecated since v4.0
Returns a Status given an id.
id | The id of a status |
---|
Searches for a given status by name. This is not the most efficient implementation. If the name is not found, or the given name is null, then it returns null.
name | The name of the status. |
---|
Status
object with the given name, or null
if none found.
Searches for a given status by name ignoring case. This is not the most efficient implementation. If the name is not found, or the given name is null, then it returns null.
name | The name of the status. |
---|
Status
object with the given name, or null
if none found.
Searches for a given status by its translated name. If no matching translated name is found the true (untranslated) name will be tried. If the name is not found, or the given name is null, then it returns null.
name | The name of the status. |
---|
Status
object with the given name, or null
if none found.
Returns all statuses
Status
objects
This method is deprecated.
Use getStatusObjects()
instead. Deprecated since v4.0
Returns all statuses
Retrieves all the sub-task issue types
IssueType
s.
This method is deprecated.
Use getSubTaskIssueTypeObjects()
instead. Deprecated since v4.0
Retrieves all the sub-task issue types. These will be non-modifiable.
Use getEditableSubTaskIssueTypes()
instead if you require an editable list.
Creates a new IssueType.
Note this method does not validate the input - i.e. It does not check for duplicate names etc. Use
this method in conjunction with validateCreateIssueType(String, String, String, String, com.atlassian.jira.util.ErrorCollection, String)
name | Name of the new IssueType |
---|---|
sequence | 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. |
avatarId | Avatar id, |
CreateException | If there is an error creating this Issue Type. |
---|
This method is deprecated.
Use insertIssueType(String, Long, String, String, Long)
instead. Since v6.3.
Creates a new IssueType.
Note this method does not validate the input - i.e. It does not check for duplicate names etc. Use
this method in conjunction with validateCreateIssueType(String, String, String, String, com.atlassian.jira.util.ErrorCollection, String)
name | Name of the new IssueType |
---|---|
sequence | 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 | If there is an error creating this Issue Type. |
---|
Clear the cache for this Issue Constant. Implementations may clear additional IssueConstants at their discretion.
Sets all cached copies of constant to null. This will cause them to be re-loaded from the DB the next time they are accessed.
This method is deprecated.
since v6.2. Use invalidateAll()
Sets all cached copies of constant to null. This will cause them to be re-loaded from the DB the next time they are accessed.
Reloads all IssueTypes from the DB.
Reloads all priorities from the DB.
Reloads all resolutions from the DB.
Reloads all statuses from DB.
Removes an existing issueType. This will cause a invalidate of all issue types (i.e. reload from the DB).
id | ID of an existing issueType |
---|
RemoveException | if the issueType with id doesn't exist, or an error occured removing the issue. |
---|
Bulk operation to store a list of issueTypes.
issueTypes | A list of IssueType GenericValues |
---|
DataAccessException | indicates an error in the Data Access Layer |
---|
Updates an existing issueType. This will cause a invalidate of all issue types (i.e. reload from the DB).
id | ID of the existing issuetype. |
---|---|
name | Name of the new IssueType |
sequence | 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. |
avatarId | avatarid of new issueType. |
DataAccessException | indicates an error in the Data Access Layer |
---|
This method is deprecated.
use updateIssueType(String, String, Long, String, String, Long)
since v6.3
Updates an existing issueType. This will cause a invalidate of all issue types (i.e. reload from the DB).
id | ID of the existing issuetype. |
---|---|
name | Name of the new IssueType |
sequence | 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. |
DataAccessException | indicates an error in the Data Access Layer |
---|
Validates creation of a new issuetype. In particular, this function checks that a name has been submitted, no other issueTypes with the same name exist, and that the icon URL exists.
name | Name of the new IssueType |
---|---|
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. |
errors | A collection of errors used to pass back any problems. |
nameFieldName | The field to which the errors should be added. |
Validates creation of a new issuetype. In particular, this function checks that a name has been submitted, no other issueTypes with the same name exist and correct avatarId is passed.
name | Name of the new IssueType |
---|---|
style | Used to record the type of issue, such as SUBTASK. Null for regular issues. |
description | A short description of the new issue type. |
avatarId | An avatar id. |
errors | A collection of errors used to pass back any problems. |
nameFieldName | The field to which the errors should be added. |