Package com.atlassian.jira.issue.fields
Class AbstractOrderableNavigableFieldImpl<V>
java.lang.Object
com.atlassian.jira.issue.fields.AbstractField
com.atlassian.jira.issue.fields.AbstractOrderableField<V>
com.atlassian.jira.issue.fields.AbstractOrderableNavigableFieldImpl<V>
- All Implemented Interfaces:
Field,NavigableField,OrderableField<V>,SearchableField,Comparable
- Direct Known Subclasses:
AbstractPickerFieldImpl,AbstractTextSystemField,AbstractUserFieldImpl,DueDateSystemField,LabelsSystemField,SecurityLevelSystemField
public abstract class AbstractOrderableNavigableFieldImpl<V>
extends AbstractOrderableField<V>
implements NavigableField
Copyright (c) 2002-2004
All rights reserved.
-
Field Summary
Fields inherited from class com.atlassian.jira.issue.fields.AbstractField
authenticationContextFields inherited from interface com.atlassian.jira.issue.fields.NavigableField
ORDER_ASCENDING, ORDER_DESCENDING, TEMPLATE_DIRECTORY_PATHFields inherited from interface com.atlassian.jira.issue.fields.OrderableField
MOVE_ISSUE_PARAM_KEY, NO_HEADER_PARAM_KEY, TEMPLATE_DIRECTORY_PATH -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedAbstractOrderableNavigableFieldImpl(String id, String name, VelocityTemplatingEngine templatingEngine, ApplicationProperties applicationProperties, JiraAuthenticationContext authenticationContext, PermissionManager permissionManager, SearchHandlerFactory searchHandlerFactory) -
Method Summary
Modifier and TypeMethodDescriptiongetFieldSorts(FieldSort.Order sortOrder) Returns a list ofFieldSortobjects that can be used to sort this field.Returns the id of the field to check for visibility.getSearchApiFeatureFieldSorts(FieldSort.Order sortOrder) Get the field sorts to use when the "com.atlassian.jira.search.api" feature is enabled.protected FieldValueLoaderGet the field value loader to use when the "com.atlassian.jira.search.api" feature is enabled.org.apache.lucene.search.FieldComparatorSourceA default implementation that returns aMappedSortComparatorfromNavigableField.getSorter().List<org.apache.lucene.search.SortField>getSortFields(boolean sortOrder) Deprecated, for removal: This API element is subject to removal in a future version.A loader to be used when loading the value of the field from the index.getVelocityParams(I18nHelper isI18nHelper, Map<String, Object> displayParams, Issue issue) prettyPrintChangeHistory(String changeHistory) prettyPrintChangeHistory(String changeHistory, I18nHelper i18nHelper) Used for email notification templates - allows changelog to be displayed in language of the recipient.Methods inherited from class com.atlassian.jira.issue.fields.AbstractOrderableField
createAssociatedSearchHandler, getApplicationProperties, getBulkEditHtml, getCreateHtml, getEditHtml, getFieldLayoutItemForBulkOperation, getIssueForBulkOperation, getPermissionManager, getRelevantParams, getVelocityParams, getVelocityParams, getVelocityParams, getViewHtml, hasBulkUpdatePermission, hasParam, hasPermission, isHidden, populateFromParams, rendererTypesEqual, renderTemplate, validateBulkEditHtmlProperties, valuesEqualMethods inherited from class com.atlassian.jira.issue.fields.AbstractField
compareTo, equals, getAuthenticationContext, getId, getName, getNameKey, hashCodeMethods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface java.lang.Comparable
compareToMethods inherited from interface com.atlassian.jira.issue.fields.Field
getId, getName, getNameKeyMethods inherited from interface com.atlassian.jira.issue.fields.NavigableField
getColumnHeadingKey, getColumnViewHtml, getDefaultSortOrder, getSorter, hasSortsDefined, prettyPrintChangeHistoryMethods inherited from interface com.atlassian.jira.issue.fields.OrderableField
availableForBulkEdit, canRemoveValueFromIssueObject, createValue, getCreateHtml, getDefaultValue, getEditHtml, getValueFromParams, getViewHtml, getViewHtml, hasValue, isShown, needsMove, populateDefaults, populateForMove, populateFromIssue, populateParamsFromString, removeValueFromIssueObject, updateIssue, updateValue, validateParams
-
Constructor Details
-
AbstractOrderableNavigableFieldImpl
protected AbstractOrderableNavigableFieldImpl(String id, String name, VelocityTemplatingEngine templatingEngine, ApplicationProperties applicationProperties, JiraAuthenticationContext authenticationContext, PermissionManager permissionManager, SearchHandlerFactory searchHandlerFactory)
-
-
Method Details
-
getVelocityParams
-
getValueLoader
Description copied from interface:NavigableFieldA loader to be used when loading the value of the field from the index. This method will default to usingNavigableField.getSorter()until it is removed. This replacesNavigableField.getSorter().- Specified by:
getValueLoaderin interfaceNavigableField- Returns:
- A loader that can be used to load the value of the field
- See Also:
-
getSearchApiFeatureValueLoader
Get the field value loader to use when the "com.atlassian.jira.search.api" feature is enabled. -
getSortComparatorSource
public org.apache.lucene.search.FieldComparatorSource getSortComparatorSource()A default implementation that returns aMappedSortComparatorfromNavigableField.getSorter().- Specified by:
getSortComparatorSourcein interfaceNavigableField- Returns:
- A SortComparatorSource that can be used to sort, or null if this field does not use custom sorting
-
getSortFields
@Deprecated(since="10.4", forRemoval=true) public List<org.apache.lucene.search.SortField> getSortFields(boolean sortOrder) Deprecated, for removal: This API element is subject to removal in a future version.Description copied from interface:NavigableFieldReturn 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:
getSortFieldsin interfaceNavigableField- Returns:
- The name of the indexed term to be used for native Lucene sorting.
-
getFieldSorts
Description copied from interface:NavigableFieldReturns a list ofFieldSortobjects that can be used to sort this field. This replacesNavigableField.getSortFields(boolean).- Specified by:
getFieldSortsin interfaceNavigableField- Parameters:
sortOrder- the order in which to sort the field- Returns:
- a list of
FieldSortobjects that can be used to sort this field
-
getSearchApiFeatureFieldSorts
Get the field sorts to use when the "com.atlassian.jira.search.api" feature is enabled. -
getColumnCssClass
- Specified by:
getColumnCssClassin interfaceNavigableField
-
getHiddenFieldId
Description copied from interface:NavigableFieldReturns the id of the field to check for visibility. For example, with original estimate field need to ensure that the timetracking field is not hidden. With most fields, this is the same as their id.- Specified by:
getHiddenFieldIdin interfaceNavigableField
-
prettyPrintChangeHistory
- Specified by:
prettyPrintChangeHistoryin interfaceNavigableField
-
prettyPrintChangeHistory
Description copied from interface:NavigableFieldUsed for email notification templates - allows changelog to be displayed in language of the recipient.- Specified by:
prettyPrintChangeHistoryin interfaceNavigableField- Parameters:
changeHistory- - label- Returns:
- String change history formatted according to locale in i18nHelper
-