Class StatisticsManagerImpl
java.lang.Object
com.atlassian.jira.issue.statistics.StatisticsManagerImpl
- All Implemented Interfaces:
StatisticsManager
Utilities class that returns issue statistics for objects.
-
Constructor Summary
ConstructorsConstructorDescriptionStatisticsManagerImpl(JiraAuthenticationContext jiraAuthenticationContext, ProjectManager projectManager) -
Method Summary
Modifier and TypeMethodDescriptiongetObjectsResultingFrom(Optional<Query> query, String statsObject) Returns objects that the issues resulting from the given query belong to, and the number of issues for each object.getProjectsWithItemsWithIssueCount(Optional<Query> query, Function<T, Long> objToProjectIdMapper, String objectType) This method returns objects the issues resulting from the given query belong to.
-
Constructor Details
-
StatisticsManagerImpl
public StatisticsManagerImpl(JiraAuthenticationContext jiraAuthenticationContext, ProjectManager projectManager)
-
-
Method Details
-
getObjectsResultingFrom
public StatisticMapWrapper<Object,Integer> getObjectsResultingFrom(Optional<Query> query, String statsObject) Description copied from interface:StatisticsManagerReturns objects that the issues resulting from the given query belong to, and the number of issues for each object. Issues that do not belong to any object are stored in the null entry. When a nicer wrapper for the FilterStatisticsGenerator is created, please replace this with it.- Specified by:
getObjectsResultingFromin interfaceStatisticsManager- Parameters:
query- Query to be evaluated. May be null, is then treated as an empty query (no constraints)statsObject- Type of the object that statistics are calculated for. Possible values are given as constants in the FilterStatisticsValuesGenerator class. e.g. 'project' or 'component'. The custom field which this string refers to must implementCustomFieldStattable- Returns:
- All of the statistics for the resulting objects of the query.
-
getProjectsWithItemsWithIssueCount
public <T> Map<Project,Map<T, getProjectsWithItemsWithIssueCountInteger>> (Optional<Query> query, Function<T, Long> objToProjectIdMapper, String objectType) Description copied from interface:StatisticsManagerThis method returns objects the issues resulting from the given query belong to. Together with the objects the parent project is also returned. Issues that do not belong to any object are ignored.- Specified by:
getProjectsWithItemsWithIssueCountin interfaceStatisticsManager- Type Parameters:
T- Type of the resulting object- Parameters:
query- Query to be evaluated. May be null, is then treated as an empty query (no constraints)objToProjectIdMapper- Function that for an object should return the id of the project it belongs toobjectType- Type of object to be searched for. Possible values are given as constants in the FilterStatisticsValuesGenerator class- Returns:
- See description
-