|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
@PublicApi public interface ConstantsManager
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.
| Field Summary | |
|---|---|
static String |
ALL_ISSUE_TYPES
Used to retrieve all IssueTypes. |
static String |
ALL_STANDARD_ISSUE_TYPES
Used to retrieve a standard IssueTypes. |
static String |
ALL_SUB_TASK_ISSUE_TYPES
Used to retrieve a subtask IssueTypes. |
static String |
ISSUE_TYPE_CONSTANT_TYPE
Used in the generic getConstantObject(String, String) method |
static String |
PRIORITY_CONSTANT_TYPE
Used in the generic getConstantObject(String, String) method |
static String |
RESOLUTION_CONSTANT_TYPE
Used in the generic getConstantObject(String, String) method |
static String |
STATUS_CONSTANT_TYPE
Used in the generic getConstantObject(String, String) method |
| Method Summary | |
|---|---|
boolean |
constantExists(String constantType,
String name)
Checks if a constant exists. |
List<IssueConstant> |
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)
Deprecated. Use insertIssueType(String, Long, String, String, String) instead. Since v5.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. |
List<org.ofbiz.core.entity.GenericValue> |
getAllIssueTypes()
Deprecated. Use getAllIssueTypeObjects() instead. Deprecated since v4.0 |
org.ofbiz.core.entity.GenericValue |
getConstantByName(String constantType,
String name)
Deprecated. Use getIssueConstantByName(String, String). Since v4.3 |
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 |
getConstantObjects(String constantType)
Returns all IssueConstant objects for the given type. |
org.ofbiz.core.entity.GenericValue |
getDefaultPriority()
Deprecated. Use getDefaultPriorityObject() instead. Since v4.0 |
Priority |
getDefaultPriorityObject()
Returns the default priority configured in JIRA. |
List<org.ofbiz.core.entity.GenericValue> |
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. |
IssueConstant |
getIssueConstantByName(String constantType,
String name)
Returns a constant by name. |
org.ofbiz.core.entity.GenericValue |
getIssueType(String id)
Deprecated. Use getIssueTypeObject(String) instead. Since 5.0 |
IssueType |
getIssueTypeObject(String id)
Given an IssueType ID this method retrieves that IssueType. |
Collection<org.ofbiz.core.entity.GenericValue> |
getIssueTypes()
Deprecated. Use getRegularIssueTypeObjects() instead. |
Collection<org.ofbiz.core.entity.GenericValue> |
getPriorities()
Deprecated. since 1.99. Use getPriorityObjects() instead |
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<Priority> |
getPriorityObjects()
Retrieve all Priorities in JIRA. |
Collection<IssueType> |
getRegularIssueTypeObjects()
Retrieve regular (non-subtask) issue types. |
org.ofbiz.core.entity.GenericValue |
getResolution(String id)
Deprecated. Use getResolutionObject(String) instead. |
Resolution |
getResolutionObject(String id)
Given a resolution ID, this method retrieves that resolution. |
Collection<Resolution> |
getResolutionObjects()
Retrieve all Resolutions in JIRA. |
Collection<org.ofbiz.core.entity.GenericValue> |
getResolutions()
Deprecated. Use getResolutionObjects() instead. |
org.ofbiz.core.entity.GenericValue |
getStatus(String id)
Deprecated. Use getStatusObject(java.lang.String) instead. Deprecated since v4.0 |
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<org.ofbiz.core.entity.GenericValue> |
getStatuses()
Deprecated. Use getStatusObjects() instead. Deprecated since v4.0 |
Status |
getStatusObject(String id)
Returns a Status given an id. |
Collection<Status> |
getStatusObjects()
Returns all statuses |
Collection<IssueType> |
getSubTaskIssueTypeObjects()
Retrieves all the sub-task issue types |
Collection<org.ofbiz.core.entity.GenericValue> |
getSubTaskIssueTypes()
Deprecated. Use getSubTaskIssueTypeObjects() instead. Deprecated since v4.0 |
IssueType |
insertIssueType(String name,
Long sequence,
String style,
String description,
String iconurl)
Creates a new IssueType. |
void |
invalidate(IssueConstant issueConstant)
Clear the cache for this Issue Constant. |
void |
invalidateAll()
Sets all cached copies of constant to null. |
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)
Removes an existing issueType. |
void |
storeIssueTypes(List<org.ofbiz.core.entity.GenericValue> 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. |
| Field Detail |
|---|
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
getConstantObject(String, String) method
static final String STATUS_CONSTANT_TYPE
getConstantObject(String, String) method
static final String RESOLUTION_CONSTANT_TYPE
getConstantObject(String, String) method
static final String ISSUE_TYPE_CONSTANT_TYPE
getConstantObject(String, String) method
| Method Detail |
|---|
@Deprecated Collection<org.ofbiz.core.entity.GenericValue> getPriorities()
getPriorityObjects() instead
GenericValues.Collection<Priority> getPriorityObjects()
Prioritys.Priority getPriorityObject(String id)
id - The id of the priority
Priority object.String getPriorityName(String id)
id - The id of a priority
org.ofbiz.core.entity.GenericValue getDefaultPriority()
getDefaultPriorityObject() instead. Since v4.0
GenericValue.Priority getDefaultPriorityObject()
void refreshPriorities()
@Deprecated Collection<org.ofbiz.core.entity.GenericValue> getResolutions()
getResolutionObjects() instead.
GenericValues.Collection<Resolution> getResolutionObjects()
Resolution objects.@Deprecated org.ofbiz.core.entity.GenericValue getResolution(String id)
getResolutionObject(String) instead.
id - The id of the resolution
GenericValueResolution getResolutionObject(String id)
id - The id of the resolution
Resolution object.void refreshResolutions()
@Deprecated org.ofbiz.core.entity.GenericValue getIssueType(String id)
getIssueTypeObject(String) instead. Since 5.0
id - The ID of the IssueType.
GenericValueIssueType getIssueTypeObject(String id)
id - The ID of the IssueType.
IssueType object@Deprecated Collection<org.ofbiz.core.entity.GenericValue> getIssueTypes()
getRegularIssueTypeObjects() instead.
GenericValuesCollection<IssueType> getRegularIssueTypeObjects()
IssueTypesCollection<IssueType> getAllIssueTypeObjects()
IssueType objects.@Deprecated List<org.ofbiz.core.entity.GenericValue> getAllIssueTypes()
getAllIssueTypeObjects() instead. Deprecated since v4.0
GenericValue issueTypes.List<String> getAllIssueTypeIds()
@Deprecated Collection<org.ofbiz.core.entity.GenericValue> getSubTaskIssueTypes()
getSubTaskIssueTypeObjects() instead. Deprecated since v4.0
getEditableSubTaskIssueTypes() instead if you require an editable list.
GenericValues.Collection<IssueType> getSubTaskIssueTypeObjects()
IssueTypes.List<org.ofbiz.core.entity.GenericValue> getEditableSubTaskIssueTypes()
GenericValuesList<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()
org.ofbiz.core.entity.GenericValue createIssueType(String name,
Long sequence,
String style,
String description,
String iconurl)
throws CreateException
insertIssueType(String, Long, String, String, String) instead. Since v5.0.
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,
String iconurl)
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.iconurl - A URL to an icon to be used for the new issueType.
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 updateIssueType(String id,
String name,
Long sequence,
String style,
String description,
String iconurl)
throws DataAccessException
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.
DataAccessException - indicates an error in the Data Access Layer
void removeIssueType(String id)
throws RemoveException
id - ID of an existing issueType
RemoveException - if the issueType with id doesn't exist, or an error occured removing the issue.
void storeIssueTypes(List<org.ofbiz.core.entity.GenericValue> issueTypes)
throws DataAccessException
issueTypes - A list of IssueType GenericValues
DataAccessException - indicates an error in the Data Access Layer@Deprecated org.ofbiz.core.entity.GenericValue getStatus(String id)
getStatusObject(java.lang.String) instead. Deprecated since v4.0
id - The id of a status
GenericValueStatus getStatusObject(String id)
id - The id of a status
Status object.@Deprecated Collection<org.ofbiz.core.entity.GenericValue> getStatuses()
getStatusObjects() instead. Deprecated since v4.0
GenericValues.Collection<Status> getStatusObjects()
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.
IssueConstant getConstantObject(String constantType,
String id)
IssueConstant object for the given type & id.
constantType - See PRIORITY_CONSTANT_TYPE, STATUS_CONSTANT_TYPE, RESOLUTION_CONSTANT_TYPE, ISSUE_TYPE_CONSTANT_TYPEid - The id of the constant.
IssueConstant object. Null if it doesn't exist.Collection getConstantObjects(String constantType)
IssueConstant objects for the given type.
constantType - See PRIORITY_CONSTANT_TYPE, STATUS_CONSTANT_TYPE, RESOLUTION_CONSTANT_TYPE, ISSUE_TYPE_CONSTANT_TYPE
IssueConstant object.
List<IssueConstant> convertToConstantObjects(String constantType,
Collection ids)
constantType - the constant type. Case insenstiveids - list of constant ids or GenericValues
boolean constantExists(String constantType,
String name)
constantType - See PRIORITY_CONSTANT_TYPE, STATUS_CONSTANT_TYPE, RESOLUTION_CONSTANT_TYPE, ISSUE_TYPE_CONSTANT_TYPEname - The name of the constant.
org.ofbiz.core.entity.GenericValue getConstantByName(String constantType,
String name)
getIssueConstantByName(String, String). Since v4.3
constantType - See PRIORITY_CONSTANT_TYPE, STATUS_CONSTANT_TYPE, RESOLUTION_CONSTANT_TYPE, ISSUE_TYPE_CONSTANT_TYPEname - The Name of the constant.
GenericValue
IssueConstant getIssueConstantByName(String constantType,
String name)
constantType - See PRIORITY_CONSTANT_TYPE, STATUS_CONSTANT_TYPE, RESOLUTION_CONSTANT_TYPE, ISSUE_TYPE_CONSTANT_TYPEname - 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_TYPEname - 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()
void invalidateAll()
void invalidate(IssueConstant issueConstant)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||