com.atlassian.jira.chartpopup
Class ChartPopupResource

java.lang.Object
  extended by com.atlassian.jira.chartpopup.ChartPopupResource

public class ChartPopupResource
extends Object

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

Since:
v4.0

Constructor Summary
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.GadgetStateFactory gadgetStateFactory, UserUtil userUtil, com.atlassian.gadgets.GadgetRequestContextFactory gadgetRequestContextFactory, SessionSearchObjectManagerFactory sessionSearchObjectManagerFactory, com.atlassian.velocity.VelocityManager velocityManager, ApplicationProperties applicationProperties)
           
 
Method Summary
 javax.ws.rs.core.Response addGadgetToDashboard(Gadget gadget)
          Saves the gadget specified as a parameter to a particular dashboard.
 javax.ws.rs.core.Response getChartContents(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.Response getGadgetToDashboardForm(Long filterId, String jql)
          Returns the save to dashboard form.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ChartPopupResource

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.GadgetStateFactory gadgetStateFactory,
                          UserUtil userUtil,
                          com.atlassian.gadgets.GadgetRequestContextFactory gadgetRequestContextFactory,
                          SessionSearchObjectManagerFactory sessionSearchObjectManagerFactory,
                          com.atlassian.velocity.VelocityManager velocityManager,
                          ApplicationProperties applicationProperties)
Method Detail

getChartContents

public javax.ws.rs.core.Response getChartContents(Long gadgetId,
                                                  String gadgetUri,
                                                  Long filterId,
                                                  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 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

getGadgetToDashboardForm

public javax.ws.rs.core.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.

addGadgetToDashboard

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


Copyright © 2002-2012 Atlassian. All Rights Reserved.