@PublicApi
public interface ConstantsManager
Modifier and Type | Interface and Description |
---|---|
static class |
ConstantsManager.CONSTANT_TYPE |
Modifier and Type | Field and Description |
---|---|
static String |
ALL_ISSUE_TYPES
Used to retrieve all IssueTypes.
|
static String |
ALL_STANDARD_ISSUE_TYPES
Used to retrieve all standard IssueTypes.
|
static String |
ALL_SUB_TASK_ISSUE_TYPES
Used to retrieve all sub-task IssueTypes.
|
static String |
ISSUE_TYPE_CONSTANT_TYPE
Deprecated.
|
static String |
PRIORITY_CONSTANT_TYPE
Deprecated.
|
static String |
RESOLUTION_CONSTANT_TYPE
Deprecated.
|
static String |
STATUS_CONSTANT_TYPE
Deprecated.
|
Modifier and Type | Method and Description |
---|---|
boolean |
constantExists(String constantType,
String name)
Checks if a constant exists.
|
List<IssueConstant> |
convertToConstantObjects(String constantType,
Collection<?> ids)
Deprecated.
Use
getConstantsByIds(CONSTANT_TYPE, java.util.Collection) instead. Deprecated since v7.0 |
List<String> |
expandIssueTypeIds(Collection<String> 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
ALL_STANDARD_ISSUE_TYPES , ALL_SUB_TASK_ISSUE_TYPES and
ALL_ISSUE_TYPES . |
List<String> |
getAllIssueTypeIds()
Returns all issueType Ids.
|
Collection<IssueType> |
getAllIssueTypeObjects()
Returns a list of IssueTypes.
|
IssueConstant |
getConstantByNameIgnoreCase(String constantType,
String name)
Returns a constant by name ignoring the case of the name passed in.
|
IssueConstant |
getConstantObject(String constantType,
String id)
Returns an
IssueConstant object for the given type & id. |
Collection<? extends IssueConstant> |
getConstantObjects(String constantType)
Returns all
IssueConstant objects for the given type. |
List<IssueConstant> |
getConstantsByIds(ConstantsManager.CONSTANT_TYPE constantType,
Collection<String> ids)
Converts the list of ids to the objects of appropriate types
|
Priority |
getDefaultPriority()
|
Priority |
getDefaultPriorityObject()
Deprecated.
Since v7.0
|
List<IssueType> |
getEditableSubTaskIssueTypes()
Retrieves an mutable list of sub-task issues.
|
IssueConstant |
getIssueConstant(org.ofbiz.core.entity.GenericValue issueConstantGV)
Deprecated.
Deprecated since v7.0. You just shouldn't have GVs any more
|
IssueConstant |
getIssueConstantByName(String constantType,
String name)
Returns a constant by name.
|
IssueType |
getIssueType(String id)
Given an IssueType ID this method retrieves that IssueType.
|
default IssueType |
getIssueTypeObject(String id)
Deprecated.
Since v7.0. Use
getIssueType(String) instead. |
Collection<Priority> |
getPriorities()
Retrieve all Priorities in JIRA.
|
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.
|
default Collection<Priority> |
getPriorityObjects()
Deprecated.
Since v7.0
|
Collection<IssueType> |
getRegularIssueTypeObjects()
Retrieve regular (non-subtask) issue types.
|
Resolution |
getResolution(String id)
Given a resolution ID, this method retrieves that resolution.
|
default Resolution |
getResolutionObject(String id)
Deprecated.
Use
getResolution(String) instead. Since v7.0 |
default Collection<Resolution> |
getResolutionObjects()
Deprecated.
Since v7.0
|
Collection<Resolution> |
getResolutions()
Retrieve all Resolutions in JIRA.
|
Status |
getStatus(String id)
Returns a Status given an id.
|
Status |
getStatusByName(String name)
Searches for a given status by name.
|
Status |
getStatusByNameIgnoreCase(String name)
Searches for a given status by name ignoring case.
|
Status |
getStatusByTranslatedName(String name)
Searches for a given status by its translated name.
|
Collection<Status> |
getStatuses()
Returns all statuses
|
default Status |
getStatusObject(String id)
Deprecated.
Use
getStatus(java.lang.String) instead. Deprecated since v7.0 |
default Collection<Status> |
getStatusObjects()
Deprecated.
Since v7.0. Use
getStatuses() instead. |
Collection<IssueType> |
getSubTaskIssueTypeObjects()
Retrieves all the sub-task issue types
|
IssueType |
insertIssueType(String name,
Long sequence,
String style,
String description,
Long avatarId)
Creates a new IssueType.
|
IssueType |
insertIssueType(String name,
Long sequence,
String style,
String description,
String iconurl)
Deprecated.
Use
insertIssueType(String, Long, String, String, Long) instead. Since v6.3. |
void |
invalidate(IssueConstant issueConstant)
Clear the cache for this Issue Constant.
|
void |
invalidateAll()
Sets all cached copies of constants to null.
|
void |
recalculateIssueTypeSequencesAndStore(List<IssueType> issueTypes)
Resequences the supplied issuetypes into sequential order.
|
void |
recalculatePrioritySequencesAndStore(List<Priority> priorities)
Resequences the supplied priorities into sequential order.
|
void |
recalculateResolutionSequencesAndStore(List<Resolution> resolutions)
Resequences the supplied resolutions into sequential order.
|
void |
recalculateStatusSequencesAndStore(List<Status> statuses)
Resequences the supplied statuses into sequential order.
|
void |
refresh()
Deprecated.
since v6.2. Use
invalidateAll() |
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)
Deprecated.
Since 7.0. Do not use this method!!! Use
IssueTypeManager.removeIssueType(String, String) . |
void |
storeIssueTypes(List<org.ofbiz.core.entity.GenericValue> issueTypes)
Deprecated.
Deprecated since v7.0. Use $
updateIssueType(String, String, Long, String, String, Long) or
$recalculateIssueTypeSequencesAndStore(java.util.List) instead. |
void |
updateIssueType(String id,
String name,
Long sequence,
String style,
String description,
Long avatarId)
Updates an existing issueType.
|
void |
updateIssueType(String id,
String name,
Long sequence,
String style,
String description,
String iconurl)
Deprecated.
use
updateIssueType(String, String, Long, String, String, Long) since v6.3 |
void |
validateCreateIssueType(String name,
String style,
String description,
String iconurl,
ErrorCollection errors,
String nameFieldName)
Validates creation of a new issuetype.
|
void |
validateCreateIssueTypeWithAvatar(String name,
String style,
String description,
String avatarId,
ErrorCollection errors,
String nameFieldName)
Validates creation of a new issuetype.
|
io.atlassian.fugue.Option<Pair<String,ErrorCollection.Reason>> |
validateName(String name,
io.atlassian.fugue.Option<IssueType> issueTypeToUpdate)
Validates the name of issue type.
|
static final String ALL_STANDARD_ISSUE_TYPES
static final String ALL_SUB_TASK_ISSUE_TYPES
static final String ALL_ISSUE_TYPES
static final String PRIORITY_CONSTANT_TYPE
ConstantsManager.CONSTANT_TYPE.PRIORITY
getConstantObject(String, String)
methodstatic final String STATUS_CONSTANT_TYPE
ConstantsManager.CONSTANT_TYPE.STATUS
getConstantObject(String, String)
methodstatic final String RESOLUTION_CONSTANT_TYPE
ConstantsManager.CONSTANT_TYPE.RESOLUTION
getConstantObject(String, String)
methodstatic final String ISSUE_TYPE_CONSTANT_TYPE
ConstantsManager.CONSTANT_TYPE.ISSUE_TYPE
getConstantObject(String, String)
method@Nonnull Collection<Priority> getPriorities()
Priority
s.@Deprecated @Nonnull default Collection<Priority> getPriorityObjects()
Priority
s.Priority getPriorityObject(String id)
id
- The id of the priorityPriority
object.String getPriorityName(String id)
id
- The id of a priority@Deprecated Priority getDefaultPriority()
PrioritySchemeManager.getDefaultOption(com.atlassian.jira.issue.context.IssueContext)
or PrioritySchemeManager.getDefaultOption(com.atlassian.jira.issue.fields.config.FieldConfig)
@Deprecated Priority getDefaultPriorityObject()
void refreshPriorities()
@Nonnull Collection<Resolution> getResolutions()
Resolution
s.@Deprecated default Collection<Resolution> getResolutionObjects()
Resolution
objects.Resolution getResolution(String id)
id
- The id of the resolution@Deprecated default Resolution getResolutionObject(String id)
getResolution(String)
instead. Since v7.0id
- The id of the resolutionResolution
object.void refreshResolutions()
IssueType getIssueType(String id)
id
- The ID of the IssueType.@Deprecated default IssueType getIssueTypeObject(String id)
getIssueType(String)
instead.id
- The ID of the IssueType.IssueType
objectCollection<IssueType> getRegularIssueTypeObjects()
IssueType
sCollection<IssueType> getAllIssueTypeObjects()
IssueType
objects.List<String> getAllIssueTypeIds()
@Nonnull Collection<IssueType> getSubTaskIssueTypeObjects()
IssueType
s.List<IssueType> getEditableSubTaskIssueTypes()
List<String> expandIssueTypeIds(Collection<String> issueTypeIds)
ALL_STANDARD_ISSUE_TYPES
, ALL_SUB_TASK_ISSUE_TYPES
and
ALL_ISSUE_TYPES
.issueTypeIds
- A collection of the issuetype Ids to retrieve.void refreshIssueTypes()
@Deprecated IssueType insertIssueType(String name, Long sequence, String style, String description, String iconurl) throws CreateException
insertIssueType(String, Long, String, String, Long)
instead. Since v6.3.
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 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
- If there is an error creating this Issue Type.IssueType insertIssueType(String name, Long sequence, String style, String description, Long avatarId) throws CreateException
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 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.avatarId
- Avatar id,CreateException
- If there is an error creating this Issue Type.void validateCreateIssueType(String name, String style, String description, String iconurl, ErrorCollection errors, String nameFieldName)
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.void validateCreateIssueTypeWithAvatar(String name, String style, String description, String avatarId, ErrorCollection errors, String nameFieldName)
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.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.@Deprecated void updateIssueType(String id, String name, Long sequence, String style, String description, String iconurl) throws DataAccessException
updateIssueType(String, String, Long, String, String, Long)
since v6.3id
- 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.DataAccessException
- indicates an error in the Data Access Layervoid updateIssueType(String id, String name, Long sequence, String style, String description, Long avatarId)
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.avatarId
- avatarid of new issueType.DataAccessException
- indicates an error in the Data Access Layervoid removeIssueType(String id) throws RemoveException
IssueTypeManager.removeIssueType(String, String)
.THIS METHOD IS BROKEN AND SHOULD NEVER BE USED SINCE v5.0.
id
- ID of an existing issueTypeRemoveException
- if the issueType with id doesn't exist, or an error occurred removing the issue.@Deprecated void storeIssueTypes(List<org.ofbiz.core.entity.GenericValue> issueTypes) throws DataAccessException
updateIssueType(String, String, Long, String, String, Long)
or
$recalculateIssueTypeSequencesAndStore(java.util.List)
instead.issueTypes
- A list of IssueType GenericValue
sDataAccessException
- indicates an error in the Data Access LayerStatus getStatus(String id)
id
- The id of a status@Deprecated default Status getStatusObject(String id)
getStatus(java.lang.String)
instead. Deprecated since v7.0id
- The id of a statusStatus
object.Collection<Status> getStatuses()
Status
s.@Deprecated default Collection<Status> getStatusObjects()
getStatuses()
instead.Status
objectsvoid refreshStatuses()
Status getStatusByName(String name)
name
- The name of the status.Status
object with the given name, or null
if none found.Status getStatusByNameIgnoreCase(String name)
name
- The name of the status.Status
object with the given name, or null
if none found.Status getStatusByTranslatedName(String name)
name
- The name of the status.Status
object with the given name, or null
if none found.@Nullable IssueConstant getConstantObject(String constantType, String id)
IssueConstant
object for the given type & id.constantType
- See ConstantsManager.CONSTANT_TYPE
id
- The id of the constant.IssueConstant
object. Null if it doesn't exist.@Nullable Collection<? extends IssueConstant> getConstantObjects(String constantType)
IssueConstant
objects for the given type.constantType
- See ConstantsManager.CONSTANT_TYPE
IssueConstant
object; will be null
if and only if constantType
is invalid@Nullable List<IssueConstant> convertToConstantObjects(String constantType, Collection<?> ids)
getConstantsByIds(CONSTANT_TYPE, java.util.Collection)
instead. Deprecated since v7.0constantType
- the constant type. Case insenstiveids
- list of constant ids or GenericValues@Nonnull List<IssueConstant> getConstantsByIds(@Nonnull ConstantsManager.CONSTANT_TYPE constantType, @Nonnull Collection<String> ids)
constantType
- Type of constantids
- list of constant idsboolean constantExists(String constantType, String name)
constantType
- See PRIORITY_CONSTANT_TYPE
, STATUS_CONSTANT_TYPE
, RESOLUTION_CONSTANT_TYPE
, ISSUE_TYPE_CONSTANT_TYPE
name
- The name of the constant.IssueConstant getIssueConstantByName(String constantType, String name)
constantType
- See PRIORITY_CONSTANT_TYPE
, STATUS_CONSTANT_TYPE
, RESOLUTION_CONSTANT_TYPE
, ISSUE_TYPE_CONSTANT_TYPE
name
- The Name of the constant.IssueConstant getConstantByNameIgnoreCase(String constantType, String name)
constantType
- See PRIORITY_CONSTANT_TYPE
, STATUS_CONSTANT_TYPE
, RESOLUTION_CONSTANT_TYPE
, ISSUE_TYPE_CONSTANT_TYPE
name
- The Name of the constant, case-insensitive.IssueConstant getIssueConstant(org.ofbiz.core.entity.GenericValue issueConstantGV)
GenericValue
to an IssueConstant
object.issueConstantGV
- the constant GenericValue
.IssueConstant
object.@Deprecated void refresh()
invalidateAll()
io.atlassian.fugue.Option<Pair<String,ErrorCollection.Reason>> validateName(String name, io.atlassian.fugue.Option<IssueType> issueTypeToUpdate)
void invalidateAll()
void invalidate(IssueConstant issueConstant)
void recalculateIssueTypeSequencesAndStore(List<IssueType> issueTypes)
issueTypes
- void recalculatePrioritySequencesAndStore(List<Priority> priorities)
priorities
- void recalculateStatusSequencesAndStore(List<Status> statuses)
statuses
- void recalculateResolutionSequencesAndStore(List<Resolution> resolutions)
resolutions
- Copyright © 2002-2021 Atlassian. All Rights Reserved.