Package com.atlassian.jira.issue.fields
Class VotesSystemField
java.lang.Object
com.atlassian.jira.issue.fields.AbstractField
com.atlassian.jira.issue.fields.NavigableFieldImpl
com.atlassian.jira.issue.fields.VotesSystemField
- All Implemented Interfaces:
ExportableSystemField,Field,NavigableField,RestAwareField,Comparable
public class VotesSystemField
extends NavigableFieldImpl
implements RestAwareField, ExportableSystemField
Created by IntelliJ IDEA.
User: owenfellows
Date: 05-Aug-2004
Time: 09:24:27
To change this template use File | Settings | File Templates.
-
Field Summary
Fields inherited from class com.atlassian.jira.issue.fields.NavigableFieldImpl
applicationProperties, templatingEngineFields inherited from class com.atlassian.jira.issue.fields.AbstractField
authenticationContextFields inherited from interface com.atlassian.jira.issue.fields.NavigableField
ORDER_ASCENDING, ORDER_DESCENDING, TEMPLATE_DIRECTORY_PATH -
Constructor Summary
ConstructorsConstructorDescriptionVotesSystemField(VelocityTemplatingEngine templatingEngine, ApplicationProperties applicationProperties, JiraAuthenticationContext authenticationContext, JiraBaseUrls jiraBaseUrls) -
Method Summary
Modifier and TypeMethodDescriptiongetColumnViewHtml(FieldLayoutItem fieldLayoutItem, Map displayParams, Issue issue) getFieldTypeInfo(FieldTypeInfoContext fieldTypeInfoContext) Returns lower level Information about the field.getJsonFromIssue(Issue issue, boolean renderedVersionRequired, FieldLayoutItem fieldLayoutItem) Return a FieldJsonDataPair containing a json representation of the raw data for this field, and if required, a json representation of the rendered data for easy display.Return a description of the shape of this field when represented as JSON.getRepresentationFromIssue(Issue issue) For the given issue get an exportable representation for the fieldA 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.Methods inherited from class com.atlassian.jira.issue.fields.NavigableFieldImpl
getApplicationProperties, getColumnCssClass, getColumnHeadingKey, getDefaultSortOrder, getFieldSorts, getHiddenFieldId, getSearchApiFeatureFieldSorts, getSortComparatorSource, getVelocityParams, prettyPrintChangeHistory, prettyPrintChangeHistory, renderTemplateMethods inherited from class com.atlassian.jira.issue.fields.AbstractField
compareTo, equals, getAuthenticationContext, getId, getName, getNameKey, hashCodeMethods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface java.lang.Comparable
compareToMethods inherited from interface com.atlassian.jira.issue.fields.Field
getId, getName, getNameKeyMethods inherited from interface com.atlassian.jira.issue.fields.NavigableField
getValueLoader, hasSortsDefined, prettyPrintChangeHistory
-
Constructor Details
-
VotesSystemField
public VotesSystemField(VelocityTemplatingEngine templatingEngine, ApplicationProperties applicationProperties, JiraAuthenticationContext authenticationContext, JiraBaseUrls jiraBaseUrls)
-
-
Method Details
-
getSorter
Description copied from interface:NavigableFieldA sorter to be used when sorting columns in a table. This sort uses the Lucene Document Collection and is therefore a lot faster than sorting the issues in memory.- Specified by:
getSorterin interfaceNavigableField- Returns:
- A sorter that can be used to sort this field, or null depending on the value of
NavigableField.getSortComparatorSource() - See Also:
-
getSortFields
Description copied from interface:NavigableFieldReturn 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
NavigableField.getSortComparatorSource()If you implement this method there is no need to implement
NavigableField.getSortComparatorSource().- Specified by:
getSortFieldsin interfaceNavigableField- Overrides:
getSortFieldsin classNavigableFieldImpl- Returns:
- The name of the indexed term to be used for native Lucene sorting.
-
getColumnViewHtml
- Specified by:
getColumnViewHtmlin interfaceNavigableField
-
getFieldTypeInfo
Description copied from interface:RestAwareFieldReturns lower level Information about the field. This information contains allowed values and/or the autocomplete url- Specified by:
getFieldTypeInfoin interfaceRestAwareField- Parameters:
fieldTypeInfoContext- theFieldTypeInfoContextcontains context information that is relevant to generate theFieldTypeInfo
-
getJsonSchema
Description copied from interface:RestAwareFieldReturn a description of the shape of this field when represented as JSON.- Specified by:
getJsonSchemain interfaceRestAwareField
-
getJsonFromIssue
public FieldJsonRepresentation getJsonFromIssue(Issue issue, boolean renderedVersionRequired, FieldLayoutItem fieldLayoutItem) Description copied from interface:RestAwareFieldReturn a FieldJsonDataPair containing a json representation of the raw data for this field, and if required, a json representation of the rendered data for easy display.- Specified by:
getJsonFromIssuein interfaceRestAwareField- Parameters:
issue- to get field data fromrenderedVersionRequired- whether the use requested the return of rendered/pretty data as well as raw datafieldLayoutItem- field layout for this field. Will only be supplied if the field is also an ordereable field.- Returns:
- FieldJsonDataPair containing a json representation of the raw data for this field, and if required, a json representation of the rendered data for easy display.
-
getRepresentationFromIssue
Description copied from interface:ExportableSystemFieldFor the given issue get an exportable representation for the field- Specified by:
getRepresentationFromIssuein interfaceExportableSystemField- Parameters:
issue- to get representation for the field- Returns:
- the fields exportable representation
-