|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.atlassian.gadgets.dashboard.internal.rest.DashboardResource
public class DashboardResource
Provides REST endpoints for using the dashboard.
Constructor Summary | |
---|---|
DashboardResource(DashboardPermissionService permissionService,
GadgetRequestContextFactory gadgetRequestContextFactory,
AddGadgetHandler addGadgetHandler,
ChangeLayoutHandler changeLayoutHandler,
DashboardRepository repository,
RepresentationFactory representationFactory,
com.atlassian.sal.api.message.I18nResolver i18n)
Constructor. |
Method Summary | |
---|---|
javax.ws.rs.core.Response |
addGadget(DashboardId dashboardId,
javax.servlet.http.HttpServletRequest request,
Reader jsonContent)
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)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public DashboardResource(DashboardPermissionService permissionService, GadgetRequestContextFactory gadgetRequestContextFactory, AddGadgetHandler addGadgetHandler, ChangeLayoutHandler changeLayoutHandler, DashboardRepository repository, RepresentationFactory representationFactory, com.atlassian.sal.api.message.I18nResolver i18n)
permissionService
- the PermissionService
implementation to usegadgetRequestContextFactory
- the GadgetRequestContextFactory
to useaddGadgetHandler
- the AddGadgetHandler
to usechangeLayoutHandler
- the ChangeLayoutHandler
to userepository
- the Repository
to userepresentationFactory
- the RepresentationFactory
to use to construct JAXB repsi18n
- the I18nResolver
from SALMethod Detail |
---|
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, @Context javax.servlet.http.HttpServletRequest request, Reader jsonContent)
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 torequest
- the HttpServletRequest
that was routed herejsonContent
- the body of the post in JSON
Response
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 data
Response
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 data
Response
for the client with details on the request's success or failure
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |