|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.atlassian.gadgets.dashboard.internal.rest.AddGadgetHandlerImpl
public class AddGadgetHandlerImpl
Default implementation that adds a gadget to a live dashboard.
| Nested Class Summary | |
|---|---|
static class |
AddGadgetHandlerImpl.GadgetAddedEvent
|
| Constructor Summary | |
|---|---|
AddGadgetHandlerImpl(com.atlassian.gadgets.GadgetSpecUrlChecker gadgetUrlChecker,
GadgetFactory gadgetFactory,
DashboardRepository repository,
RepresentationFactory representationFactory,
com.atlassian.sal.api.message.I18nResolver i18n,
com.atlassian.sal.api.transaction.TransactionTemplate txTemplate,
com.atlassian.event.api.EventPublisher eventPublisher)
Constructor. |
|
| Method Summary | |
|---|---|
javax.ws.rs.core.Response |
addGadget(com.atlassian.gadgets.dashboard.DashboardId dashboardId,
com.atlassian.gadgets.GadgetRequestContext gadgetRequestContext,
String gadgetUrl)
Adds the specified gadget to the specified dashboard. |
javax.ws.rs.core.Response |
addGadget(com.atlassian.gadgets.dashboard.DashboardId dashboardId,
com.atlassian.gadgets.GadgetRequestContext gadgetRequestContext,
String gadgetUrl,
com.atlassian.gadgets.dashboard.DashboardState.ColumnIndex columnIndex)
Adds the specified gadget to the specified dashboard in the specified column. |
javax.ws.rs.core.Response |
moveGadget(com.atlassian.gadgets.dashboard.DashboardId targetDashboardId,
com.atlassian.gadgets.GadgetId gadgetId,
com.atlassian.gadgets.dashboard.DashboardId sourceDashboardId,
com.atlassian.gadgets.dashboard.DashboardState.ColumnIndex columnIndex,
int rowIndex,
com.atlassian.gadgets.GadgetRequestContext gadgetRequestContext)
Moves the gadget specified by id from the source dashboard to the target dashboard. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public AddGadgetHandlerImpl(com.atlassian.gadgets.GadgetSpecUrlChecker gadgetUrlChecker,
GadgetFactory gadgetFactory,
DashboardRepository repository,
RepresentationFactory representationFactory,
com.atlassian.sal.api.message.I18nResolver i18n,
com.atlassian.sal.api.transaction.TransactionTemplate txTemplate,
com.atlassian.event.api.EventPublisher eventPublisher)
gadgetUrlChecker - checks that the gadget can be added to a dashboardgadgetFactory - used to create the gadget domain objectrepository - persists dashboard changesrepresentationFactory - Factory used to create the JAXB representation of a gadgeti18n - the SAL I18nResolver to usetxTemplate - transaction template needed for the 'move' operationeventPublisher - | Method Detail |
|---|
public javax.ws.rs.core.Response addGadget(com.atlassian.gadgets.dashboard.DashboardId dashboardId,
com.atlassian.gadgets.GadgetRequestContext gadgetRequestContext,
String gadgetUrl)
AddGadgetHandler
addGadget in interface AddGadgetHandlerdashboardId - the ID of the dashboard to add togadgetRequestContext - the context of this requestgadgetUrl - the URL to the gadget spec
Response for the client with details on the success
or failure
public javax.ws.rs.core.Response addGadget(com.atlassian.gadgets.dashboard.DashboardId dashboardId,
com.atlassian.gadgets.GadgetRequestContext gadgetRequestContext,
String gadgetUrl,
com.atlassian.gadgets.dashboard.DashboardState.ColumnIndex columnIndex)
AddGadgetHandler
addGadget in interface AddGadgetHandlerdashboardId - the ID of the dashboard to add togadgetRequestContext - the context of this requestgadgetUrl - the URL to the gadget speccolumnIndex - the column index to add the gadget to
Response for the client with details on the success
or failure
public javax.ws.rs.core.Response moveGadget(com.atlassian.gadgets.dashboard.DashboardId targetDashboardId,
com.atlassian.gadgets.GadgetId gadgetId,
com.atlassian.gadgets.dashboard.DashboardId sourceDashboardId,
com.atlassian.gadgets.dashboard.DashboardState.ColumnIndex columnIndex,
int rowIndex,
com.atlassian.gadgets.GadgetRequestContext gadgetRequestContext)
AddGadgetHandler
moveGadget in interface AddGadgetHandlertargetDashboardId - The dashboard to move the gadget togadgetId - The gadget to movesourceDashboardId - The source dashboard where the gadget will be deletedcolumnIndex - The column to add the gadget torowIndex - The row to insert the gadget ingadgetRequestContext - the context of this request
Response for the client with details on the success or failure
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||