public final class DefaultPluginPersistentState extends Object implements Serializable, PluginPersistentState
PluginPersistentState interface.
The state stored in this object represents only the differences between the desired state and the default state configured in the plugin. So if "getPluginState()" or "getPluginModuleState()" return null, then the manager should assume that the default state applies instead.
PluginPersistentState.Builder, PluginPersistentState.Util| Constructor and Description |
|---|
DefaultPluginPersistentState()
Deprecated.
create
PluginPersistentState instances using the
PluginPersistentState.Builder |
DefaultPluginPersistentState(Map<String,Boolean> map)
Deprecated.
create
PluginPersistentState instances using the
PluginPersistentState.Builder |
DefaultPluginPersistentState(PluginPersistentState state)
Deprecated.
|
| Modifier and Type | Method and Description |
|---|---|
Map<String,Boolean> |
getMap()
Get the map of all states.
|
PluginRestartState |
getPluginRestartState(String pluginKey)
Gets whether the plugin is expected to be upgraded, installed, or removed on next restart
|
Map<String,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.
|
@Deprecated public DefaultPluginPersistentState()
PluginPersistentState.@Deprecated public DefaultPluginPersistentState(Map<String,Boolean> map)
PluginPersistentState with the supplied states.map - of the plugin states using the Plugin.getKey() as the key.@Deprecated public DefaultPluginPersistentState(PluginPersistentState state)
state - public Map<String,Boolean> getMap()
PluginPersistentStategetMap in interface PluginPersistentStatepublic boolean isEnabled(Plugin plugin)
PluginPersistentStateisEnabled in interface PluginPersistentStatepublic boolean isEnabled(ModuleDescriptor<?> pluginModule)
PluginPersistentStateisEnabled in interface PluginPersistentStatepublic Map<String,Boolean> getPluginStateMap(Plugin plugin)
PluginPersistentStategetPluginStateMap in interface PluginPersistentStatepublic PluginRestartState getPluginRestartState(String pluginKey)
PluginPersistentStategetPluginRestartState in interface PluginPersistentStatepluginKey - The plugin to queryCopyright © 2014 Atlassian. All rights reserved.