com.atlassian.confluence.plugin
Class ConfluencePluginManager
java.lang.Object
com.atlassian.plugin.manager.DefaultPluginManager
com.atlassian.confluence.plugin.ConfluencePluginManager
- All Implemented Interfaces:
- PluginAccessor, PluginController, PluginManager, PluginSystemLifecycle, EventListener, org.springframework.context.ApplicationContextAware, org.springframework.context.ApplicationListener
- Direct Known Subclasses:
- SetupPluginManager
public class ConfluencePluginManager
- extends DefaultPluginManager
- implements org.springframework.context.ApplicationListener, org.springframework.context.ApplicationContextAware, PluginManager
Extension of DefaultPluginManager
which listens for plugin events fired on other nodes.
Methods inherited from class com.atlassian.plugin.manager.DefaultPluginManager |
addPlugin, addPlugins, disablePlugin, disablePluginInternal, disablePluginModule, disablePluginModuleState, disablePluginState, disablePluginWithoutPersisting, enablePlugin, enablePluginModule, enablePluginModuleState, enablePlugins, enablePluginState, getClassLoader, getDynamicPluginClass, getDynamicResourceAsStream, getEnabledModuleDescriptorsByClass, getEnabledModuleDescriptorsByClass, getEnabledModuleDescriptorsByType, getEnabledModulesByClass, getEnabledModulesByClassAndDescriptor, getEnabledModulesByClassAndDescriptor, getEnabledPlugin, getEnabledPluginModule, getEnabledPlugins, getModuleDescriptors, getModules, getPlugin, getPluginModule, getPluginResourceAsStream, getPluginRestartState, getPlugins, getPlugins, getStore, installPlugin, installPlugins, isPluginEnabled, isPluginModuleEnabled, isSystemPlugin, onPluginContainerUnavailable, onPluginModuleAvailable, onPluginModuleUnavailable, onPluginRefresh, removeStateFromStore, revertRestartRequiredChange, scanForNewPlugins, setDescriptorParserFactory, setPluginInstaller, shutdown, uninstall, uninstallNoEvent, unloadPlugin, 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.PluginController |
disablePlugin, disablePluginModule, disablePluginWithoutPersisting, enablePlugin, enablePluginModule, enablePlugins, installPlugin, installPlugins, revertRestartRequiredChange, scanForNewPlugins, uninstall |
Methods inherited from interface com.atlassian.plugin.PluginAccessor |
getClassLoader, getDynamicPluginClass, getDynamicResourceAsStream, getEnabledModuleDescriptorsByClass, getEnabledModuleDescriptorsByClass, getEnabledModuleDescriptorsByType, getEnabledModulesByClass, getEnabledModulesByClassAndDescriptor, getEnabledModulesByClassAndDescriptor, getEnabledPlugin, getEnabledPluginModule, getEnabledPlugins, getModuleDescriptors, getModules, getPlugin, getPluginModule, getPluginResourceAsStream, getPluginRestartState, getPlugins, getPlugins, isPluginEnabled, isPluginModuleEnabled, isSystemPlugin |
ConfluencePluginManager
public ConfluencePluginManager(PluginPersistentStateStore pluginStateStore,
List<Object> pluginLoaders,
ModuleDescriptorFactory moduleDescriptorFactory,
PluginEventManager pluginEventManager,
EventPublisher eventPublisher,
PluginInstaller pluginInstaller)
- 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.
- Parameters:
pluginStateStore
- the storage for the plugin statepluginLoaders
- a list of plugin loaders to usemoduleDescriptorFactory
- a factory used to create the module descriptorspluginEventManager
- the event manager used for pluginseventPublisher
- the system event publisherpluginInstaller
- used to persist user-installed plugins
getLocalPluginStateStore
protected MemoryPluginPersistentStateStore getLocalPluginStateStore()
- Returns:
- a writable memory implementation for storing local plugin state independent of
other nodes in the cluster.
getState
protected PluginPersistentState getState()
- Overrides:
getState
in class DefaultPluginManager
notifyPluginEnabled
protected void notifyPluginEnabled(Plugin plugin)
- Overrides:
notifyPluginEnabled
in class DefaultPluginManager
notifyModuleDisabled
protected void notifyModuleDisabled(ModuleDescriptor<?> module)
- Overrides:
notifyModuleDisabled
in class DefaultPluginManager
notifyPluginDisabled
protected void notifyPluginDisabled(Plugin plugin)
- Overrides:
notifyPluginDisabled
in class DefaultPluginManager
notifyModuleEnabled
protected void notifyModuleEnabled(ModuleDescriptor<?> module)
- Overrides:
notifyModuleEnabled
in class DefaultPluginManager
notifyUninstallPlugin
protected void notifyUninstallPlugin(Plugin plugin)
- Overrides:
notifyUninstallPlugin
in class DefaultPluginManager
onUpdateRequiresRestartState
protected void onUpdateRequiresRestartState(String pluginKey,
PluginRestartState pluginRestartState)
- Overrides:
onUpdateRequiresRestartState
in class DefaultPluginManager
updatePlugin
protected void updatePlugin(Plugin oldPlugin,
Plugin newPlugin)
throws PluginException
- Overrides:
updatePlugin
in class DefaultPluginManager
- Throws:
PluginException
init
public void init()
throws PluginParseException
-
- Specified by:
init
in interface PluginSystemLifecycle
- Overrides:
init
in class DefaultPluginManager
- Throws:
PluginParseException
isSetupPluginManager
protected boolean isSetupPluginManager()
- Overridden in
SetupPluginManager
to return true
.
onApplicationEvent
public final void onApplicationEvent(org.springframework.context.ApplicationEvent event)
- Initialised the plugin system on receipt of a
DatabaseConfiguredEvent
and update local plugin state
on clustered plugin events
- Specified by:
onApplicationEvent
in interface org.springframework.context.ApplicationListener
- Parameters:
event
- the event being notified
setApplicationContext
public void setApplicationContext(org.springframework.context.ApplicationContext applicationContext)
throws org.springframework.beans.BeansException
- Specified by:
setApplicationContext
in interface org.springframework.context.ApplicationContextAware
- Throws:
org.springframework.beans.BeansException