@ThreadSafe @PublicSpi public abstract class

AbstractConstantStatisticsMapper

extends Object
implements StatisticsMapper<T>
java.lang.Object
   ↳ com.atlassian.jira.issue.statistics.AbstractConstantStatisticsMapper
Known Direct Subclasses
Known Indirect Subclasses

@PublicSpi

This class is designed for plugins to implement.

Clients of @PublicSpi can expect that programs compiled against a given version will remain binary compatible with later versions of the @PublicSpi as per each product's API policy (clients should refer to each product's API policy for the exact guarantee -- usually binary compatibility is guaranteed at least across minor versions).

Note: @PublicSpi interfaces and classes are specifically designed to be implemented/extended by clients. Hence, the guarantee of binary compatibility is different to that of @PublicApi elements (if an element is both @PublicApi and @PublicSpi, both guarantees apply).

Summary

Fields
protected final ConstantsManager constantsManager
Protected Constructors
AbstractConstantStatisticsMapper(ConstantsManager constantsManager)
Public Methods
boolean equals(Object o)
Comparator<IssueConstant> getComparator()
A comparator that can be used to order objects returned by getValueFromLuceneField(String).
abstract String getDocumentConstant()
Get the constant that this field is indexed with.
SearchRequest getSearchUrlSuffix(IssueConstant value, SearchRequest searchRequest)
IssueConstant getValueFromLuceneField(String documentValue)
Convert the lucene document field back to the object that you wish to use to display it.
int hashCode()
boolean isFieldAlwaysPartOfAnIssue()
Check if the field is always part of an issues data.
boolean isValidValue(IssueConstant value)
Protected Methods
abstract String getConstantType()
abstract String getIssueFieldConstant()
[Expand]
Inherited Methods
From class java.lang.Object
From interface com.atlassian.jira.issue.search.LuceneFieldSorter
From interface com.atlassian.jira.issue.statistics.StatisticsMapper

Fields

protected final ConstantsManager constantsManager

Protected Constructors

protected AbstractConstantStatisticsMapper (ConstantsManager constantsManager)

Public Methods

public boolean equals (Object o)

public Comparator<IssueConstant> getComparator ()

A comparator that can be used to order objects returned by getValueFromLuceneField(String).

The Comparator must be reentrant as it could be used by Lucene from multiple threads at once.

public abstract String getDocumentConstant ()

Get the constant that this field is indexed with.

public SearchRequest getSearchUrlSuffix (IssueConstant value, SearchRequest searchRequest)

public IssueConstant getValueFromLuceneField (String documentValue)

Convert the lucene document field back to the object that you wish to use to display it.

eg. '1000' -> Version 1.

For custom fields, the return value will be passed to getStatHtml(com.atlassian.jira.issue.fields.CustomField, Object, String)

Parameters
documentValue The value of the field in the lucene index
Returns
  • The value that will be passed to the display

public int hashCode ()

public boolean isFieldAlwaysPartOfAnIssue ()

Check if the field is always part of an issues data. This should only return false in the case of a custom field where the value does not have to be set for each issue.

Returns
  • true if this mapper will always be part of an issues data

public boolean isValidValue (IssueConstant value)

Protected Methods

protected abstract String getConstantType ()

protected abstract String getIssueFieldConstant ()