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

    Constructors
    Constructor
    Description
    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 Summary

    Modifier and Type
    Method
    Description
    void
     
    void
     
    void
    Equivalent of PluginController.disablePlugin(String), but will only affect the current node.
    void
     
    void
    Equivalent of PluginController.disablePluginModule(String), but will only affect the current node.
    void
     
    void
    Equivalent of PluginController.enablePluginModule(String), but will only affect the current node.
    void
     
    void
    Equivalent of PluginController.enablePlugins(String...), but will only affect the current node.
    void
     
    installPlugins(com.atlassian.plugin.PluginArtifact... pluginArtifacts)
     
    installPluginsLocalOnly(com.atlassian.plugin.PluginArtifact... pluginArtifacts)
    Equivalent of PluginController.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 a ApplicationStartedEvent
    void
    onPluginUpgradedEvent(com.atlassian.plugin.event.events.PluginUpgradedEvent upgradedEvent)
     
    void
    uninstall(com.atlassian.plugin.Plugin plugin)
     
    void
    uninstallLocalOnly(com.atlassian.plugin.Plugin plugin)
    Equivalent of PluginController.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 interface com.atlassian.plugin.PluginSystemLifecycle
      Overrides:
      init in class com.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 a ApplicationStartedEvent
    • destroy

      @PreDestroy public void destroy() throws Exception
      Specified by:
      destroy in interface org.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 interface com.atlassian.plugin.PluginController
      Overrides:
      installPlugins in class com.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 of PluginController.installPlugins(PluginArtifact...), but will only affect the current node.
      Specified by:
      installPluginsLocalOnly in interface ClusterAwarePluginController
      Throws:
      com.atlassian.plugin.PluginParseException
    • uninstall

      public void uninstall(com.atlassian.plugin.Plugin plugin) throws com.atlassian.plugin.PluginException
      Specified by:
      uninstall in interface com.atlassian.plugin.PluginController
      Overrides:
      uninstall in class com.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 of PluginController.uninstall(Plugin), but will only affect the current node.
      Specified by:
      uninstallLocalOnly in interface ClusterAwarePluginController
      Throws:
      com.atlassian.plugin.PluginException
    • enablePlugins

      public void enablePlugins(String... keys)
      Specified by:
      enablePlugins in interface com.atlassian.plugin.PluginController
      Overrides:
      enablePlugins in class com.atlassian.plugin.manager.DefaultPluginManager
    • enablePluginsLocalOnly

      public void enablePluginsLocalOnly(String... keys)
      Description copied from interface: ClusterAwarePluginController
      Equivalent of PluginController.enablePlugins(String...), but will only affect the current node.
      Specified by:
      enablePluginsLocalOnly in interface ClusterAwarePluginController
    • disablePlugin

      public void disablePlugin(String key)
      Specified by:
      disablePlugin in interface com.atlassian.plugin.PluginController
      Overrides:
      disablePlugin in class com.atlassian.plugin.manager.DefaultPluginManager
    • disablePluginLocalOnly

      public void disablePluginLocalOnly(String key)
      Description copied from interface: ClusterAwarePluginController
      Equivalent of PluginController.disablePlugin(String), but will only affect the current node.
      Specified by:
      disablePluginLocalOnly in interface ClusterAwarePluginController
    • enablePluginModule

      public void enablePluginModule(String completeKey)
      Specified by:
      enablePluginModule in interface com.atlassian.plugin.PluginController
      Overrides:
      enablePluginModule in class com.atlassian.plugin.manager.DefaultPluginManager
    • enablePluginModuleLocalOnly

      public void enablePluginModuleLocalOnly(String completeKey)
      Description copied from interface: ClusterAwarePluginController
      Equivalent of PluginController.enablePluginModule(String), but will only affect the current node.
      Specified by:
      enablePluginModuleLocalOnly in interface ClusterAwarePluginController
    • disablePluginModule

      public void disablePluginModule(String completeKey)
      Specified by:
      disablePluginModule in interface com.atlassian.plugin.PluginController
      Overrides:
      disablePluginModule in class com.atlassian.plugin.manager.DefaultPluginManager
    • disablePluginModuleLocalOnly

      public void disablePluginModuleLocalOnly(String completeKey)
      Description copied from interface: ClusterAwarePluginController
      Equivalent of PluginController.disablePluginModule(String), but will only affect the current node.
      Specified by:
      disablePluginModuleLocalOnly in interface ClusterAwarePluginController
    • onPluginUpgradedEvent

      public void onPluginUpgradedEvent(com.atlassian.plugin.event.events.PluginUpgradedEvent upgradedEvent)