Class CreatedVsResolvedResource
java.lang.Object
com.atlassian.jira.gadgets.system.AbstractResource
com.atlassian.jira.gadgets.system.SearchQueryBackedResource
com.atlassian.jira.gadgets.system.CreatedVsResolvedResource
@Path("/createdVsResolved")
@Produces("application/json")
public class CreatedVsResolvedResource
extends SearchQueryBackedResource
REST endpoint to validate and retreive a Created vs Resolved chart.
- Since:
- v4.0
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classA simple bean contain all information required to render the Created Versus Chartstatic class -
Field Summary
FieldsFields inherited from class com.atlassian.jira.gadgets.system.SearchQueryBackedResource
authenticationContext, QUERY_STRING, searchService -
Constructor Summary
ConstructorsConstructorDescriptionCreatedVsResolvedResource(ChartFactory chartFactory, ChartUtils chartUtils, JiraAuthenticationContext authenticationContext, PermissionManager permissionManager, SearchService searchService, VelocityRequestContextFactory velocityRequestContextFactory, ApplicationProperties applicationProperties, TimeZoneManager timeZoneManager) -
Method Summary
Modifier and TypeMethodDescriptionjakarta.ws.rs.core.ResponsegenerateChart(jakarta.servlet.http.HttpServletRequest request, String queryString, String days, String endDate, String periodName, String versionLabel, boolean isCumulative, boolean showUnresolvedTrend, boolean returnData, int width, int height, boolean inline) Generate a create Versus Resolved Chart and returns a simple bean containing all relievent informationjakarta.ws.rs.core.ResponsevalidateChart(String queryString, String days, String periodName, String versionLabel) Ensures all parameters are valid for the Created Versus Resolved ChartMethods 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
-
Field Details
-
DAYS_NAME
- See Also:
-
VERSION_LABEL
- See Also:
-
-
Constructor Details
-
CreatedVsResolvedResource
@Inject public CreatedVsResolvedResource(ChartFactory chartFactory, ChartUtils chartUtils, JiraAuthenticationContext authenticationContext, PermissionManager permissionManager, SearchService searchService, VelocityRequestContextFactory velocityRequestContextFactory, ApplicationProperties applicationProperties, TimeZoneManager timeZoneManager)
-
-
Method Details
-
generateChart
@GET @Path("/generate") public jakarta.ws.rs.core.Response generateChart(@Context jakarta.servlet.http.HttpServletRequest request, @QueryParam("projectOrFilterId") String queryString, @QueryParam("daysprevious") @DefaultValue("30") String days, @QueryParam("endDate") String endDate, @QueryParam("periodName") @DefaultValue("daily") String periodName, @QueryParam("versionLabel") @DefaultValue("major") String versionLabel, @QueryParam("isCumulative") @DefaultValue("true") boolean isCumulative, @QueryParam("showUnresolvedTrend") @DefaultValue("false") boolean showUnresolvedTrend, @QueryParam("returnData") @DefaultValue("false") boolean returnData, @QueryParam("width") @DefaultValue("450") int width, @QueryParam("height") @DefaultValue("300") int height, @QueryParam("inline") @DefaultValue("false") boolean inline) Generate a create Versus Resolved Chart and returns a simple bean containing all relievent information- Parameters:
request- The current HTTPRequest. Needed for url generationqueryString- a filter id (starts with "filter-") or project id (starts with "project-")or jql (starts with "jql-")days- The number of days previous to go back for. Must be positive.periodName- The name of the period. See -ChartFactory.PeriodNameversionLabel- The name of teh versions to show. See -ChartFactory.VersionLabelisCumulative- Whether or not the values are added to the previous value.showUnresolvedTrend- Show sub-chart underneath showing trend of unresolved issuesreturnData- Whether or not to have data returnedwidth- the width of the chart in pixels (defaults to 400px)height- the height of the chart in pixels (defaults to 250px)- Returns:
- a
CreatedVsResolvedResource.CreatedVsResolvedChartif all params validated else a Collection ofValidationError
-
validateChart
@GET @Path("/validate") public jakarta.ws.rs.core.Response validateChart(@QueryParam("projectOrFilterId") String queryString, @QueryParam("daysprevious") @DefaultValue("30") String days, @QueryParam("periodName") @DefaultValue("daily") String periodName, @QueryParam("versionLabel") @DefaultValue("major") String versionLabel) Ensures all parameters are valid for the Created Versus Resolved Chart- Parameters:
queryString- a filter id (starts with "filter-") or project id (starts with "project-").days- The number of days previous to go back for. Must be positive.periodName- The name of the period. See -ChartFactory.PeriodNameversionLabel- The name of teh versions to show. See -ChartFactory.VersionLabel- Returns:
- a Collection of
ValidationError. Or empty list if no errors.
-