Package com.atlassian.jira.issue.fields
Class KeySystemField
java.lang.Object
com.atlassian.jira.issue.fields.AbstractField
com.atlassian.jira.issue.fields.NavigableFieldImpl
com.atlassian.jira.issue.fields.KeySystemField
- All Implemented Interfaces:
ExportableSystemField
,Field
,NavigableField
,Comparable
-
Field Summary
Fields inherited from class com.atlassian.jira.issue.fields.NavigableFieldImpl
applicationProperties, templatingEngine
Fields inherited from class com.atlassian.jira.issue.fields.AbstractField
authenticationContext
Fields inherited from interface com.atlassian.jira.issue.fields.NavigableField
ORDER_ASCENDING, ORDER_DESCENDING, TEMPLATE_DIRECTORY_PATH
-
Constructor Summary
ConstructorsConstructorDescriptionKeySystemField
(VelocityTemplatingEngine templatingEngine, ApplicationProperties applicationProperties, JiraAuthenticationContext authenticationContext) -
Method Summary
Modifier and TypeMethodDescriptiongetColumnViewHtml
(FieldLayoutItem fieldLayoutItem, Map<String, Object> displayParams, Issue issue) getRepresentationFromIssue
(Issue issue) Returns a Multi Item representation of the field.A sorter to be used when sorting columns in a table.List<org.apache.lucene.search.SortField>
getSortFields
(boolean sortOrder) Return a list of Lucene SortFields to be used for sorting search results.Methods inherited from class com.atlassian.jira.issue.fields.NavigableFieldImpl
getApplicationProperties, getColumnCssClass, getColumnHeadingKey, getDefaultSortOrder, getHiddenFieldId, getSortComparatorSource, getVelocityParams, prettyPrintChangeHistory, prettyPrintChangeHistory, renderTemplate
Methods inherited from class com.atlassian.jira.issue.fields.AbstractField
compareTo, equals, getAuthenticationContext, getId, getName, getNameKey, hashCode
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface java.lang.Comparable
compareTo
Methods inherited from interface com.atlassian.jira.issue.fields.Field
getId, getName, getNameKey
Methods inherited from interface com.atlassian.jira.issue.fields.NavigableField
prettyPrintChangeHistory
-
Constructor Details
-
KeySystemField
public KeySystemField(VelocityTemplatingEngine templatingEngine, ApplicationProperties applicationProperties, JiraAuthenticationContext authenticationContext)
-
-
Method Details
-
getSorter
Description copied from interface:NavigableField
A sorter to be used when sorting columns in a table. This sort uses the Lucene Document Collection and is therefore a lot faster than sorting the issues in memory.- Specified by:
getSorter
in interfaceNavigableField
- Returns:
- A sorter that can be used to sort this field, or null depending on the value of
NavigableField.getSortComparatorSource()
- See Also:
-
getSortFields
Description copied from interface:NavigableField
Return a list of Lucene SortFields to be used for sorting search results.Using this method allows the field to specify the most performant way to perform a search. If a field can be sorted directly using the term in the index then this should just return a singleton list with the sort field.
return Collections.singletonList(new SortField(fieldName, sortOrder));
The default implementation builds this using the FieldComparatorSource returned by
NavigableField.getSortComparatorSource()
If you implement this method there is no need to implement
NavigableField.getSortComparatorSource()
.- Specified by:
getSortFields
in interfaceNavigableField
- Overrides:
getSortFields
in classNavigableFieldImpl
- Returns:
- The name of the indexed term to be used for native Lucene sorting.
-
getColumnViewHtml
public String getColumnViewHtml(FieldLayoutItem fieldLayoutItem, Map<String, Object> displayParams, Issue issue) - Specified by:
getColumnViewHtml
in interfaceNavigableField
-
getRepresentationFromIssue
Returns a Multi Item representation of the field. For example in the CSV export it would look like the following: {pre} Issue Key, Issue ID, Parent ID NEAN-18,10533,10005 {/pre}- Specified by:
getRepresentationFromIssue
in interfaceExportableSystemField
- Parameters:
issue
- to get export for the field- Returns:
- export representation of the field
-