public abstract class

NavigableFieldImpl

extends AbstractField
implements NavigableField
java.lang.Object
   ↳ com.atlassian.jira.issue.fields.AbstractField
     ↳ com.atlassian.jira.issue.fields.NavigableFieldImpl
Known Direct Subclasses
Known Indirect Subclasses

Summary

[Expand]
Inherited Constants
From interface com.atlassian.jira.issue.fields.NavigableField
Fields
protected final ApplicationProperties applicationProperties
protected final VelocityTemplatingEngine templatingEngine
[Expand]
Inherited Fields
From class com.atlassian.jira.issue.fields.AbstractField
Public Constructors
NavigableFieldImpl(String id, String nameKey, String columnHeadingKey, VelocityTemplatingEngine templatingEngine, ApplicationProperties applicationProperties, JiraAuthenticationContext authenticationContext)
NavigableFieldImpl(String id, String nameKey, String columnHeadingKey, String defaultSortOrder, VelocityTemplatingEngine templatingEngine, ApplicationProperties applicationProperties, JiraAuthenticationContext authenticationContext)
Public Methods
String getColumnCssClass()
String getColumnHeadingKey()
String getDefaultSortOrder()
The order in which to sort the field when it is sorted for the first time.
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
ApplicationProperties getApplicationProperties()
Map<StringObject> getVelocityParams(FieldLayoutItem fieldLayoutItem, I18nHelper i18nHelper, Map displayParams, Issue issue)
String renderTemplate(String template, Map velocityParams)
[Expand]
Inherited Methods
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 java.lang.Comparable

Fields

protected final ApplicationProperties applicationProperties

protected final VelocityTemplatingEngine templatingEngine

Public Constructors

public NavigableFieldImpl (String id, String nameKey, String columnHeadingKey, VelocityTemplatingEngine templatingEngine, ApplicationProperties applicationProperties, JiraAuthenticationContext authenticationContext)

public NavigableFieldImpl (String id, String nameKey, String columnHeadingKey, String defaultSortOrder, VelocityTemplatingEngine templatingEngine, ApplicationProperties applicationProperties, JiraAuthenticationContext authenticationContext)

Public Methods

public String getColumnCssClass ()

public String getColumnHeadingKey ()

public String getDefaultSortOrder ()

The order in which to sort the field when it is sorted for the first time.

Returns

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 ApplicationProperties getApplicationProperties ()

protected Map<StringObject> getVelocityParams (FieldLayoutItem fieldLayoutItem, I18nHelper i18nHelper, Map displayParams, Issue issue)

protected String renderTemplate (String template, Map velocityParams)