Class StatisticsMapGenerator
java.lang.Object
com.atlassian.jira.issue.statistics.StatisticsMapGenerator
Generates a map of statistics for a given filter producing a
Extracted from the deprecated Lucene DMZ module for compatibility with the Search API.
StatisticMap
.
Extracted from the deprecated Lucene DMZ module for compatibility with the Search API.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic class
Enumerated type for sort direction.static class
Enumerated type for ordering of statistics.protected static class
-
Constructor Summary
ConstructorsConstructorDescriptionStatisticsMapGenerator
(ApplicationUser remoteUser, SearchRequest filter) StatisticsMapGenerator
(ApplicationUser remoteUser, SearchRequest filter, boolean overrideSecurity) StatisticsMapGenerator
(ApplicationUser remoteUser, Long projectId) StatisticsMapGenerator
(ApplicationUser remoteUser, Long projectId, boolean limitToOpenIssues) StatisticsMapGenerator
(ApplicationUser remoteUser, Long projectId, Clause additionalClause, boolean limitToOpenIssues) Instantiates this class with given parameters. -
Method Summary
Modifier and TypeMethodDescriptiongenerateStatisticMapWrapper
(StatisticsMapper mapper, StatisticsMapGenerator.OrderBy orderBy, StatisticsMapGenerator.Direction direction) Returns aStatisticMapWrapper
containing ordered search statistic resultsgetAllFilterBy
(String type) getAllFilterBy
(String type, StatisticsMapGenerator.OrderBy orderBy, StatisticsMapGenerator.Direction direction) long
getCount()
Returns nuber of search results for this filterReturns a collection of found issues for this filterlong
Stats by Componentlong
getOpenByComponent
(org.ofbiz.core.entity.GenericValue component) long
Stats by FixForlong
getOpenByFixFor
(Version version) getSearchRequestAppender
(String statisticType) This will obtain a SearchRequestAppender relevant for the given statisticType, either by casting the StatisticsMapper to SearchRequestAppender.Factory or by constructing an artificial SearchRequestAppender wrapper around the StatisticsMapper.searchCountMap
(String groupField)
-
Constructor Details
-
StatisticsMapGenerator
public StatisticsMapGenerator() -
StatisticsMapGenerator
-
StatisticsMapGenerator
public StatisticsMapGenerator(ApplicationUser remoteUser, SearchRequest filter, boolean overrideSecurity) -
StatisticsMapGenerator
public StatisticsMapGenerator(ApplicationUser remoteUser, Long projectId, boolean limitToOpenIssues) -
StatisticsMapGenerator
-
StatisticsMapGenerator
public StatisticsMapGenerator(ApplicationUser remoteUser, Long projectId, Clause additionalClause, boolean limitToOpenIssues) Instantiates this class with given parameters.- Parameters:
remoteUser
- remote UserprojectId
- project idadditionalClause
- An additional clause to and to the current filter. Can be null.limitToOpenIssues
- flag that limits issues on status (open vs other)- Since:
- 10.7
-
-
Method Details
-
getFilter
-
generateStatisticMapWrapper
public StatisticMapWrapper generateStatisticMapWrapper(StatisticsMapper mapper) throws SearchException - Throws:
SearchException
-
generateStatisticMapWrapper
public StatisticMapWrapper generateStatisticMapWrapper(StatisticsMapper mapper, StatisticsMapGenerator.OrderBy orderBy, StatisticsMapGenerator.Direction direction) throws SearchException Returns aStatisticMapWrapper
containing ordered search statistic results- Parameters:
mapper
- the relevant StatisticsMapper for this instanceorderBy
- either OrderBy.NATURAL or OrderBy.TOTAL to specify ordering by result keys or values respectively. null produces the same result as OrderBy.NATURALdirection
- either Direction.DESC or Direction.ASC to specify direction of ordering. null produces the same result as Direction.ASC- Returns:
- the ordered results
- Throws:
SearchException
- .
-
searchCountMap
protected StatisticsMapGenerator.SearchStatisticsResult searchCountMap(String groupField) throws SearchException - Throws:
SearchException
-
getOpenByComponent
Stats by Component- Throws:
SearchException
-
getOpenByComponent
- Throws:
SearchException
-
getOpenByFixFor
Stats by FixFor- Throws:
SearchException
-
getOpenByFixFor
- Throws:
SearchException
-
getCount
Returns nuber of search results for this filter- Returns:
- count
- Throws:
SearchException
- if search fails- Since:
- v3.10
-
getIssues
Returns a collection of found issues for this filter- Returns:
- collection of
Issue
objects - Throws:
SearchException
- if search fails- Since:
- v3.10
-
getAllFilterBy
- Throws:
SearchException
-
getAllFilterBy
public StatisticMapWrapper getAllFilterBy(String type, StatisticsMapGenerator.OrderBy orderBy, StatisticsMapGenerator.Direction direction) throws SearchException - Throws:
SearchException
-
getMapper
-
getSearchRequestAppender
This will obtain a SearchRequestAppender relevant for the given statisticType, either by casting the StatisticsMapper to SearchRequestAppender.Factory or by constructing an artificial SearchRequestAppender wrapper around the StatisticsMapper.
-