com.atlassian.plugin.manager
Interface PluginPersistentState

All Known Implementing Classes:
DefaultPluginPersistentState

public interface PluginPersistentState

Interface that represents a configuration state for plugins and plugin modules. The configuration state (enabled or disabled) is separate from the plugins and modules themselves because a plugin may have multiple states depending on the context.

Since:
2.2.0
Author:
anatoli

Method Summary
 java.util.Map<java.lang.String,java.lang.Boolean> getMap()
          Get the map of all states.
 PluginRestartState getPluginRestartState(java.lang.String pluginKey)
          Gets whether the plugin is expected to be upgraded, installed, or removed on next restart
 java.util.Map<java.lang.String,java.lang.Boolean> getPluginStateMap(Plugin plugin)
          Get state map of the given plugin and its modules
 boolean isEnabled(ModuleDescriptor<?> pluginModule)
          Whether or not a given plugin module is enabled in this state, calculated from it's current state AND default state.
 boolean isEnabled(Plugin plugin)
          Whether or not a plugin is enabled, calculated from it's current state AND default state.
 

Method Detail

getMap

java.util.Map<java.lang.String,java.lang.Boolean> getMap()
Get the map of all states.

Returns:
The map that maps plugins and modules' keys to a state (Boolean.True/Boolean.False). State stored in this map represents only the differences between the current state and the default state configured in the plugin(module).

isEnabled

boolean isEnabled(Plugin plugin)
Whether or not a plugin is enabled, calculated from it's current state AND default state.


isEnabled

boolean isEnabled(ModuleDescriptor<?> pluginModule)
Whether or not a given plugin module is enabled in this state, calculated from it's current state AND default state.


getPluginStateMap

java.util.Map<java.lang.String,java.lang.Boolean> getPluginStateMap(Plugin plugin)
Get state map of the given plugin and its modules

Parameters:
plugin -
Returns:
The map that maps the plugin and its modules' keys to plugin state (Boolean.TRUE/Boolean.FALSE). State stored in this map represents only the differences between the current state and the default state configured in the plugin(module).

getPluginRestartState

PluginRestartState getPluginRestartState(java.lang.String pluginKey)
Gets whether the plugin is expected to be upgraded, installed, or removed on next restart

Parameters:
pluginKey - The plugin to query
Returns:
The state of the plugin on restart


Copyright © 2009 Atlassian Pty Ltd. All Rights Reserved.