Class TwoDimensionalStatsResource
java.lang.Object
com.atlassian.jira.gadgets.system.AbstractResource
com.atlassian.jira.gadgets.system.SearchQueryBackedResource
com.atlassian.jira.gadgets.system.TwoDimensionalStatsResource
@Path("/twodimensionalfilterstats")
@Produces("application/json")
public class TwoDimensionalStatsResource
extends SearchQueryBackedResource
REST endpoint to validate and retreive a two dimensional stats resource.
- Since:
- v4.0
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classstatic classstatic classstatic class -
Field Summary
Fields inherited from class com.atlassian.jira.gadgets.system.SearchQueryBackedResource
authenticationContext, QUERY_STRING, searchService -
Constructor Summary
ConstructorsConstructorDescriptionTwoDimensionalStatsResource(ChartUtils chartUtils, JiraAuthenticationContext authenticationContext, SearchService searchService, PermissionManager permissionManager, StatisticTypesProvider statisticTypesProvider, VelocityRequestContextFactory velocityRequestContextFactory, FieldValueToDisplayTransformer<StatsMarkup> fieldValueToDisplayTransformer, TwoDimensionalAggregator aggregationSearcher) -
Method Summary
Modifier and TypeMethodDescriptionjakarta.ws.rs.core.ResponsegetStats(String queryString, String xStatType, String yStatType, String sortDirection, String sortBy, String numberToShowStr) Generate a two dimensional statistics view of a filterprotected com.atlassian.jira.gadgets.system.StatsSearchUrlBuilderjakarta.ws.rs.core.ResponseMethods inherited from class com.atlassian.jira.gadgets.system.SearchQueryBackedResource
getFilterTitle, getFilterUrl, getSearchRequestAndValidate, validateSizeMethods inherited from class com.atlassian.jira.gadgets.system.AbstractResource
createErrorResponse, createIndexingUnavailableResponse, createServerErroreResponse, createValidationResponse
-
Constructor Details
-
TwoDimensionalStatsResource
@Inject public TwoDimensionalStatsResource(ChartUtils chartUtils, JiraAuthenticationContext authenticationContext, SearchService searchService, PermissionManager permissionManager, StatisticTypesProvider statisticTypesProvider, VelocityRequestContextFactory velocityRequestContextFactory, FieldValueToDisplayTransformer<StatsMarkup> fieldValueToDisplayTransformer, TwoDimensionalAggregator aggregationSearcher)
-
-
Method Details
-
validate
-
getStats
@GET @Path("/generate") public jakarta.ws.rs.core.Response getStats(@QueryParam("filterId") String queryString, @QueryParam("xstattype") @DefaultValue("assignees") String xStatType, @QueryParam("ystattype") @DefaultValue("assignees") String yStatType, @QueryParam("sortDirection") @DefaultValue("asc") String sortDirection, @QueryParam("sortBy") @DefaultValue("natural") String sortBy, @QueryParam("numberToShow") @DefaultValue("5") 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 axisyStatType- The stat to group by on the y axissortDirection- Ascending or descending sortsortBy- The field with which to order the statsnumberToShowStr- Maximum number of results to display on the y-axis. 0 represents unlimited.- Returns:
- a
TwoDimensionalStatsResource.TwoDimensionalPropertiesif all params validate else a Collection ofValidationError
-
getStatsSearchUrlBuilder
protected com.atlassian.jira.gadgets.system.StatsSearchUrlBuilder getStatsSearchUrlBuilder()
-