@Component(value="dashboardStateStore") public class PluginSettingsDashboardStateStore extends Object implements DashboardStateStore
Constructor and Description |
---|
PluginSettingsDashboardStateStore(com.atlassian.sal.api.pluginsettings.PluginSettingsFactory pluginSettingsFactory) |
Modifier and Type | Method and Description |
---|---|
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 state,
Iterable<DashboardChange> changes)
Update the stored
DashboardState in the persistent data store, using the changes passed in. |
public PluginSettingsDashboardStateStore(com.atlassian.sal.api.pluginsettings.PluginSettingsFactory pluginSettingsFactory)
public DashboardState retrieve(@Nonnull DashboardId dashboardId)
DashboardStateStore
DashboardState
with the DashboardId
from the data store.retrieve
in interface DashboardStateStore
dashboardId
- unique identifier of the DashboardState
object to retrieveDashboardState
object corresponding to the DashboardId
public DashboardState findDashboardWithGadget(@Nonnull GadgetId gadgetId) throws DashboardNotFoundException
DashboardStateStore
DashboardState
for the dashboard containing the gadget whose identifier is gadgetID
findDashboardWithGadget
in interface DashboardStateStore
gadgetId
- the identifier of the gadgetDashboardState
object for the dashboard containing the gadgetDashboardNotFoundException
- thrown if there is a problem retrieving the DashboardState
from the persistent store@Nonnull public DashboardState update(@Nonnull DashboardState state, @Nonnull Iterable<DashboardChange> changes) throws DashboardStateStoreException
DashboardStateStore
DashboardState
in the persistent data store, using the changes
passed in.update
in interface DashboardStateStore
state
- the DashboardState
to update in the persistent data storechanges
- the changes to the dashboard that should be appliedDashboardState
so that it can be verified that the state we tried to store
is the actual state that is in the storeDashboardStateStoreException
- thrown if there is a problem when updating the DashboardState
in
the persistent data storepublic void remove(@Nonnull DashboardId dashboardId)
DashboardStateStore
DashboardState
identified by the DashboardId
from the persistent data store.remove
in interface DashboardStateStore
dashboardId
- unique identifier of the DashboardState
to be removed from the persistent data storeCopyright © 2018 Atlassian. All rights reserved.