1 package com.atlassian.plugin.manager;
2
3 /**
4 * A wrapper object that the user implements to store the persisted state of plugins.
5 *
6 * @since 2.2.0
7 */
8 public interface PluginPersistentStateStore
9 {
10 /**
11 * Put the current global state of plugin activation/deactivation into permanent
12 * storage. The map passed in should have keys of the form "plugin" or
13 * "plugin:module", and Boolean values representing whether the plugin or
14 * module is enabled (true if it's enabled).
15 * <p/>
16 * <p>Callers should only pass in values for those plugins or modules that are
17 * <i>not</i> in their default state.
18 *
19 * @param state the map of plugin and module activation states
20 */
21 void save(PluginPersistentState state);
22
23 /**
24 * Get the saved activation state of loaded plugins or modules. The map
25 * will be identical to the one described in savePluginState.
26 *
27 * @return the configured activation/deactivation state for plugins in this Confluence
28 * instance.
29 */
30 PluginPersistentState load();
31 }
32