|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface CustomFieldManager
Functions for working with CustomField
s.
Field Summary | |
---|---|
static String |
PLUGIN_KEY
|
Method Summary | |
---|---|
CustomField |
createCustomField(String fieldName,
String description,
CustomFieldType fieldType,
CustomFieldSearcher customFieldSearcher,
List contexts,
List issueTypes)
Creates a custom field with the given name and description of the given CustomFieldType using the given CustomFieldSearcher that is displayed in the given list of contexts available to the given list of issueTypes. |
CustomField |
getCustomFieldInstance(org.ofbiz.core.entity.GenericValue customFieldGv)
Converts a customfield GenericValue to a CustomField instance. |
CustomField |
getCustomFieldObject(Long id)
Get a CustomField by ID. |
CustomField |
getCustomFieldObject(String id)
Get a CustomField by its text key (eg 'customfield_10000'). |
CustomField |
getCustomFieldObjectByName(String customFieldName)
Retrieve the first custom field object with the specified name. |
List |
getCustomFieldObjects()
Returns all custom fields. |
List |
getCustomFieldObjects(org.ofbiz.core.entity.GenericValue issue)
Returns a list of CustomField s that apply to a particular issue. |
List |
getCustomFieldObjects(Issue issue)
Returns a list of CustomField s that apply to a particular issue. |
List |
getCustomFieldObjects(Long projectId,
List issueTypes)
Returns the same as getCustomFieldObjects(Long,String) but allows
to specify a list of issueTypes. |
List |
getCustomFieldObjects(Long projectId,
String issueType)
Gets a list of custom fields for a particular project and issue type. |
List |
getCustomFieldObjects(SearchContext searchContext)
Returns all customfields in a particular SearchContext . |
Collection |
getCustomFieldObjectsByName(String customFieldName)
Retrieve custom field(s) of a certain name. |
CustomFieldSearcher |
getCustomFieldSearcher(String key)
Retrieve a custom field searcher by its type key. |
Class |
getCustomFieldSearcherClass(String key)
Retrieve a custom field searcher by its type key. |
List |
getCustomFieldSearchers(CustomFieldType customFieldType)
Retrieves all the searchers registered for a particular custom Field. |
CustomFieldType |
getCustomFieldType(String key)
Retrieve a custom field type by its type key. |
List |
getCustomFieldTypes()
Retrieve all customfieldtypes registered in the sytem. |
List |
getGlobalCustomFieldObjects()
Returns a list of custom fields where the CustomField.isGlobal()
is true. |
void |
refresh()
reloads all customfields into the cache from the DB. |
void |
removeCustomField(CustomField customField)
Removes the customfield supplied. |
void |
removeCustomFieldValues(org.ofbiz.core.entity.GenericValue issue)
Removes the values stored by customfields for a particular Issue. |
void |
removeProjectAssociations(org.ofbiz.core.entity.GenericValue project)
Used if a project is deleted to remove the project field associations. |
void |
removeProjectCategoryAssociations(org.ofbiz.core.entity.GenericValue projectCategory)
Used if a project category is deleted to remove the field associations. |
Field Detail |
---|
static final String PLUGIN_KEY
Method Detail |
---|
Collection getCustomFieldObjectsByName(String customFieldName)
customFieldName
-
CustomField
s.CustomField getCustomFieldObjectByName(String customFieldName)
getCustomFieldObjectsByName(String)
to retrieve all custom fields.
customFieldName
-
CustomField
, or null if not found.CustomField getCustomFieldObject(Long id)
id
- ID of field, eg. 10000
CustomField
or null.CustomField getCustomFieldObject(String id)
id
- Eg. 'customfield_10000'
CustomField
or null if not found.List getCustomFieldObjects()
CustomField
s.List getGlobalCustomFieldObjects()
CustomField.isGlobal()
is true.
CustomField
sList getCustomFieldObjects(Long projectId, String issueType)
projectId
- Id of the projectissueType
- An issue type. See ConstantsManager.ALL_ISSUE_TYPES
,
ConstantsManager.ALL_STANDARD_ISSUE_TYPES
and ConstantsManager.ALL_SUB_TASK_ISSUE_TYPES
CustomField
sList getCustomFieldObjects(Long projectId, List issueTypes)
getCustomFieldObjects(Long,String)
but allows
to specify a list of issueTypes.
projectId
- Id of the projectissueTypes
- A list of issue types. See ConstantsManager.ALL_ISSUE_TYPES
,
ConstantsManager.ALL_STANDARD_ISSUE_TYPES
and ConstantsManager.ALL_SUB_TASK_ISSUE_TYPES
CustomField
sList getCustomFieldObjects(SearchContext searchContext)
SearchContext
. Also
see CustomField.isInScope(com.opensymphony.user.User,com.atlassian.jira.issue.search.SearchContext)
.
searchContext
-
CustomField
sList getCustomFieldObjects(org.ofbiz.core.entity.GenericValue issue)
CustomField
s that apply to a particular issue.
issue
- A GenericValue
of the issue
CustomField
sList getCustomFieldObjects(Issue issue)
CustomField
s that apply to a particular issue.
issue
- A Issue
object
CustomField
sList getCustomFieldTypes()
CustomFieldType
sCustomFieldType getCustomFieldType(String key)
key
- Type identifier constructed from plugin XML. Eg. the system types are specified in system-customfiedltypes-plugin.xml:
<atlassian-plugin key="com.atlassian.jira.plugin.system.customfieldtypes" name="Custom Field Types & Searchers"> ... <customfield-type key="float" name="Number Field" ...To access the 'Number Field' type, the key would then be 'com.atlassian.jira.plugin.system.customfieldtypes:float' (the first part can be referred to via
CreateCustomField.FIELD_TYPE_PREFIX
).List getCustomFieldSearchers(CustomFieldType customFieldType)
<customfield-searcher key="daterange" name="Date Range picker" i18n-name-key="admin.customfield.searcher.daterange.name" class="com.atlassian.jira.issue.customfields.searchers.DateRangeSearcher">
customFieldType
-
CustomFieldSearcher
sCustomFieldSearcher getCustomFieldSearcher(String key)
key
- Type identifier constructed from plugin XML. Eg. the system types are specified in system-customfiedltypes-plugin.xml:
<atlassian-plugin key="com.atlassian.jira.plugin.system.customfieldtypes" name="Custom Field Types & Searchers"> ... <customfield-searcher key="exactnumber" name="Number Searcher" ...To access the 'Number Searcher' searcher, the key would then be 'com.atlassian.jira.plugin.system.customfieldtypes:exactnumber' (the first part can be referred to via
CreateCustomField.FIELD_TYPE_PREFIX
).CustomField createCustomField(String fieldName, String description, CustomFieldType fieldType, CustomFieldSearcher customFieldSearcher, List contexts, List issueTypes) throws org.ofbiz.core.entity.GenericEntityException
org.ofbiz.core.entity.GenericEntityException
- if the CustomField could not be created.void removeCustomField(CustomField customField) throws RemoveException
customField
- The CustomField
to be removed.
RemoveException
void removeCustomFieldValues(org.ofbiz.core.entity.GenericValue issue) throws org.ofbiz.core.entity.GenericEntityException
issue
- The issue GenericValue
org.ofbiz.core.entity.GenericEntityException
void removeProjectAssociations(org.ofbiz.core.entity.GenericValue project)
project
- The project being deleted.void removeProjectCategoryAssociations(org.ofbiz.core.entity.GenericValue projectCategory)
projectCategory
- The project category being deleted.CustomField getCustomFieldInstance(org.ofbiz.core.entity.GenericValue customFieldGv)
GenericValue
to a CustomField
instance.
customFieldGv
-
CustomField
instancevoid refresh()
Class getCustomFieldSearcherClass(String key)
key
- Type identifier constructed from plugin XML. Eg. the system types are specified in system-customfiedltypes-plugin.xml:
<atlassian-plugin key="com.atlassian.jira.plugin.system.customfieldtypes" name="Custom Field Types & Searchers"> ... <customfield-type key="float" name="Number Field" ...To access the 'Number Field' type, the key would then be 'com.atlassian.jira.plugin.system.customfieldtypes:float' (the first part can be referred to via
CreateCustomField.FIELD_TYPE_PREFIX
).
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |