|
||||||||||
| 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.
| Constructor Summary | |
|---|---|
AddGadgetHandlerImpl(GadgetSpecUrlChecker gadgetUrlChecker,
GadgetFactory gadgetFactory,
DashboardRepository repository,
RepresentationFactory representationFactory,
com.atlassian.sal.api.message.I18nResolver i18n,
com.atlassian.sal.api.transaction.TransactionTemplate txTemplate)
Constructor. |
|
| Method Summary | |
|---|---|
javax.ws.rs.core.Response |
addGadget(DashboardId dashboardId,
GadgetRequestContext gadgetRequestContext,
String gadgetUrl)
Adds the specified gadget to the specified dashboard. |
javax.ws.rs.core.Response |
addGadget(DashboardId dashboardId,
GadgetRequestContext gadgetRequestContext,
String gadgetUrl,
DashboardState.ColumnIndex columnIndex)
Adds the specified gadget to the specified dashboard in the specified column. |
javax.ws.rs.core.Response |
moveGadget(DashboardId targetDashboardId,
GadgetId gadgetId,
DashboardId sourceDashboardId,
DashboardState.ColumnIndex columnIndex,
int rowIndex,
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(GadgetSpecUrlChecker gadgetUrlChecker,
GadgetFactory gadgetFactory,
DashboardRepository repository,
RepresentationFactory representationFactory,
com.atlassian.sal.api.message.I18nResolver i18n,
com.atlassian.sal.api.transaction.TransactionTemplate txTemplate)
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' operation| Method Detail |
|---|
public javax.ws.rs.core.Response addGadget(DashboardId dashboardId,
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(DashboardId dashboardId,
GadgetRequestContext gadgetRequestContext,
String gadgetUrl,
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(DashboardId targetDashboardId,
GadgetId gadgetId,
DashboardId sourceDashboardId,
DashboardState.ColumnIndex columnIndex,
int rowIndex,
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 | |||||||||