public abstract class NavigableFieldImpl extends AbstractField implements NavigableField
Modifier and Type | Field and Description |
---|---|
protected ApplicationProperties |
applicationProperties |
protected VelocityTemplatingEngine |
templatingEngine |
authenticationContext
ORDER_ASCENDING, ORDER_DESCENDING, TEMPLATE_DIRECTORY_PATH
Constructor and Description |
---|
NavigableFieldImpl(String id,
String nameKey,
String columnHeadingKey,
String defaultSortOrder,
VelocityTemplatingEngine templatingEngine,
ApplicationProperties applicationProperties,
JiraAuthenticationContext authenticationContext) |
NavigableFieldImpl(String id,
String nameKey,
String columnHeadingKey,
VelocityTemplatingEngine templatingEngine,
ApplicationProperties applicationProperties,
JiraAuthenticationContext authenticationContext) |
Modifier and Type | Method and Description |
---|---|
protected ApplicationProperties |
getApplicationProperties() |
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.
|
org.apache.lucene.search.FieldComparatorSource |
getSortComparatorSource()
A default implementation that returns a
MappedSortComparator from NavigableField.getSorter() . |
List<org.apache.lucene.search.SortField> |
getSortFields(boolean sortOrder)
Return a list of Lucene SortFields to be used for sorting search results.
|
protected Map<String,Object> |
getVelocityParams(FieldLayoutItem fieldLayoutItem,
I18nHelper i18nHelper,
Map<String,Object> displayParams,
Issue issue) |
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 String |
renderTemplate(String template,
Map<String,Object> velocityParams) |
compareTo, equals, getAuthenticationContext, getId, getName, getNameKey, hashCode
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
getColumnViewHtml, getSorter
getId, getName, getNameKey
compareTo
protected final VelocityTemplatingEngine templatingEngine
protected final ApplicationProperties applicationProperties
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 String getColumnHeadingKey()
getColumnHeadingKey
in interface NavigableField
public String getColumnCssClass()
getColumnCssClass
in interface NavigableField
public String getDefaultSortOrder()
NavigableField
getDefaultSortOrder
in interface NavigableField
NavigableField.ORDER_ASCENDING
or NavigableField.ORDER_DESCENDING
public org.apache.lucene.search.FieldComparatorSource getSortComparatorSource()
MappedSortComparator
from NavigableField.getSorter()
.getSortComparatorSource
in interface NavigableField
public List<org.apache.lucene.search.SortField> getSortFields(boolean sortOrder)
NavigableField
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()
.
getSortFields
in interface NavigableField
protected Map<String,Object> getVelocityParams(FieldLayoutItem fieldLayoutItem, I18nHelper i18nHelper, Map<String,Object> displayParams, Issue issue)
public String getHiddenFieldId()
NavigableField
getHiddenFieldId
in interface NavigableField
protected ApplicationProperties getApplicationProperties()
public String prettyPrintChangeHistory(String changeHistory)
prettyPrintChangeHistory
in interface NavigableField
public String prettyPrintChangeHistory(String changeHistory, I18nHelper i18nHelper)
NavigableField
prettyPrintChangeHistory
in interface NavigableField
Copyright © 2002-2017 Atlassian. All Rights Reserved.