public class DashboardResource extends Object
Constructor and Description |
---|
DashboardResource(DashboardPermissionService permissionService,
GadgetRequestContextFactory gadgetRequestContextFactory,
AddGadgetHandler addGadgetHandler,
ChangeLayoutHandler changeLayoutHandler,
DashboardRepository repository,
RepresentationFactory representationFactory,
com.atlassian.sal.api.message.I18nResolver i18n,
DashboardItemModuleIdFactory dashboardItemModuleIdFactory) |
Modifier and Type | Method and Description |
---|---|
javax.ws.rs.core.Response |
addGadget(DashboardId dashboardId,
DashboardItemBean dashboardItemBean,
javax.servlet.http.HttpServletRequest request)
Adds a gadget to a dashboard, returning the new gadget's entity representation
if successful.
|
javax.ws.rs.core.Response |
changeLayoutViaPOST(DashboardId dashboardId,
javax.servlet.http.HttpServletRequest request,
String entity)
Changes the existing layout of the specified dashboard in response to a POST request.
|
javax.ws.rs.core.Response |
changeLayoutViaPUT(DashboardId dashboardId,
javax.servlet.http.HttpServletRequest request,
String entity)
Changes the existing layout of the specified dashboard in response to a PUT request.
|
javax.ws.rs.core.Response |
getDashboard(DashboardId dashboardId,
javax.servlet.http.HttpServletRequest request) |
javax.ws.rs.core.Response |
getNumGadgets(DashboardId dashboardId,
javax.servlet.http.HttpServletRequest request) |
public DashboardResource(DashboardPermissionService permissionService, GadgetRequestContextFactory gadgetRequestContextFactory, AddGadgetHandler addGadgetHandler, ChangeLayoutHandler changeLayoutHandler, DashboardRepository repository, RepresentationFactory representationFactory, com.atlassian.sal.api.message.I18nResolver i18n, DashboardItemModuleIdFactory dashboardItemModuleIdFactory)
public javax.ws.rs.core.Response getDashboard(DashboardId dashboardId, @Context javax.servlet.http.HttpServletRequest request)
public javax.ws.rs.core.Response getNumGadgets(DashboardId dashboardId, @Context javax.servlet.http.HttpServletRequest request)
public javax.ws.rs.core.Response addGadget(DashboardId dashboardId, DashboardItemBean dashboardItemBean, @Context javax.servlet.http.HttpServletRequest request)
If the request body contains a gadgetId and sourceDashboardId, then this will be treated as a 'move' operation, where the gadget will be added to the dashboard specified and deleted from the sourceDashboard.
dashboardId
- the dashboard to add the gadget todashboardItemBean
- the representation of the dashboard item or gadget which is added to the dashboard.request
- the HttpServletRequest
that was routed hereResponse
with the resulting status code and
gadget URL if applicablepublic javax.ws.rs.core.Response changeLayoutViaPOST(DashboardId dashboardId, @Context javax.servlet.http.HttpServletRequest request, String entity)
dashboardId
- ID of the dashboard on which to change the layoutrequest
- the HttpServletRequest
that was routed hereentity
- the new layout dataResponse
for the client with details on the request's success or failurepublic javax.ws.rs.core.Response changeLayoutViaPUT(DashboardId dashboardId, @Context javax.servlet.http.HttpServletRequest request, String entity)
dashboardId
- ID of the dashboard on which to change the layoutrequest
- the HttpServletRequest
that was routed hereentity
- the new layout dataResponse
for the client with details on the request's success or failureCopyright © 2018 Atlassian. All rights reserved.