|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface CustomField
Custom Field interface.
Typically one obtains a CustomField using CustomFieldManager
,
eg. CustomFieldManager.getCustomFieldObjectByName(String)
To create or update an instance of a CustomField for an issue (a CustomFieldValue
),
use OrderableField.createValue(com.atlassian.jira.issue.Issue,Object)
or OrderableField.updateValue(com.atlassian.jira.issue.fields.layout.field.FieldLayoutItem,com.atlassian.jira.issue.Issue,com.atlassian.jira.issue.ModifiedValue,com.atlassian.jira.issue.util.IssueChangeHolder)
.
CustomFieldValue - a value of this field for a specific issue
,
CustomFieldType - The type of custom field (text, number, user picker etc).
Field Summary |
---|
Fields inherited from interface com.atlassian.jira.issue.fields.NavigableField |
---|
ORDER_ASCENDING, ORDER_DESCENDING, TEMPLATE_DIRECTORY_PATH |
Fields inherited from interface com.atlassian.jira.issue.fields.OrderableField |
---|
MOVE_ISSUE_PARAM_KEY, NO_HEADER_PARAM_KEY |
Method Summary | |
---|---|
int |
compare(Issue issue1,
Issue issue2)
This method compares the values of this custom field in two given issues. |
List<org.ofbiz.core.entity.GenericValue> |
getAssociatedIssueTypes()
Returns a list of issue types associated with this project. |
List<org.ofbiz.core.entity.GenericValue> |
getAssociatedProjectCategories()
Returns a list of associated project categories for this custom field. |
List<org.ofbiz.core.entity.GenericValue> |
getAssociatedProjects()
Returns a list of projects associated with this project. |
ClauseNames |
getClauseNames()
Return the JQL clause names that this custom field should be recognized by. |
List<FieldConfigScheme> |
getConfigurationSchemes()
Returns a list of configuration schemes. |
CustomFieldSearcher |
getCustomFieldSearcher()
Retrieves the CustomFieldSearcher for this custom field. |
CustomFieldType |
getCustomFieldType()
Looks up the CustomFieldType . |
CustomFieldParams |
getCustomFieldValues(Map customFieldValuesHolder)
Get the custom field string values that are relevant to this particular custom field |
String |
getDescription()
Returns the description of this custom field. |
org.ofbiz.core.entity.GenericValue |
getGenericValue()
Deprecated. |
Long |
getIdAsLong()
Returns ID of this custom field. |
Options |
getOptions(String key,
FieldConfig config,
JiraContextNode contextNode)
Returns options for this custom field if it is of MultipleCustomFieldType type. |
Options |
getOptions(String key,
JiraContextNode jiraContextNode)
Returns options for this custom field if it is of MultipleCustomFieldType type. |
FieldConfig |
getRelevantConfig(Issue issue)
Returns a relevant FieldConfig for the given issue. |
FieldConfig |
getRelevantConfig(IssueContext issueContext)
Returns the relevant field config of this custom field for the give issue context |
FieldConfig |
getReleventConfig(SearchContext searchContext)
The FieldConfig that is relevent to all issue contexts in the search context
Checks that all configs within search context are the same - i.e. |
Object |
getValue(Issue issue)
Retrieves and returns the Object representing the this CustomField value for the given issue. |
boolean |
isAllIssueTypes()
Returns true if it applies for all issue types, false otherwise. |
boolean |
isAllProjects()
Checks whether this custom field applies for all projects. |
boolean |
isEditable()
Returns true if this custom field can be edited, false otherwise. |
boolean |
isEnabled()
Returns true if all configuration schemes returned by getConfigurationSchemes() are enabled. |
boolean |
isGlobal()
Returns true if this custom field applies for all projects and all issue types. |
boolean |
isInScope(org.ofbiz.core.entity.GenericValue project,
List<String> issueTypeIds)
Deprecated. Please use isInScope(com.atlassian.jira.project.Project, java.util.List) . This method was created in v4.3 as a temporary compatibility measure and has been always deprecated. |
boolean |
isInScope(Project project,
List<String> issueTypeIds)
Determines if this custom field is within the scope of the given project, and list of Issue Types. |
boolean |
isInScope(SearchContext searchContext)
Determines whether this custom field is in scope. |
boolean |
isInScope(com.atlassian.crowd.embedded.api.User user,
SearchContext searchContext)
Deprecated. Use isInScope(com.atlassian.jira.issue.search.SearchContext) instead. Since v4.3 |
Set<Long> |
remove()
Removes this custom field and returns a set of issue IDs of all issues that are affected by removal of this custom field. |
void |
setCustomFieldSearcher(CustomFieldSearcher searcher)
Sets the CustomFieldSearcher for this custom field. |
void |
setDescription(String description)
Sets the description of this custom field. |
void |
setName(String name)
Sets the name of this custom field. |
void |
store()
Stores this custom field. |
void |
validateFromActionParams(Map actionParameters,
ErrorCollection errorCollection,
FieldConfig config)
Validates relevant parameters on custom field type of this custom field. |
Methods inherited from interface com.atlassian.jira.issue.fields.NavigableField |
---|
getColumnCssClass, getColumnHeadingKey, getColumnViewHtml, getDefaultSortOrder, getHiddenFieldId, getSortComparatorSource, getSorter, prettyPrintChangeHistory, prettyPrintChangeHistory |
Methods inherited from interface com.atlassian.jira.issue.fields.ConfigurableField |
---|
getConfigurationItemTypes |
Methods inherited from interface com.atlassian.jira.issue.fields.OrderableField |
---|
availableForBulkEdit, canRemoveValueFromIssueObject, createValue, getBulkEditHtml, getCreateHtml, getCreateHtml, getDefaultValue, getEditHtml, getEditHtml, getValueFromParams, getViewHtml, getViewHtml, getViewHtml, hasValue, isShown, needsMove, populateDefaults, populateForMove, populateFromIssue, populateFromParams, populateParamsFromString, removeValueFromIssueObject, updateIssue, updateValue, validateParams |
Methods inherited from interface com.atlassian.jira.issue.fields.SearchableField |
---|
createAssociatedSearchHandler |
Methods inherited from interface com.atlassian.jira.issue.fields.Field |
---|
getId, getName, getNameKey |
Methods inherited from interface java.lang.Comparable |
---|
compareTo |
Methods inherited from interface com.atlassian.jira.issue.fields.renderer.RenderableField |
---|
getId, getValueFromIssue, isRenderable |
Method Detail |
---|
boolean isInScope(Project project, List<String> issueTypeIds)
If the issueTypeIds list is null or an empty list, then it is treated as a wildcard.
project
- The project.issueTypeIds
- List of IssueType ID's.
true
if this custom field is within the given scope.boolean isInScope(org.ofbiz.core.entity.GenericValue project, List<String> issueTypeIds)
isInScope(com.atlassian.jira.project.Project, java.util.List)
. This method was created in v4.3 as a temporary compatibility measure and has been always deprecated.
project
- project generic valueissueTypeIds
- issue type IDs, e.g. ["1", "2"] for Bugs and New Features
boolean isInScope(SearchContext searchContext)
searchContext
- search context
boolean isInScope(com.atlassian.crowd.embedded.api.User user, SearchContext searchContext)
isInScope(com.atlassian.jira.issue.search.SearchContext)
instead. Since v4.3
user
- current usersearchContext
- search context
org.ofbiz.core.entity.GenericValue getGenericValue()
int compare(Issue issue1, Issue issue2) throws IllegalArgumentException
Returns a negative integer, zero, or a positive integer as the value of first issue is less than, equal to, or greater than the value of the second issue.
If either of given issues is null a IllegalArgumentException is thrown.
issue1
- issue to compareissue2
- issue to compare
IllegalArgumentException
- if any of given issues is nullCustomFieldParams getCustomFieldValues(Map customFieldValuesHolder)
customFieldValuesHolder
- containing all params
CustomFieldParams
of String
objectsObject getValue(Issue issue)
CustomFieldType.getValueFromIssue(CustomField,Issue)
.
This is only used to communicate with the 'view' JSP. Multiselects will return a list, dates a date, etc.
issue
- issue to retrieve the value from
OrderableField.getValueFromParams(java.util.Map)
Set<Long> remove()
Options getOptions(String key, JiraContextNode jiraContextNode)
MultipleCustomFieldType
type. Otherwise returns null.
As this is just used by the view layer, it can be a list of objects
key
- not usedjiraContextNode
- JIRA context node
MultipleCustomFieldType
type, null otherwisevoid setName(String name)
name
- name to setString getDescription()
void setDescription(String description)
description
- description to setCustomFieldSearcher getCustomFieldSearcher()
CustomFieldSearcher
for this custom field.
The seracher, if found is initialized with this custom field before it is returned.
void setCustomFieldSearcher(CustomFieldSearcher searcher)
CustomFieldSearcher
for this custom field.
searcher
- custom field searcher to associate with this custom fieldvoid store()
boolean isEditable()
Long getIdAsLong()
List<FieldConfigScheme> getConfigurationSchemes()
FieldConfigScheme
objects.Options getOptions(String key, FieldConfig config, JiraContextNode contextNode)
MultipleCustomFieldType
type. Otherwise returns null.
As this is just used by the view layer, it can be a list of objects
key
- not usedconfig
- relevant field configcontextNode
- JIRA context node
MultipleCustomFieldType
type, null otherwiseFieldConfig getRelevantConfig(Issue issue)
FieldConfig
for the given issue. If the field has
a config for the issue then one will be returned, otherwise null is returned.
For example, if we have 2 projects: project A and project B, and a custom field is configured to be only applicable to project A, calling getRelevantConfig with an issue from project A should return the config (i.e. not null). Calling this method with an issue from project B should rerurn null.
issue
- issue whose project and issue type will be used to check if the field has a config
FieldConfig
representing the configuration of the field for issue's
project/issue type. If the field does not have a config for issue's project/issue type, null is returned.void validateFromActionParams(Map actionParameters, ErrorCollection errorCollection, FieldConfig config)
CustomFieldType.validateFromParams(CustomFieldParams,ErrorCollection,FieldConfig)
actionParameters
- action parameterserrorCollection
- error collection to add errors toconfig
- field configList<org.ofbiz.core.entity.GenericValue> getAssociatedProjectCategories()
getConfigurationSchemes()
returns null.
It returns an empty list if the getConfigurationSchemes()
returns an empty list.
The returned list should be sorted by project category name.
GenericValue
objects that represent associated project categories
as ProjectCategoryContext
objectsList<org.ofbiz.core.entity.GenericValue> getAssociatedProjects()
getAssociatedProjects
in interface ConfigurableField
List<org.ofbiz.core.entity.GenericValue> getAssociatedIssueTypes()
boolean isGlobal()
boolean isAllProjects()
boolean isAllIssueTypes()
boolean isEnabled()
getConfigurationSchemes()
are enabled.
CustomFieldType getCustomFieldType()
CustomFieldType
. It can return null if the custom
field type cannot be found in the CustomFieldManager
.
FieldConfig getRelevantConfig(IssueContext issueContext)
getRelevantConfig
in interface ConfigurableField
issueContext
- issue context to find the relevant field config for
FieldConfig getReleventConfig(SearchContext searchContext)
FieldConfig
that is relevent to all issue contexts in the search context
Checks that all configs within search context are the same - i.e. all null or all the same config.
Returns null if any two configs are different.
Note: null config is not equal to non-null config. Previously, a non-null config was returned even if the first config(s) was null.
searchContext
- search context
ClauseNames getClauseNames()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |