com.atlassian.gadgets.refimpl
Class PluginSettingsDashboardStateStore

java.lang.Object
  extended by com.atlassian.gadgets.refimpl.PluginSettingsDashboardStateStore
All Implemented Interfaces:
DashboardStateStore

public class PluginSettingsDashboardStateStore
extends Object
implements DashboardStateStore


Constructor Summary
PluginSettingsDashboardStateStore(com.atlassian.sal.api.pluginsettings.PluginSettingsFactory pluginSettingsFactory)
           
 
Method Summary
 DashboardState findDashboardWithGadget(GadgetId gadgetId)
          Retrieve the DashboardState for the dashboard containing the gadget whose identifier is gadgetID
 void remove(DashboardId dashboardId)
          Removes the DashboardState identified by the DashboardId from the persistent data store.
 DashboardState retrieve(DashboardId dashboardId)
          Retrieve the DashboardState with the DashboardId from the data store.
 DashboardState update(DashboardState dashboardState, Iterable<DashboardChange> changes)
          Update the stored DashboardState in the persistent data store, using the changes passed in.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PluginSettingsDashboardStateStore

public PluginSettingsDashboardStateStore(com.atlassian.sal.api.pluginsettings.PluginSettingsFactory pluginSettingsFactory)
Method Detail

retrieve

public DashboardState retrieve(DashboardId dashboardId)
Description copied from interface: DashboardStateStore
Retrieve the DashboardState with the DashboardId from the data store.

Specified by:
retrieve in interface DashboardStateStore
Parameters:
dashboardId - unique identifier of the DashboardState object to retrieve
Returns:
the DashboardState object corresponding to the DashboardId

findDashboardWithGadget

public DashboardState findDashboardWithGadget(GadgetId gadgetId)
                                       throws DashboardNotFoundException
Description copied from interface: DashboardStateStore
Retrieve the DashboardState for the dashboard containing the gadget whose identifier is gadgetID

Specified by:
findDashboardWithGadget in interface DashboardStateStore
Parameters:
gadgetId - the identifier of the gadget
Returns:
the DashboardState object for the dashboard containing the gadget
Throws:
DashboardNotFoundException - thrown if there is a problem retrieving the DashboardState from the persistent store

update

public DashboardState update(DashboardState dashboardState,
                             Iterable<DashboardChange> changes)
                      throws DashboardStateStoreException
Description copied from interface: DashboardStateStore
Update the stored DashboardState in the persistent data store, using the changes passed in.

Specified by:
update in interface DashboardStateStore
Parameters:
dashboardState - the DashboardState to update in the persistent data store
changes - the changes to the dashboard that should be applied
Returns:
the actual stored DashboardState so that it can be verified that the state we tried to store is the actual state that is in the store
Throws:
DashboardStateStoreException - thrown if there is a problem when updating the DashboardState in the persistent data store

remove

public void remove(DashboardId dashboardId)
Description copied from interface: DashboardStateStore
Removes the DashboardState identified by the DashboardId from the persistent data store.

Specified by:
remove in interface DashboardStateStore
Parameters:
dashboardId - unique identifier of the DashboardState to be removed from the persistent data store


Copyright © 2010 Atlassian. All Rights Reserved.