public class MockNavigableField extends Object implements NavigableField, Comparable
ORDER_ASCENDING, ORDER_DESCENDING, TEMPLATE_DIRECTORY_PATH| Constructor and Description |
|---|
MockNavigableField(String id) |
| Modifier and Type | Method and Description |
|---|---|
int |
compareTo(Object o) |
boolean |
equals(Object o) |
String |
getColumnCssClass() |
String |
getColumnHeadingKey() |
String |
getColumnViewHtml(FieldLayoutItem fieldLayoutItem,
Map displayParams,
Issue issue) |
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.
|
String |
getId()
The unique id of the field
|
String |
getName()
Returns i18n'ed name of the field.
|
String |
getNameKey()
The i18n key that is used to lookup the field's name when it is displayed
|
org.apache.lucene.search.FieldComparatorSource |
getSortComparatorSource()
A sortComparatorSource object to be used for sorting columns in a table.
|
LuceneFieldSorter |
getSorter()
A sorter to be used when sorting columns in a table.
|
List<org.apache.lucene.search.SortField> |
getSortFields(boolean sortOrder)
Return a list of Lucene SortFields to be used for sorting search results.
|
int |
hashCode() |
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.
|
public MockNavigableField(String id)
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()
NavigableFieldMappedSortComparator using the NavigableField.getSorter()
method. However, fields can provide any sorting mechanism that they wish.
If a field can be sorted directly using terms in the Lucene index then the field should implement NavigableField.getSortFields(boolean sortOrder)
rather than this method.
In large installations custom sorting may incur a maor performance penalty.getSortComparatorSource in interface NavigableFieldpublic List<org.apache.lucene.search.SortField> getSortFields(boolean sortOrder)
NavigableField
return Collections.singletonList(new SortField(fieldName, sortOrder));
NavigableField.getSortComparatorSource()
If you implement this method there is no need to implement NavigableField.getSortComparatorSource().getSortFields in interface NavigableFieldpublic LuceneFieldSorter getSorter()
NavigableFieldgetSorter in interface NavigableFieldNavigableField.getSortComparatorSource()DocumentIssueImpl,
MappedSortComparatorpublic String getColumnViewHtml(FieldLayoutItem fieldLayoutItem, Map displayParams, Issue issue)
getColumnViewHtml in interface NavigableFieldpublic String getHiddenFieldId()
NavigableFieldgetHiddenFieldId in interface NavigableFieldpublic String prettyPrintChangeHistory(String changeHistory)
prettyPrintChangeHistory in interface NavigableFieldpublic String prettyPrintChangeHistory(String changeHistory, I18nHelper i18nHelper)
NavigableFieldprettyPrintChangeHistory in interface NavigableFieldpublic String getNameKey()
FieldgetNameKey in interface Fieldpublic String getName()
Fieldpublic int compareTo(Object o)
compareTo in interface ComparableCopyright © 2002-2015 Atlassian. All Rights Reserved.