View Javadoc
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       * Put the current global state of plugin activation/deactivation into permanent
11       * storage. The map passed in should have keys of the form "plugin" or
12       * "plugin:module", and Boolean values representing whether the plugin or
13       * module is enabled (true if it's enabled).
14       * <p/>
15       * <p>Callers should only pass in values for those plugins or modules that are
16       * <i>not</i> in their default state.
17       *
18       * @param state the map of plugin and module activation states
19       */
20      void save(PluginPersistentState state);
21  
22      /**
23       * Get the saved activation state of loaded plugins or modules. The map
24       * will be identical to the one described in savePluginState.
25       *
26       * @return the configured activation/deactivation state for plugins in this Confluence
27       * instance.
28       */
29      PluginPersistentState load();
30  }
31