public class

ChartPopupResource

extends Object
java.lang.Object
   ↳ com.atlassian.jira.chartpopup.ChartPopupResource

Class Overview

REST endpoint to retrieve the URL to display a legacy portlet.

Summary

Public Constructors
ChartPopupResource(JiraAuthenticationContext authenticationContext, GadgetViewFactory gadgetViewFactory, VelocityRequestContextFactory velocityRequestContextFactory, PortalPageService portalPageService, SearchRequestService searchRequestService, SearchService searchService, DashboardService dashboardService, GadgetStateFactory gadgetStateFactory, UserUtil userUtil, GadgetRequestContextFactory gadgetRequestContextFactory, SessionSearchObjectManagerFactory sessionSearchObjectManagerFactory, VelocityTemplatingEngine templatingEngine)
Public Methods
Response addGadgetToDashboard(Gadget gadget)
Saves the gadget specified as a parameter to a particular dashboard.
Response getChartContents(Long gadgetId, String gadgetUri, Long filterId, String jql, HttpServletRequest request)
Renders the contents for a particular chart needed to display this chart in the issue navigator 'Charts' popup.
Response getGadgetToDashboardForm(Long filterId, String jql)
Returns the save to dashboard form.
[Expand]
Inherited Methods
From class java.lang.Object

Public Constructors

public ChartPopupResource (JiraAuthenticationContext authenticationContext, GadgetViewFactory gadgetViewFactory, VelocityRequestContextFactory velocityRequestContextFactory, PortalPageService portalPageService, SearchRequestService searchRequestService, SearchService searchService, DashboardService dashboardService, GadgetStateFactory gadgetStateFactory, UserUtil userUtil, GadgetRequestContextFactory gadgetRequestContextFactory, SessionSearchObjectManagerFactory sessionSearchObjectManagerFactory, VelocityTemplatingEngine templatingEngine)

Public Methods

public 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

public Response getChartContents (Long gadgetId, String gadgetUri, Long filterId, String jql, 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 filter
jql The query entered by the user. May be null if the user was using a saved filter
request The httpServletRequest
Returns
  • html with the chart gadget iframe as well as the save gadget to dashboard form

public Response getGadgetToDashboardForm (Long filterId, String jql)

Returns the save to dashboard form.

Parameters
filterId FilterId that was used to run the query
jql JQL that was used to run the query
Returns
  • A blob of HTML that is the save chart to dashboard form.