Class ConfluencePluginManager

java.lang.Object
com.atlassian.plugin.manager.DefaultPluginManager
com.atlassian.confluence.plugin.ConfluencePluginManager
All Implemented Interfaces:
com.atlassian.plugin.PluginAccessor, com.atlassian.plugin.PluginController, com.atlassian.plugin.PluginSystemLifecycle, com.atlassian.plugin.SplitStartupPluginSystemLifecycle, EventListener, org.springframework.beans.factory.Aware, 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
Cluster safe extension of DefaultPluginManager which listens for plugin events fired on other nodes and guarantees that plugin state is consistent across nodes.
  • 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

    Constructors
    Modifier
    Constructor
    Description
    protected
    ConfluencePluginManager(com.atlassian.plugin.manager.DefaultPluginManager.Builder<? extends com.atlassian.plugin.manager.DefaultPluginManager.Builder> builder, com.atlassian.plugin.PluginAccessor pluginAccessor, com.atlassian.event.api.EventPublisher eventPublisher, com.atlassian.plugin.PluginInstaller pluginInstaller)
     
     
    ConfluencePluginManager(com.atlassian.plugin.PluginRegistry.ReadWrite pluginRegistry, com.atlassian.plugin.PluginAccessor pluginAccessor, com.atlassian.plugin.manager.PluginPersistentStateStore pluginStateStore, List<Object> pluginLoaders, com.atlassian.plugin.ModuleDescriptorFactory moduleDescriptorFactory, com.atlassian.plugin.event.PluginEventManager pluginEventManager, List<String> tenantAwareOrAgnosticPlugins, com.atlassian.event.api.EventPublisher eventPublisher, com.atlassian.plugin.PluginInstaller pluginInstaller, com.atlassian.plugin.manager.SafeModeManager safeModeManager)
    Deprecated, for removal: This API element is subject to removal in a future version.
    since 9.4
  • Method Summary

    Modifier and Type
    Method
    Description
    void
     
    protected static List<com.atlassian.plugin.loaders.PluginLoader>
    filterPluginLoaders(List<Object> loaderClassNamesOrObjects)
     
    void
     
    protected boolean
    Overridden in SetupPluginManager to return {@link true}.
    void
     
    final void
    onApplicationEvent(org.springframework.context.ApplicationEvent event)
    Initialised the plugin system 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

    addDynamicModule, addPlugins, disablePlugin, disablePluginInternal, disablePluginModule, disablePluginWithoutPersisting, enablePluginModule, enablePlugins, getClassLoader, getDynamicModules, getDynamicPluginClass, getDynamicResourceAsStream, getEnabledModuleDescriptorsByClass, getEnabledModulesByClass, getEnabledPlugin, getEnabledPluginModule, getEnabledPlugins, getLateStartupEnableRetryProperty, getMinimumPluginVersionsFileProperty, getModuleDescriptors, getModules, getPlugin, getPluginModule, getPluginRestartState, getPlugins, getPlugins, getStartupOverrideFileProperty, getState, installPlugins, isPluginEnabled, isPluginModuleEnabled, isSystemPlugin, newBuilder, notifyModuleDisabled, notifyModuleEnabled, notifyUninstallPlugin, onPluginContainerUnavailable, onPluginModuleAvailable, onPluginModuleUnavailable, onPluginRefresh, onUpdateRequiresRestartState, removeDynamicModule, removeStateFromStore, revertRestartRequiredChange, scanForNewPlugins, setPluginInstaller, shutdown, uninstall, 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 org.springframework.context.ApplicationListener

    supportsAsyncExecution

    Methods inherited from interface com.atlassian.plugin.PluginAccessor

    getActiveModuleDescriptorsByClass, getModuleDescriptors, getModules, getPlugins
  • Constructor Details

    • ConfluencePluginManager

      protected ConfluencePluginManager(com.atlassian.plugin.manager.DefaultPluginManager.Builder<? extends com.atlassian.plugin.manager.DefaultPluginManager.Builder> builder, com.atlassian.plugin.PluginAccessor pluginAccessor, com.atlassian.event.api.EventPublisher eventPublisher, com.atlassian.plugin.PluginInstaller pluginInstaller)
      Since:
      9.4
    • ConfluencePluginManager

      @Deprecated(forRemoval=true) public ConfluencePluginManager(com.atlassian.plugin.PluginRegistry.ReadWrite pluginRegistry, com.atlassian.plugin.PluginAccessor pluginAccessor, com.atlassian.plugin.manager.PluginPersistentStateStore pluginStateStore, List<Object> pluginLoaders, com.atlassian.plugin.ModuleDescriptorFactory moduleDescriptorFactory, com.atlassian.plugin.event.PluginEventManager pluginEventManager, List<String> tenantAwareOrAgnosticPlugins, com.atlassian.event.api.EventPublisher eventPublisher, com.atlassian.plugin.PluginInstaller pluginInstaller, com.atlassian.plugin.manager.SafeModeManager safeModeManager)
      Deprecated, for removal: This API element is subject to removal in a future version.
      since 9.4
      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:
      pluginRegistry - a shared registry between PluginController and PluginAccessor
      pluginAccessor - a plugin accessor
      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 Details

    • filterPluginLoaders

      protected static List<com.atlassian.plugin.loaders.PluginLoader> filterPluginLoaders(List<Object> loaderClassNamesOrObjects)
    • init

      public void init() throws com.atlassian.plugin.PluginParseException, com.atlassian.plugin.event.NotificationException
      Specified by:
      init in interface com.atlassian.plugin.PluginSystemLifecycle
      Overrides:
      init in class com.atlassian.plugin.manager.DefaultPluginManager
      Throws:
      com.atlassian.plugin.PluginParseException
      com.atlassian.plugin.event.NotificationException
    • 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 {@link true}.
    • onApplicationEvent

      public final void onApplicationEvent(org.springframework.context.ApplicationEvent event)
      Initialised the plugin system 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