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 TypeMethodDescriptionvoiddestroy()voiddisablePlugin(String key) voidEquivalent ofPluginController.disablePlugin(String), but will only affect the current node.voiddisablePluginModule(String completeKey) voiddisablePluginModuleLocalOnly(String completeKey) Equivalent ofPluginController.disablePluginModule(String), but will only affect the current node.voidenablePluginModule(String completeKey) voidenablePluginModuleLocalOnly(String completeKey) Equivalent ofPluginController.enablePluginModule(String), but will only affect the current node.voidenablePlugins(String... keys) voidenablePluginsLocalOnly(String... keys) Equivalent ofPluginController.enablePlugins(String...), but will only affect the current node.voidinit()installPlugins(com.atlassian.plugin.PluginArtifact... pluginArtifacts) installPluginsLocalOnly(com.atlassian.plugin.PluginArtifact... pluginArtifacts) Equivalent ofPluginController.installPlugins(PluginArtifact...), but will only affect the current node.voidonApplicationStartedEvent(com.atlassian.config.lifecycle.events.ApplicationStartedEvent event) Initialised the plugin system on receipt of aApplicationStartedEventvoidonPluginUpgradedEvent(com.atlassian.plugin.event.events.PluginUpgradedEvent upgradedEvent) voiduninstall(com.atlassian.plugin.Plugin plugin) voiduninstallLocalOnly(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, warmRestartMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods 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, isSystemPluginMethods 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:
initin interfacecom.atlassian.plugin.PluginSystemLifecycle- Overrides:
initin 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:
destroyin interfaceorg.springframework.beans.factory.DisposableBean- Throws:
Exception
-
installPlugins
public Set<String> installPlugins(com.atlassian.plugin.PluginArtifact... pluginArtifacts) throws com.atlassian.plugin.PluginParseException - Specified by:
installPluginsin interfacecom.atlassian.plugin.PluginController- Overrides:
installPluginsin 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:ClusterAwarePluginControllerEquivalent ofPluginController.installPlugins(PluginArtifact...), but will only affect the current node.- Specified by:
installPluginsLocalOnlyin interfaceClusterAwarePluginController- Throws:
com.atlassian.plugin.PluginParseException
-
uninstall
public void uninstall(com.atlassian.plugin.Plugin plugin) throws com.atlassian.plugin.PluginException - Specified by:
uninstallin interfacecom.atlassian.plugin.PluginController- Overrides:
uninstallin 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:ClusterAwarePluginControllerEquivalent ofPluginController.uninstall(Plugin), but will only affect the current node.- Specified by:
uninstallLocalOnlyin interfaceClusterAwarePluginController- Throws:
com.atlassian.plugin.PluginException
-
enablePlugins
- Specified by:
enablePluginsin interfacecom.atlassian.plugin.PluginController- Overrides:
enablePluginsin classcom.atlassian.plugin.manager.DefaultPluginManager
-
enablePluginsLocalOnly
Description copied from interface:ClusterAwarePluginControllerEquivalent ofPluginController.enablePlugins(String...), but will only affect the current node.- Specified by:
enablePluginsLocalOnlyin interfaceClusterAwarePluginController
-
disablePlugin
- Specified by:
disablePluginin interfacecom.atlassian.plugin.PluginController- Overrides:
disablePluginin classcom.atlassian.plugin.manager.DefaultPluginManager
-
disablePluginLocalOnly
Description copied from interface:ClusterAwarePluginControllerEquivalent ofPluginController.disablePlugin(String), but will only affect the current node.- Specified by:
disablePluginLocalOnlyin interfaceClusterAwarePluginController
-
enablePluginModule
- Specified by:
enablePluginModulein interfacecom.atlassian.plugin.PluginController- Overrides:
enablePluginModulein classcom.atlassian.plugin.manager.DefaultPluginManager
-
enablePluginModuleLocalOnly
Description copied from interface:ClusterAwarePluginControllerEquivalent ofPluginController.enablePluginModule(String), but will only affect the current node.- Specified by:
enablePluginModuleLocalOnlyin interfaceClusterAwarePluginController
-
disablePluginModule
- Specified by:
disablePluginModulein interfacecom.atlassian.plugin.PluginController- Overrides:
disablePluginModulein classcom.atlassian.plugin.manager.DefaultPluginManager
-
disablePluginModuleLocalOnly
Description copied from interface:ClusterAwarePluginControllerEquivalent ofPluginController.disablePluginModule(String), but will only affect the current node.- Specified by:
disablePluginModuleLocalOnlyin interfaceClusterAwarePluginController
-
onPluginUpgradedEvent
public void onPluginUpgradedEvent(com.atlassian.plugin.event.events.PluginUpgradedEvent upgradedEvent)
-