public interface PluginController
Modifier and Type | Method and Description |
---|---|
void |
disablePlugin(String key)
Disables the plugin with the given key.
|
void |
disablePluginModule(String completeKey)
Disable a plugin module by key.
|
void |
disablePluginWithoutPersisting(String key)
Disables the plugin with the given key without persisting the disabled state.
|
void |
enablePlugin(String key)
Deprecated.
since 2.5.0, use {#link enablePlugins(String... keys)} instead
|
void |
enablePluginModule(String completeKey)
Enable a plugin module by key.
|
void |
enablePlugins(String... keys)
Enable a set of plugins by key.
|
String |
installPlugin(PluginArtifact pluginArtifact)
Deprecated.
Since 2.3.0, use
installPlugins(PluginArtifact...) instead |
Set<String> |
installPlugins(PluginArtifact... pluginArtifacts)
Installs multiple plugins and returns the list of plugin keys.
|
void |
revertRestartRequiredChange(String pluginKey)
Restores the state of any plugin requiring a restart that had been removed, upgraded, or installed.
|
int |
scanForNewPlugins()
Search all loaders and add any new plugins you find.
|
void |
uninstall(Plugin plugin)
Uninstall the plugin, disabling it first.
|
void enablePlugin(String key)
key
- The plugin key.void enablePlugins(String... keys)
keys
- The plugin keys. Must not be null.void disablePlugin(String key)
Calling this method will persist the disabled state so that the plugin will also be disabled on next startup. This would normally be used when a user manually disables a plugin.
If you extend DefaultPluginManager and override this method, you will also need to override disablePluginWithoutPersisting(String)
.
key
- The plugin key.disablePluginWithoutPersisting(String)
void disablePluginWithoutPersisting(String key)
Calling this method will NOT persist the disabled state so that the framework will try to enable the plugin on next startup. This is used when a plugin has errors on startup.
If you extend DefaultPluginManager and override disablePlugin(String)
, you will also need to override this method.
key
- The plugin key.disablePlugin(String)
void enablePluginModule(String completeKey)
completeKey
- The "complete key" of the plugin module.void disablePluginModule(String completeKey)
completeKey
- The "complete key" of the plugin module.String installPlugin(PluginArtifact pluginArtifact) throws PluginParseException
installPlugins(PluginArtifact...)
insteadpluginArtifact
- The plugin artifact to installPluginParseException
- if the plugin is not a valid pluginSet<String> installPlugins(PluginArtifact... pluginArtifacts) throws PluginParseException
pluginArtifacts
- The list of plugin artifacts to installPluginParseException
- if any plugin is not a valid pluginvoid uninstall(Plugin plugin) throws PluginException
plugin
- The plugin.PluginException
- if there was some problem uninstalling the plugin.void revertRestartRequiredChange(String pluginKey) throws PluginException
pluginKey
- The plugin keyPluginException
- if there was some problem reverting the plugin state.IllegalArgumentException
- if the plugin key is null or cannot be resolved to a pluginint scanForNewPlugins() throws PluginParseException
PluginParseException
Copyright © 2014 Atlassian. All rights reserved.