Package com.atlassian.crowd.plugin
Class CrowdPluginManager
java.lang.Object
com.atlassian.plugin.manager.DefaultPluginManager
com.atlassian.crowd.plugin.CrowdPluginManager
- All Implemented Interfaces:
ClusterAwarePluginController
,com.atlassian.plugin.PluginAccessor
,com.atlassian.plugin.PluginController
,com.atlassian.plugin.PluginSystemLifecycle
,com.atlassian.plugin.SplitStartupPluginSystemLifecycle
,org.springframework.beans.factory.DisposableBean
public class CrowdPluginManager
extends com.atlassian.plugin.manager.DefaultPluginManager
implements ClusterAwarePluginController, com.atlassian.plugin.PluginAccessor, org.springframework.beans.factory.DisposableBean
-
Nested Class Summary
Nested classes/interfaces inherited from class com.atlassian.plugin.manager.DefaultPluginManager
com.atlassian.plugin.manager.DefaultPluginManager.Builder<T extends com.atlassian.plugin.manager.DefaultPluginManager.Builder<?>>
Nested classes/interfaces inherited from interface com.atlassian.plugin.PluginAccessor
com.atlassian.plugin.PluginAccessor.Descriptor
-
Constructor Summary
ConstructorsConstructorDescriptionCrowdPluginManager
(com.atlassian.plugin.manager.PluginPersistentStateStore pluginStateStore, List pluginLoaders, com.atlassian.plugin.ModuleDescriptorFactory moduleDescriptorFactory, com.atlassian.plugin.event.PluginEventManager pluginEventManager, PluginDirectoryLocator pluginDirectoryLocator, com.atlassian.event.api.EventPublisher eventPublisher, PluginChangeMessageSender pluginChangeMessageSender) If you pass a String in the list of pluginLoaders, it will automagically be converted into a SinglePluginLoader for a file with that string's name. -
Method Summary
Modifier and TypeMethodDescriptionvoid
destroy()
void
disablePlugin
(String key) void
Equivalent ofPluginController.disablePlugin(String)
, but will only affect the current node.void
disablePluginModule
(String completeKey) void
disablePluginModuleLocalOnly
(String completeKey) Equivalent ofPluginController.disablePluginModule(String)
, but will only affect the current node.void
enablePluginModule
(String completeKey) void
enablePluginModuleLocalOnly
(String completeKey) Equivalent ofPluginController.enablePluginModule(String)
, but will only affect the current node.void
enablePlugins
(String... keys) void
enablePluginsLocalOnly
(String... keys) Equivalent ofPluginController.enablePlugins(String...)
, but will only affect the current node.void
init()
installPlugins
(com.atlassian.plugin.PluginArtifact... pluginArtifacts) installPluginsLocalOnly
(com.atlassian.plugin.PluginArtifact... pluginArtifacts) Equivalent ofPluginController.installPlugins(PluginArtifact...)
, but will only affect the current node.void
onApplicationStartedEvent
(com.atlassian.config.lifecycle.events.ApplicationStartedEvent event) Initialised the plugin system on receipt of aApplicationStartedEvent
void
onPluginUpgradedEvent
(com.atlassian.plugin.event.events.PluginUpgradedEvent upgradedEvent) void
uninstall
(com.atlassian.plugin.Plugin plugin) void
uninstallLocalOnly
(com.atlassian.plugin.Plugin plugin) Equivalent ofPluginController.uninstall(Plugin)
, but will only affect the current node.Methods inherited from class com.atlassian.plugin.manager.DefaultPluginManager
addDynamicModule, addPlugins, disablePluginInternal, disablePluginWithoutPersisting, earlyStartup, getClassLoader, getDynamicModules, getDynamicPluginClass, getDynamicResourceAsStream, getEnabledModuleDescriptorsByClass, getEnabledModulesByClass, getEnabledPlugin, getEnabledPluginModule, getEnabledPlugins, getLateStartupEnableRetryProperty, getMinimumPluginVersionsFileProperty, getModuleDescriptors, getModules, getPlugin, getPluginModule, getPluginRestartState, getPlugins, getPlugins, getStartupOverrideFileProperty, getState, isPluginEnabled, isPluginModuleEnabled, isSystemPlugin, lateStartup, newBuilder, notifyModuleDisabled, notifyModuleEnabled, notifyUninstallPlugin, onPluginContainerUnavailable, onPluginModuleAvailable, onPluginModuleUnavailable, onPluginRefresh, onUpdateRequiresRestartState, removeDynamicModule, removeStateFromStore, revertRestartRequiredChange, scanForNewPlugins, setPluginInstaller, shutdown, uninstallNoEvent, uninstallPlugins, unloadPlugin, updatePlugin, warmRestart
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface com.atlassian.plugin.PluginAccessor
getActiveModuleDescriptorsByClass, getClassLoader, getDynamicModules, getDynamicResourceAsStream, getEnabledModuleDescriptorsByClass, getEnabledModulesByClass, getEnabledPlugin, getEnabledPluginModule, getEnabledPlugins, getModuleDescriptors, getModuleDescriptors, getModules, getModules, getPlugin, getPluginModule, getPluginRestartState, getPlugins, getPlugins, getPlugins, isPluginEnabled, isPluginModuleEnabled, isSystemPlugin
Methods inherited from interface com.atlassian.plugin.PluginController
addDynamicModule, disablePluginWithoutPersisting, removeDynamicModule, revertRestartRequiredChange, scanForNewPlugins, uninstallPlugins
-
Constructor Details
-
CrowdPluginManager
public CrowdPluginManager(com.atlassian.plugin.manager.PluginPersistentStateStore pluginStateStore, List pluginLoaders, com.atlassian.plugin.ModuleDescriptorFactory moduleDescriptorFactory, com.atlassian.plugin.event.PluginEventManager pluginEventManager, PluginDirectoryLocator pluginDirectoryLocator, com.atlassian.event.api.EventPublisher eventPublisher, PluginChangeMessageSender pluginChangeMessageSender) If you pass a String in the list of pluginLoaders, it will automagically be converted into a SinglePluginLoader for a file with that string's name.
-
-
Method Details
-
init
public void init() throws com.atlassian.plugin.PluginParseException- Specified by:
init
in interfacecom.atlassian.plugin.PluginSystemLifecycle
- Overrides:
init
in classcom.atlassian.plugin.manager.DefaultPluginManager
- Throws:
com.atlassian.plugin.PluginParseException
-
onApplicationStartedEvent
@EventListener public void onApplicationStartedEvent(com.atlassian.config.lifecycle.events.ApplicationStartedEvent event) Initialised the plugin system on receipt of aApplicationStartedEvent
-
destroy
- Specified by:
destroy
in interfaceorg.springframework.beans.factory.DisposableBean
- Throws:
Exception
-
installPlugins
public Set<String> installPlugins(com.atlassian.plugin.PluginArtifact... pluginArtifacts) throws com.atlassian.plugin.PluginParseException - Specified by:
installPlugins
in interfacecom.atlassian.plugin.PluginController
- Overrides:
installPlugins
in classcom.atlassian.plugin.manager.DefaultPluginManager
- Throws:
com.atlassian.plugin.PluginParseException
-
installPluginsLocalOnly
public Set<String> installPluginsLocalOnly(com.atlassian.plugin.PluginArtifact... pluginArtifacts) throws com.atlassian.plugin.PluginParseException Description copied from interface:ClusterAwarePluginController
Equivalent ofPluginController.installPlugins(PluginArtifact...)
, but will only affect the current node.- Specified by:
installPluginsLocalOnly
in interfaceClusterAwarePluginController
- Throws:
com.atlassian.plugin.PluginParseException
-
uninstall
public void uninstall(com.atlassian.plugin.Plugin plugin) throws com.atlassian.plugin.PluginException - Specified by:
uninstall
in interfacecom.atlassian.plugin.PluginController
- Overrides:
uninstall
in classcom.atlassian.plugin.manager.DefaultPluginManager
- Throws:
com.atlassian.plugin.PluginException
-
uninstallLocalOnly
public void uninstallLocalOnly(com.atlassian.plugin.Plugin plugin) throws com.atlassian.plugin.PluginException Description copied from interface:ClusterAwarePluginController
Equivalent ofPluginController.uninstall(Plugin)
, but will only affect the current node.- Specified by:
uninstallLocalOnly
in interfaceClusterAwarePluginController
- Throws:
com.atlassian.plugin.PluginException
-
enablePlugins
- Specified by:
enablePlugins
in interfacecom.atlassian.plugin.PluginController
- Overrides:
enablePlugins
in classcom.atlassian.plugin.manager.DefaultPluginManager
-
enablePluginsLocalOnly
Description copied from interface:ClusterAwarePluginController
Equivalent ofPluginController.enablePlugins(String...)
, but will only affect the current node.- Specified by:
enablePluginsLocalOnly
in interfaceClusterAwarePluginController
-
disablePlugin
- Specified by:
disablePlugin
in interfacecom.atlassian.plugin.PluginController
- Overrides:
disablePlugin
in classcom.atlassian.plugin.manager.DefaultPluginManager
-
disablePluginLocalOnly
Description copied from interface:ClusterAwarePluginController
Equivalent ofPluginController.disablePlugin(String)
, but will only affect the current node.- Specified by:
disablePluginLocalOnly
in interfaceClusterAwarePluginController
-
enablePluginModule
- Specified by:
enablePluginModule
in interfacecom.atlassian.plugin.PluginController
- Overrides:
enablePluginModule
in classcom.atlassian.plugin.manager.DefaultPluginManager
-
enablePluginModuleLocalOnly
Description copied from interface:ClusterAwarePluginController
Equivalent ofPluginController.enablePluginModule(String)
, but will only affect the current node.- Specified by:
enablePluginModuleLocalOnly
in interfaceClusterAwarePluginController
-
disablePluginModule
- Specified by:
disablePluginModule
in interfacecom.atlassian.plugin.PluginController
- Overrides:
disablePluginModule
in classcom.atlassian.plugin.manager.DefaultPluginManager
-
disablePluginModuleLocalOnly
Description copied from interface:ClusterAwarePluginController
Equivalent ofPluginController.disablePluginModule(String)
, but will only affect the current node.- Specified by:
disablePluginModuleLocalOnly
in interfaceClusterAwarePluginController
-
onPluginUpgradedEvent
public void onPluginUpgradedEvent(com.atlassian.plugin.event.events.PluginUpgradedEvent upgradedEvent)
-