public abstract class NavigableFieldImpl extends AbstractField implements NavigableField
| Modifier and Type | Field and Description |
|---|---|
protected ApplicationProperties |
applicationProperties |
protected VelocityTemplatingEngine |
templatingEngine |
authenticationContextORDER_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, hashCodeclone, finalize, getClass, notify, notifyAll, toString, wait, wait, waitgetColumnViewHtml, getSortergetId, getName, getNameKeycompareToprotected 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 NavigableFieldpublic String getColumnCssClass()
getColumnCssClass in interface NavigableFieldpublic String getDefaultSortOrder()
NavigableFieldgetDefaultSortOrder in interface NavigableFieldNavigableField.ORDER_ASCENDING or NavigableField.ORDER_DESCENDINGpublic org.apache.lucene.search.FieldComparatorSource getSortComparatorSource()
MappedSortComparator from NavigableField.getSorter().getSortComparatorSource in interface NavigableFieldpublic List<org.apache.lucene.search.SortField> getSortFields(boolean sortOrder)
NavigableFieldUsing 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 NavigableFieldprotected Map<String,Object> getVelocityParams(FieldLayoutItem fieldLayoutItem, I18nHelper i18nHelper, Map<String,Object> displayParams, Issue issue)
public String getHiddenFieldId()
NavigableFieldgetHiddenFieldId in interface NavigableFieldprotected ApplicationProperties getApplicationProperties()
public String prettyPrintChangeHistory(String changeHistory)
prettyPrintChangeHistory in interface NavigableFieldpublic String prettyPrintChangeHistory(String changeHistory, I18nHelper i18nHelper)
NavigableFieldprettyPrintChangeHistory in interface NavigableFieldCopyright © 2002-2021 Atlassian. All Rights Reserved.