com.atlassian.jira.gadgets.system
Class TwoDimensionalStatsResource

java.lang.Object
  extended by com.atlassian.jira.gadgets.system.AbstractResource
      extended by com.atlassian.jira.gadgets.system.SearchQueryBackedResource
          extended by com.atlassian.jira.gadgets.system.TwoDimensionalStatsResource

public class TwoDimensionalStatsResource
extends SearchQueryBackedResource

REST endpoint to validate and retreive a two dimensional stats resource.

Since:
v4.0

Nested Class Summary
static class TwoDimensionalStatsResource.Cell
           
static class TwoDimensionalStatsResource.FilterProperties
           
static class TwoDimensionalStatsResource.Row
           
static class TwoDimensionalStatsResource.TwoDimensionalProperties
           
 
Field Summary
 
Fields inherited from class com.atlassian.jira.gadgets.system.SearchQueryBackedResource
authenticationContext, chartUtils, permissionManager, QUERY_STRING, searchService
 
Constructor Summary
TwoDimensionalStatsResource(ChartUtils chartUtils, JiraAuthenticationContext authenticationContext, SearchService searchService, PermissionManager permissionManager, StatisticTypesResource statisticTypesResource, SearchProvider searchProvider, VelocityRequestContextFactory velocityRequestContextFactory, IssueIndexManager issueIndexManager, FieldValueToDisplayTransformer<StatsMarkup> fieldValueToDisplayTransformer, FieldManager fieldManager, FieldVisibilityManager fieldVisibilityManager, ApplicationProperties applicationProperties, ReaderCache readerCache)
           
 
Method Summary
protected  TwoDimensionalStatsMap getAndPopulateTwoDimensionalStatsMap(StatisticsMapper xAxisMapper, StatisticsMapper yAxisMapper, SearchRequest searchRequest)
           
 javax.ws.rs.core.Response getStats(String queryString, String xStatType, String yStatType, String sortDirection, String sortBy, boolean showTotals, String numberToShowStr)
          Generate a two dimensional statistics view of a filter
protected  com.atlassian.jira.gadgets.system.StatsSearchUrlBuilder getStatsSearchUrlBuilder()
           
 javax.ws.rs.core.Response validate(String queryString, String xStatType, String yStatType, String numberToShow)
           
 
Methods inherited from class com.atlassian.jira.gadgets.system.SearchQueryBackedResource
getFilterTitle, getFilterUrl, getSearchRequestAndValidate
 
Methods inherited from class com.atlassian.jira.gadgets.system.AbstractResource
createErrorResponse, createIndexingUnavailableResponse, createValidationResponse
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TwoDimensionalStatsResource

public TwoDimensionalStatsResource(ChartUtils chartUtils,
                                   JiraAuthenticationContext authenticationContext,
                                   SearchService searchService,
                                   PermissionManager permissionManager,
                                   StatisticTypesResource statisticTypesResource,
                                   SearchProvider searchProvider,
                                   VelocityRequestContextFactory velocityRequestContextFactory,
                                   IssueIndexManager issueIndexManager,
                                   FieldValueToDisplayTransformer<StatsMarkup> fieldValueToDisplayTransformer,
                                   FieldManager fieldManager,
                                   FieldVisibilityManager fieldVisibilityManager,
                                   ApplicationProperties applicationProperties,
                                   ReaderCache readerCache)
Method Detail

validate

public javax.ws.rs.core.Response validate(String queryString,
                                          String xStatType,
                                          String yStatType,
                                          String numberToShow)

getStats

public javax.ws.rs.core.Response getStats(String queryString,
                                          String xStatType,
                                          String yStatType,
                                          String sortDirection,
                                          String sortBy,
                                          boolean showTotals,
                                          String numberToShowStr)
Generate a two dimensional statistics view of a filter

Parameters:
queryString - a filter id (starts with "filter-", or just the number)
xStatType - The stat to group by on the x axis
yStatType - The stat to group by on the y axis
sortBy - The field with which to order the stats
showTotals - Include additional rows / columns that include the total number of issue for x / y axis and totals
sortDirection - Ascending or descending sort
numberToShowStr - Maximum number of results to display on the y-axis. 0 represents unlimited.
Returns:
a TwoDimensionalStatsResource.TwoDimensionalProperties if all params validate else a Collection of ValidationError

getAndPopulateTwoDimensionalStatsMap

protected TwoDimensionalStatsMap getAndPopulateTwoDimensionalStatsMap(StatisticsMapper xAxisMapper,
                                                                      StatisticsMapper yAxisMapper,
                                                                      SearchRequest searchRequest)

getStatsSearchUrlBuilder

protected com.atlassian.jira.gadgets.system.StatsSearchUrlBuilder getStatsSearchUrlBuilder()


Copyright © 2002-2014 Atlassian. All Rights Reserved.