Class UserStatisticsMapper
java.lang.Object
com.atlassian.jira.issue.statistics.UserStatisticsMapper
- All Implemented Interfaces:
SearchRequestAppender.Factory<ApplicationUser>,StatisticsMapper<ApplicationUser>,FieldValueLoader<ApplicationUser>
- Direct Known Subclasses:
AssigneeStatisticsMapper,CreatorStatisticsMapper,CustomFieldUserStatisticsMapper,ReporterStatisticsMapper
public class UserStatisticsMapper
extends Object
implements StatisticsMapper<ApplicationUser>, SearchRequestAppender.Factory<ApplicationUser>
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionUserStatisticsMapper(UserFieldSearchConstantsWithEmpty searchConstants, UserManager userManager, JiraAuthenticationContext jiraAuthenticationContext) UserStatisticsMapper(String clauseName, String emptyIndexValue, String indexedField, UserManager userManager, JiraAuthenticationContext jiraAuthenticationContext) -
Method Summary
Modifier and TypeMethodDescriptionbooleanfield()Get the field name that this field is indexed with.protected StringA comparator by which the resulting values should be ordered when multiple values are present.getSearchUrlSuffix(ApplicationUser user, SearchRequest searchRequest) Deprecated.Use #getSearchRequestAppender().appendInclusiveSingleValueClause()inthashCode()booleanCheck if the field is always part of an issues' data.booleanisValidValue(ApplicationUser value) Check whether this value is valid for this particular search.Convert the document field back to the object that you wish to use to display it.
-
Field Details
-
jiraAuthenticationContext
-
-
Constructor Details
-
UserStatisticsMapper
public UserStatisticsMapper(UserFieldSearchConstantsWithEmpty searchConstants, UserManager userManager, JiraAuthenticationContext jiraAuthenticationContext) -
UserStatisticsMapper
public UserStatisticsMapper(String clauseName, String emptyIndexValue, String indexedField, UserManager userManager, JiraAuthenticationContext jiraAuthenticationContext)
-
-
Method Details
-
getComparator
Description copied from interface:FieldValueLoaderA comparator by which the resulting values should be ordered when multiple values are present.The Comparator must be reentrant as it could be used by Lucene from multiple threads at once.
- Specified by:
getComparatorin interfaceFieldValueLoader<ApplicationUser>
-
isValidValue
Description copied from interface:StatisticsMapperCheck 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)- Specified by:
isValidValuein interfaceStatisticsMapper<ApplicationUser>- Parameters:
value- This is the same value that will be returned frominvalid reference
#getValueFromLuceneField(String)- Returns:
- true if this value is valid for this particular search
-
field
Description copied from interface:FieldValueLoaderGet the field name that this field is indexed with.- Specified by:
fieldin interfaceFieldValueLoader<ApplicationUser>
-
loadValue
Description copied from interface:FieldValueLoaderConvert the document field back to the object that you wish to use to display it.e.g. '1000' -> Version 1.
For custom fields, the return value will be passed to
CustomFieldSearcherModuleDescriptor.getStatHtml(com.atlassian.jira.issue.fields.CustomField, Object, String)- Specified by:
loadValuein interfaceFieldValueLoader<ApplicationUser>- Parameters:
documentValue- The value of the field in the index or null if no values exist- Returns:
- The value that will be passed to the display
-
isFieldAlwaysPartOfAnIssue
public boolean isFieldAlwaysPartOfAnIssue()Description copied from interface:StatisticsMapperCheck 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.- Specified by:
isFieldAlwaysPartOfAnIssuein interfaceStatisticsMapper<ApplicationUser>- Returns:
- true if this mapper will always be part of an issues data
-
getSearchUrlSuffix
@Deprecated public SearchRequest getSearchUrlSuffix(ApplicationUser user, SearchRequest searchRequest) Deprecated.Use #getSearchRequestAppender().appendInclusiveSingleValueClause()Description copied from interface:StatisticsMapperGet a suffix for the issue navigator, which allows for filtering on this value.e.g. a project field would return a SearchRequest object who's getQueryString method will produce
pid=10240Note that values returned from implementations should return values that are URLEncoded.
- Specified by:
getSearchUrlSuffixin interfaceStatisticsMapper<ApplicationUser>- Parameters:
user- This is the same value that will be returned frominvalid reference
#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:
-
getSearchRequestAppender
- Specified by:
getSearchRequestAppenderin interfaceSearchRequestAppender.Factory<ApplicationUser>- Since:
- v6.0
-
getClauseName
-
equals
-
hashCode
public int hashCode()
-