com.atlassian.confluence.plugin
Class ConfluencePluginManager

java.lang.Object
  extended by com.atlassian.plugin.manager.DefaultPluginManager
      extended by com.atlassian.confluence.plugin.ConfluencePluginManager
All Implemented Interfaces:
com.atlassian.plugin.PluginAccessor, com.atlassian.plugin.PluginController, com.atlassian.plugin.PluginManager, com.atlassian.plugin.PluginSystemLifecycle, com.atlassian.plugin.SplitStartupPluginSystemLifecycle, java.util.EventListener, org.springframework.context.ApplicationContextAware, org.springframework.context.ApplicationListener
Direct Known Subclasses:
SetupPluginManager

public class ConfluencePluginManager
extends com.atlassian.plugin.manager.DefaultPluginManager
implements org.springframework.context.ApplicationListener, org.springframework.context.ApplicationContextAware, com.atlassian.plugin.PluginManager

Extension of DefaultPluginManager which listens for plugin events fired on other nodes.


Nested Class Summary
 
Nested classes/interfaces inherited from class com.atlassian.plugin.manager.DefaultPluginManager
com.atlassian.plugin.manager.DefaultPluginManager.PluginSortMode
 
Nested classes/interfaces inherited from interface com.atlassian.plugin.PluginAccessor
com.atlassian.plugin.PluginAccessor.Descriptor
 
Field Summary
 
Fields inherited from interface com.atlassian.plugin.PluginManager
PLUGIN_DESCRIPTOR_FILENAME
 
Constructor Summary
ConfluencePluginManager(com.atlassian.plugin.manager.PluginPersistentStateStore pluginStateStore, java.util.List<java.lang.Object> pluginLoaders, com.atlassian.plugin.ModuleDescriptorFactory moduleDescriptorFactory, com.atlassian.plugin.event.PluginEventManager pluginEventManager, java.util.List<java.lang.String> tenantAwareOrAgnosticPlugins, com.atlassian.event.api.EventPublisher eventPublisher, com.atlassian.plugin.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.
 
Method Summary
 void earlyStartup()
           
protected  boolean isSetupPluginManager()
          Overridden in SetupPluginManager to return true.
 void lateStartup()
           
 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
 void setApplicationContext(org.springframework.context.ApplicationContext applicationContext)
           
 
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, getPluginSortModeProperty, getState, getStore, init, installPlugin, installPlugins, isPluginEnabled, isPluginModuleEnabled, isSystemPlugin, notifyModuleDisabled, notifyModuleEnabled, notifyPluginDisabled, notifyPluginEnabled, notifyUninstallPlugin, onPluginContainerUnavailable, onPluginModuleAvailable, onPluginModuleUnavailable, onPluginRefresh, onUpdateRequiresRestartState, removeStateFromStore, revertRestartRequiredChange, scanForNewPlugins, setDescriptorParserFactory, setPluginInstaller, shutdown, sortPluginsForEnable, uninstall, uninstallNoEvent, 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.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
 
Methods inherited from interface com.atlassian.plugin.PluginSystemLifecycle
init, shutdown, warmRestart
 

Constructor Detail

ConfluencePluginManager

public ConfluencePluginManager(com.atlassian.plugin.manager.PluginPersistentStateStore pluginStateStore,
                               java.util.List<java.lang.Object> pluginLoaders,
                               com.atlassian.plugin.ModuleDescriptorFactory moduleDescriptorFactory,
                               com.atlassian.plugin.event.PluginEventManager pluginEventManager,
                               java.util.List<java.lang.String> tenantAwareOrAgnosticPlugins,
                               com.atlassian.event.api.EventPublisher eventPublisher,
                               com.atlassian.plugin.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 state
pluginLoaders - a list of plugin loaders to use
moduleDescriptorFactory - a factory used to create the module descriptors
pluginEventManager - the event manager used for plugins
tenantAwareOrAgnosticPlugins - list of plugins which are tenant-less or are tenant-aware
eventPublisher - the system event publisher
pluginInstaller - used to persist user-installed plugins
Method Detail

earlyStartup

public void earlyStartup()
                  throws com.atlassian.plugin.PluginParseException,
                         com.atlassian.plugin.event.NotificationException
Specified by:
earlyStartup in interface com.atlassian.plugin.SplitStartupPluginSystemLifecycle
Overrides:
earlyStartup in class com.atlassian.plugin.manager.DefaultPluginManager
Throws:
com.atlassian.plugin.PluginParseException
com.atlassian.plugin.event.NotificationException

lateStartup

public void lateStartup()
                 throws com.atlassian.plugin.PluginParseException,
                        com.atlassian.plugin.event.NotificationException
Specified by:
lateStartup in interface com.atlassian.plugin.SplitStartupPluginSystemLifecycle
Overrides:
lateStartup in class com.atlassian.plugin.manager.DefaultPluginManager
Throws:
com.atlassian.plugin.PluginParseException
com.atlassian.plugin.event.NotificationException

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


Copyright © 2003-2014 Atlassian. All Rights Reserved.