|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.atlassian.gadgets.dashboard.internal.rest.DashboardResource
public class DashboardResource
Provides REST endpoints for using the dashboard.
| Constructor Summary | |
|---|---|
DashboardResource(com.atlassian.gadgets.dashboard.spi.DashboardPermissionService permissionService,
com.atlassian.gadgets.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(com.atlassian.gadgets.dashboard.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(com.atlassian.gadgets.dashboard.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(com.atlassian.gadgets.dashboard.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(com.atlassian.gadgets.dashboard.DashboardId dashboardId,
javax.servlet.http.HttpServletRequest request)
|
javax.ws.rs.core.Response |
getNumGadgets(com.atlassian.gadgets.dashboard.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(com.atlassian.gadgets.dashboard.spi.DashboardPermissionService permissionService,
com.atlassian.gadgets.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 SAL| Method Detail |
|---|
public javax.ws.rs.core.Response getDashboard(com.atlassian.gadgets.dashboard.DashboardId dashboardId,
@Context
javax.servlet.http.HttpServletRequest request)
public javax.ws.rs.core.Response getNumGadgets(com.atlassian.gadgets.dashboard.DashboardId dashboardId,
@Context
javax.servlet.http.HttpServletRequest request)
public javax.ws.rs.core.Response addGadget(com.atlassian.gadgets.dashboard.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 applicable
public javax.ws.rs.core.Response changeLayoutViaPOST(com.atlassian.gadgets.dashboard.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
public javax.ws.rs.core.Response changeLayoutViaPUT(com.atlassian.gadgets.dashboard.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 | |||||||||