|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.atlassian.plugin.PluginManagerState
public class PluginManagerState
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.
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.
Please note that this method is not threadsafe. Access to instances should be synchronised.
| Constructor Summary | |
|---|---|
PluginManagerState()
|
|
PluginManagerState(java.util.Map<java.lang.String,java.lang.Boolean> map)
|
|
| Method Summary | |
|---|---|
java.util.Map<java.lang.String,java.lang.Boolean> |
getMap()
Get the map of all states. |
java.util.Map<java.lang.String,java.lang.Boolean> |
getPluginStateMap(Plugin plugin)
|
java.lang.Boolean |
getState(java.lang.String key)
Get the state of a given plugin. |
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. |
void |
removeState(java.lang.String key)
Remove a plugin's state. |
void |
setState(java.lang.String key,
java.lang.Boolean enabled)
Set a plugins state. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public PluginManagerState()
public PluginManagerState(java.util.Map<java.lang.String,java.lang.Boolean> map)
| Method Detail |
|---|
public java.lang.Boolean getState(java.lang.String key)
public java.util.Map<java.lang.String,java.lang.Boolean> getMap()
public boolean isEnabled(Plugin plugin)
public boolean isEnabled(ModuleDescriptor pluginModule)
public void setState(java.lang.String key,
java.lang.Boolean enabled)
public void removeState(java.lang.String key)
public java.util.Map<java.lang.String,java.lang.Boolean> getPluginStateMap(Plugin plugin)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||