Package com.atlassian.jira.chartpopup
Class ChartPopupResource
java.lang.Object
com.atlassian.jira.chartpopup.ChartPopupResource
REST endpoint to retrieve the URL to display a legacy portlet.
- Since:
- v4.0
-
Constructor Summary
ConstructorsConstructorDescriptionChartPopupResource(JiraAuthenticationContext authenticationContext, com.atlassian.gadgets.view.GadgetViewFactory gadgetViewFactory, VelocityRequestContextFactory velocityRequestContextFactory, PortalPageService portalPageService, SearchRequestService searchRequestService, SearchService searchService, com.atlassian.gadgets.dashboard.DashboardService dashboardService, com.atlassian.gadgets.dashboard.spi.DashboardItemStateFactory gadgetStateFactory, UserUtil userUtil, com.atlassian.gadgets.GadgetRequestContextFactory gadgetRequestContextFactory, SessionSearchObjectManagerFactory sessionSearchObjectManagerFactory, VelocityTemplatingEngine templatingEngine, SoyTemplateRendererProvider soyTemplateRendererProvider) -
Method Summary
Modifier and TypeMethodDescriptionjavax.ws.rs.core.ResponseaddGadgetToDashboard(Gadget gadget) Saves the gadget specified as a parameter to a particular dashboard.javax.ws.rs.core.ResponsegetChartContents(Long gadgetId, String gadgetUri, Long filterId, String jql, javax.servlet.http.HttpServletRequest request) Renders the contents for a particular chart needed to display this chart in the issue navigator 'Charts' popup.javax.ws.rs.core.ResponsegetGadgetToDashboardForm(Long filterId, String jql) Returns the save to dashboard form.
-
Constructor Details
-
ChartPopupResource
@Inject public ChartPopupResource(JiraAuthenticationContext authenticationContext, com.atlassian.gadgets.view.GadgetViewFactory gadgetViewFactory, VelocityRequestContextFactory velocityRequestContextFactory, PortalPageService portalPageService, SearchRequestService searchRequestService, SearchService searchService, com.atlassian.gadgets.dashboard.DashboardService dashboardService, com.atlassian.gadgets.dashboard.spi.DashboardItemStateFactory gadgetStateFactory, UserUtil userUtil, com.atlassian.gadgets.GadgetRequestContextFactory gadgetRequestContextFactory, SessionSearchObjectManagerFactory sessionSearchObjectManagerFactory, VelocityTemplatingEngine templatingEngine, SoyTemplateRendererProvider soyTemplateRendererProvider)
-
-
Method Details
-
getChartContents
@GET @Path("/render") public javax.ws.rs.core.Response getChartContents(@QueryParam("id") Long gadgetId, @QueryParam("gadgetUri") String gadgetUri, @QueryParam("filterId") Long filterId, @QueryParam("jql") String jql, @Context javax.servlet.http.HttpServletRequest request) Renders the contents for a particular chart needed to display this chart in the issue navigator 'Charts' popup.- Parameters:
gadgetId- The id of the gadget being rendered. Really just a bogus identifier associated with the popup panel being displayed.gadgetUri- The gadget spec URI for the chart being displayed.filterId- The saved filter id to use for this chart. May be null if this is an anonymous filterjql- The query entered by the user. May be null if the user was using a saved filterrequest- The httpServletRequest- Returns:
- html with the chart gadget iframe as well as the save gadget to dashboard form
-
getGadgetToDashboardForm
@GET @Path("/add") public javax.ws.rs.core.Response getGadgetToDashboardForm(@QueryParam("filterId") Long filterId, @QueryParam("jql") String jql) Returns the save to dashboard form.- Parameters:
filterId- FilterId that was used to run the queryjql- JQL that was used to run the query- Returns:
- A blob of HTML that is the save chart to dashboard form.
-
addGadgetToDashboard
@POST @Path("/add") @Consumes("application/json") @Produces("application/json") public javax.ws.rs.core.Response addGadgetToDashboard(Gadget gadget) Saves the gadget specified as a parameter to a particular dashboard.- Parameters:
gadget- The gadget to add to a dashboard.- Returns:
- 200 ok response with the URL to view the dashboard or and error response otherwise
-