com.atlassian.gadgets.dashboard.internal.rest
Class UpdateGadgetUserPrefsHandlerImpl

java.lang.Object
  extended by com.atlassian.gadgets.dashboard.internal.rest.UpdateGadgetUserPrefsHandlerImpl
All Implemented Interfaces:
UpdateGadgetUserPrefsHandler

public class UpdateGadgetUserPrefsHandlerImpl
extends Object
implements UpdateGadgetUserPrefsHandler

Default implementation that updates the prefs in a live gadget.


Constructor Summary
UpdateGadgetUserPrefsHandlerImpl(DashboardRepository repository, com.atlassian.sal.api.message.I18nResolver i18n)
          Constructor.
 
Method Summary
 javax.ws.rs.core.Response updateUserPrefs(com.atlassian.gadgets.dashboard.DashboardId dashboardId, com.atlassian.gadgets.GadgetRequestContext gadgetRequestContext, com.atlassian.gadgets.GadgetId gadgetId, Map<String,String> prefs)
          Changes the user prefs on the specified gadget and dashboard to the values supplied by the query.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

UpdateGadgetUserPrefsHandlerImpl

public UpdateGadgetUserPrefsHandlerImpl(DashboardRepository repository,
                                        com.atlassian.sal.api.message.I18nResolver i18n)
Constructor.

Parameters:
repository - the DashboardRepository for getting/saving dashboards
i18n - the I18nResolver to use for looking up i18n messages
Method Detail

updateUserPrefs

public javax.ws.rs.core.Response updateUserPrefs(com.atlassian.gadgets.dashboard.DashboardId dashboardId,
                                                 com.atlassian.gadgets.GadgetRequestContext gadgetRequestContext,
                                                 com.atlassian.gadgets.GadgetId gadgetId,
                                                 Map<String,String> prefs)
Description copied from interface: UpdateGadgetUserPrefsHandler
Changes the user prefs on the specified gadget and dashboard to the values supplied by the query.

Specified by:
updateUserPrefs in interface UpdateGadgetUserPrefsHandler
Parameters:
dashboardId - the ID of the dashboard hosting the gadget
gadgetRequestContext - the context of this request
gadgetId - the gadget to change the prefs for
prefs - the user prefs with their updated values
Returns:
a Response for the client with details on the success or failure


Copyright © 2011 Atlassian. All Rights Reserved.