com.atlassian.jira.issue.statistics
Interface StatisticsMapper<T>

All Superinterfaces:
LuceneFieldSorter<T>
All Known Implementing Classes:
AbstractConstantStatisticsMapper, AbstractCustomFieldStatisticsMapper, AssigneeStatisticsMapper, CachingStatisticsMapper, ComponentStatisticsMapper, CustomFieldLabelsStatisticsMapper, CustomFieldProjectStatisticsMapper, CustomFieldUserStatisticsMapper, CustomFieldVersionStatisticsMapper, DatePeriodStatisticsMapper, FixForVersionStatisticsMapper, GroupPickerStatisticsMapper, IssueTypeStatisticsMapper, LabelsStatisticsMapper, LongFieldStatisticsMapper, NumericFieldStatisticsMapper, PriorityStatisticsMapper, ProjectSelectStatisticsMapper, ProjectStatisticsMapper, RaisedInVersionStatisticsMapper, ReporterStatisticsMapper, ResolutionStatisticsMapper, ReversePriorityStatisticsMapper, SecurityLevelStatisticsMapper, SelectStatisticsMapper, StatisticsMapperWrapper, StatusStatisticsMapper, TimeTrackingStatisticsMapper, UserPickerStatisticsMapper, UserStatisticsMapper, VersionStatisticsMapper, VotesStatisticsMapper, WatchesStatisticsMapper

@PublicSpi
public interface StatisticsMapper<T>
extends LuceneFieldSorter<T>

Allow mapping from Lucene indexes, back to the fields that they came from.

Any 'field' that implements this is capable of having a statistic calculated from it.

See Also:
FilterStatisticsValuesGenerator

Method Summary
 SearchRequest getSearchUrlSuffix(T value, SearchRequest searchRequest)
          Get a suffix for the issue navigator, which allows for filtering on this value.
 boolean isFieldAlwaysPartOfAnIssue()
          Check if the field is always part of an issues data.
 boolean isValidValue(T value)
          Check whether this value is valid for this particular search.
 
Methods inherited from interface com.atlassian.jira.issue.search.LuceneFieldSorter
equals, getComparator, getDocumentConstant, getValueFromLuceneField, hashCode
 

Method Detail

isValidValue

boolean isValidValue(T value)
Check whether this value is valid for this particular search. This is useful if you do not wish to display all the values that are indexed (eg - only show released versions)

Parameters:
value - This is the same value that will be returned from LuceneFieldSorter.getValueFromLuceneField(String)
Returns:
true if this value is valid for this particular search

isFieldAlwaysPartOfAnIssue

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

getSearchUrlSuffix

SearchRequest getSearchUrlSuffix(T value,
                                 SearchRequest searchRequest)
Get a suffix for the issue navigator, which allows for filtering on this value.

eg. a project field would return a SearchRequest object who's getQueryString method will produce pid=10240

Note that values returned from implementations should return values that are URLEncoded.

Parameters:
value - This is the same value that will be returned from LuceneFieldSorter.getValueFromLuceneField(String)
searchRequest - is the search request that should be used as the base of the newly generated SearchRequest object. If this parameter is null then the return type will also be null.
Returns:
a SearchRequest object that will generate the correct issue navigator url to search the correct statistics set, null otherwise.
See Also:
URLEncoder.encode(String)


Copyright © 2002-2013 Atlassian. All Rights Reserved.