com.atlassian.jira.config.ConstantsManager |
Known Indirect Subclasses |
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.
Nested Classes | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
ConstantsManager.CONSTANT_TYPE |
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. |
Fields | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
ISSUE_TYPE_CONSTANT_TYPE |
This field is deprecated.
Use ISSUE_TYPE
|
||||||||||
PRIORITY_CONSTANT_TYPE |
This field is deprecated.
Use PRIORITY
|
||||||||||
RESOLUTION_CONSTANT_TYPE |
This field is deprecated.
Use RESOLUTION
|
||||||||||
STATUS_CONSTANT_TYPE |
This field is deprecated.
Use STATUS
|
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Checks if a constant exists.
| |||||||||||
This method is deprecated.
Use
getConstantsByIds(CONSTANT_TYPE, java.util.Collection) instead. Deprecated since v7.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.
| |||||||||||
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. | |||||||||||
Converts the list of ids to the objects of appropriate types
| |||||||||||
Returns the default priority configured in JIRA.
| |||||||||||
This method is deprecated.
Since v7.0
| |||||||||||
Retrieves an mutable list of sub-task issues.
| |||||||||||
This method is deprecated.
Deprecated since v7.0. You just shouldn't have GVs any more
| |||||||||||
Returns a constant by name.
| |||||||||||
Given an IssueType ID this method retrieves that IssueType.
| |||||||||||
This method is deprecated.
Since v7.0
| |||||||||||
Retrieve all Priorities in JIRA.
| |||||||||||
Returns the priority Name for a given priority ID.
| |||||||||||
Given a priority ID, this method retrieves that priority.
| |||||||||||
This method is deprecated.
Since v7.0
| |||||||||||
Retrieve regular (non-subtask) issue types.
| |||||||||||
Given a resolution ID, this method retrieves that resolution.
| |||||||||||
This method is deprecated.
Use
getResolution(String) instead. Since v7.0
| |||||||||||
This method is deprecated.
Since v7.0
| |||||||||||
Retrieve all Resolutions in JIRA.
| |||||||||||
Returns a Status given an id.
| |||||||||||
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.
| |||||||||||
This method is deprecated.
Use
getStatus(String) instead. Deprecated since v7.0
| |||||||||||
This method is deprecated.
Since v7.0
| |||||||||||
Returns all statuses
| |||||||||||
Retrieves all the sub-task issue types
| |||||||||||
This method is deprecated.
Use
insertIssueType(String, Long, String, String, Long) instead. Since v6.3.
| |||||||||||
Creates a new IssueType.
| |||||||||||
Clear the cache for this Issue Constant.
| |||||||||||
Resequences the supplied issuetypes into sequential order.
| |||||||||||
Resequences the supplied priorities into sequential order.
| |||||||||||
Resequences the supplied resolutions into sequential order.
| |||||||||||
Resequences the supplied statuses into sequential order.
| |||||||||||
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.
| |||||||||||
This method is deprecated.
Since 7.0. Do not use this method!!! Use
removeIssueType(String, String) .
| |||||||||||
This method is deprecated.
Deprecated since v7.0. Use $
updateIssueType(String, String, Long, String, String, Long) or
$recalculateIssueTypeSequencesAndStore(java.util.List) instead.
| |||||||||||
This method is deprecated.
use
updateIssueType(String, String, Long, String, String, Long) since v6.3
| |||||||||||
Updates an existing issueType.
| |||||||||||
Validates creation of a new issuetype.
| |||||||||||
Validates creation of a new issuetype.
| |||||||||||
Validates the name of issue type.
|
Used to retrieve a standard IssueTypes.
Used to retrieve a subtask IssueTypes.
This field is deprecated.
Use ISSUE_TYPE
Used in the generic getConstantObject(String, String)
method
This field is deprecated.
Use RESOLUTION
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. |
This method is deprecated.
Use getConstantsByIds(CONSTANT_TYPE, java.util.Collection)
instead. Deprecated since v7.0
Converts the list of ids to the objects of appropriate types
constantType | the constant type. Case insenstive |
---|---|
ids | list of constant ids or GenericValues |
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.
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.
Converts the list of ids to the objects of appropriate types
constantType | Type of constant |
---|---|
ids | list of constant ids |
Returns the default priority configured in JIRA.
This method is deprecated.
Since v7.0
Returns the default priority configured in JIRA.
Retrieves an mutable list of sub-task issues. The list is mutable, that is its elements can be reordered added to or removed. The elements of the list, that is the issue types themselves, are not mutable.
This method is deprecated.
Deprecated since v7.0. You just shouldn't have GVs any more
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. |
Given an IssueType ID this method retrieves that IssueType.
id | The ID of the IssueType. |
---|
This method is deprecated.
Since v7.0
Given an IssueType ID this method retrieves that IssueType.
id | The ID of the IssueType. |
---|
IssueType
objectRetrieve all Priorities in JIRA.
Priority
s.
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 regular (non-subtask) issue types.
IssueType
s
Given a resolution ID, this method retrieves that resolution.
id | The id of the resolution |
---|
This method is deprecated.
Use getResolution(String)
instead. Since v7.0
Given a resolution ID, this method retrieves that resolution.
id | The id of the resolution |
---|
Resolution
object.
This method is deprecated.
Since v7.0
Retrieve all Resolutions in JIRA.
Resolution
objects.Retrieve all Resolutions in JIRA.
Resolution
s.
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.
This method is deprecated.
Use getStatus(String)
instead. Deprecated since v7.0
Returns a Status given an id.
id | The id of a status |
---|
Status
object.
This method is deprecated.
Since v7.0
Returns all statuses
Status
objectsReturns all statuses
Status
s.
Retrieves all the sub-task issue types
IssueType
s.
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. |
---|
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. |
---|
Clear the cache for this Issue Constant. Implementations may clear additional IssueConstants at their discretion.
Resequences the supplied issuetypes into sequential order.
Resequences the supplied priorities into sequential order.
Resequences the supplied resolutions into sequential order.
Resequences the supplied statuses into sequential order.
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.
This method is deprecated.
Since 7.0. Do not use this method!!! Use removeIssueType(String, String)
.
Removes an existing issueType. This will cause a invalidate of all issue types (i.e. reload from the DB).
THIS METHOD IS BROKEN AND SHOULD NEVER BE USED SINCE v5.0.
id | ID of an existing issueType |
---|
RemoveException | if the issueType with id doesn't exist, or an error occurred removing the issue. |
---|
This method is deprecated.
Deprecated since v7.0. Use $updateIssueType(String, String, Long, String, String, Long)
or
$recalculateIssueTypeSequencesAndStore(java.util.List)
instead.
Bulk operation to store a list of issueTypes.
issueTypes | A list of IssueType GenericValues |
---|
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 |
---|
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 |
---|
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. |
Validates the name of issue type. If the validation passes returns Option.none, else returns na Option with a pair of error message and reason.