public class

VotesSystemField

extends NavigableFieldImpl
implements RestAwareField
java.lang.Object
   ↳ com.atlassian.jira.issue.fields.AbstractField
     ↳ com.atlassian.jira.issue.fields.NavigableFieldImpl
       ↳ com.atlassian.jira.issue.fields.VotesSystemField

Class Overview

Created by IntelliJ IDEA. User: owenfellows Date: 05-Aug-2004 Time: 09:24:27 To change this template use File | Settings | File Templates.

Summary

[Expand]
Inherited Constants
From interface com.atlassian.jira.issue.fields.NavigableField
[Expand]
Inherited Fields
From class com.atlassian.jira.issue.fields.NavigableFieldImpl
From class com.atlassian.jira.issue.fields.AbstractField
Public Constructors
VotesSystemField(VelocityTemplatingEngine templatingEngine, ApplicationProperties applicationProperties, JiraAuthenticationContext authenticationContext, JiraBaseUrls jiraBaseUrls)
Public Methods
String getColumnViewHtml(FieldLayoutItem fieldLayoutItem, Map displayParams, Issue issue)
FieldTypeInfo getFieldTypeInfo(FieldTypeInfoContext fieldTypeInfoContext)
Returns lower level Information about the field.
FieldJsonRepresentation 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.
JsonType getJsonSchema()
Return a description of the shape of this field when represented as JSON.
List<SortField> getSortFields(boolean sortOrder)
Return a list of Lucene SortFields to be used for sorting search results.
LuceneFieldSorter getSorter()
[Expand]
Inherited Methods
From class com.atlassian.jira.issue.fields.NavigableFieldImpl
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 com.atlassian.jira.issue.fields.rest.RestAwareField
From interface java.lang.Comparable

Public Constructors

public VotesSystemField (VelocityTemplatingEngine templatingEngine, ApplicationProperties applicationProperties, JiraAuthenticationContext authenticationContext, JiraBaseUrls jiraBaseUrls)

Public Methods

public String getColumnViewHtml (FieldLayoutItem fieldLayoutItem, Map displayParams, Issue issue)

public FieldTypeInfo getFieldTypeInfo (FieldTypeInfoContext fieldTypeInfoContext)

Returns lower level Information about the field. This information contains allowed values and/or the autocomplete url

Parameters
fieldTypeInfoContext the FieldTypeInfoContext contains context information that is relevant to generate the FieldTypeInfo

public FieldJsonRepresentation 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.

Parameters
issue to get field data from
renderedVersionRequired whether the use requested the return of rendered/pretty data as well as raw data
fieldLayoutItem 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.

public JsonType getJsonSchema ()

Return a description of the shape of this field when represented as JSON.

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 LuceneFieldSorter getSorter ()