public abstract class

AbstractOrderableNavigableFieldImpl

extends AbstractOrderableField<V>
implements NavigableField
java.lang.Object
   ↳ com.atlassian.jira.issue.fields.AbstractField
     ↳ com.atlassian.jira.issue.fields.AbstractOrderableField<V>
       ↳ com.atlassian.jira.issue.fields.AbstractOrderableNavigableFieldImpl<V>
Known Direct Subclasses
Known Indirect Subclasses

Class Overview

Copyright (c) 2002-2004 All rights reserved.

Summary

[Expand]
Inherited Constants
From interface com.atlassian.jira.issue.fields.NavigableField
From interface com.atlassian.jira.issue.fields.OrderableField
[Expand]
Inherited Fields
From class com.atlassian.jira.issue.fields.AbstractField
Public Constructors
AbstractOrderableNavigableFieldImpl(String id, String name, VelocityTemplatingEngine templatingEngine, ApplicationProperties applicationProperties, JiraAuthenticationContext authenticationContext, PermissionManager permissionManager, SearchHandlerFactory searchHandlerFactory)
Public Methods
String getColumnCssClass()
String getHiddenFieldId()
Returns the id of the field to check for visibility.
FieldComparatorSource getSortComparatorSource()
A default implementation that returns a MappedSortComparator from getSorter().
List<SortField> getSortFields(boolean sortOrder)
Return a list of Lucene SortFields to be used for sorting search results.
String prettyPrintChangeHistory(String changeHistory)
String prettyPrintChangeHistory(String changeHistory, I18nHelper i18nHelper)
Used for email notification templates - allows changelog to be displayed in language of the recipient.
Protected Methods
Map<StringObject> getVelocityParams(I18nHelper isI18nHelper, Map displayParams, Issue issue)
[Expand]
Inherited Methods
From class com.atlassian.jira.issue.fields.AbstractOrderableField
From class com.atlassian.jira.issue.fields.AbstractField
From class java.lang.Object
From interface com.atlassian.jira.issue.fields.Field
From interface com.atlassian.jira.issue.fields.NavigableField
From interface com.atlassian.jira.issue.fields.OrderableField
From interface com.atlassian.jira.issue.fields.SearchableField
From interface java.lang.Comparable

Public Constructors

public AbstractOrderableNavigableFieldImpl (String id, String name, VelocityTemplatingEngine templatingEngine, ApplicationProperties applicationProperties, JiraAuthenticationContext authenticationContext, PermissionManager permissionManager, SearchHandlerFactory searchHandlerFactory)

Public Methods

public String getColumnCssClass ()

public String getHiddenFieldId ()

Returns 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.

public FieldComparatorSource getSortComparatorSource ()

A default implementation that returns a MappedSortComparator from getSorter().

Returns
  • A SortComparatorSource that can be used to sort, or null if this field does not use custom sorting

public List<SortField> getSortFields (boolean sortOrder)

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 getSortComparatorSource()

If you implement this method there is no need to implement getSortComparatorSource().

Returns
  • The name of the indexed term to be used for native Lucene sorting.

public String prettyPrintChangeHistory (String changeHistory)

public String prettyPrintChangeHistory (String changeHistory, I18nHelper i18nHelper)

Used for email notification templates - allows changelog to be displayed in language of the recipient.

Returns
  • String change history formatted according to locale in i18nHelper

Protected Methods

protected Map<StringObject> getVelocityParams (I18nHelper isI18nHelper, Map displayParams, Issue issue)