Class BundledPluginLoader

java.lang.Object
com.atlassian.plugin.loaders.ScanningPluginLoader
com.atlassian.plugin.loaders.BundledPluginLoader
All Implemented Interfaces:
DiscardablePluginLoader, DynamicPluginLoader, PluginLoader

public class BundledPluginLoader extends ScanningPluginLoader
A Plugin loader that manages a set of bundled plugins, meaning that they can can be upgraded, but not deleted.

This loader can source plugins from:

  • A directory containing Plugin artifacts.
  • A file with a getListSuffix() suffix, where each line of that file gives the path to a Plugin artifact.
  • A URL identifying a zip file, and a path to explode the zip into, and the exploded contents of the zip are used as the plugin artifacts.
  • Constructor Details

    • BundledPluginLoader

      public BundledPluginLoader(File source, List<PluginFactory> pluginFactories, PluginEventManager eventManager)
      Construct a bundled plugin loader for a directory or list file source.
      Parameters:
      source - a directory of containing plugin artifacts, or a file with suffix getListSuffix() containing a list of paths to plugin artifacts.
      pluginFactories - as per ScanningPluginLoader.
      eventManager - as per ScanningPluginLoader.
      Since:
      3.0.16
    • BundledPluginLoader

      public BundledPluginLoader(URL zipUrl, File pluginPath, List<PluginFactory> pluginFactories, PluginEventManager eventManager)
      Construct a bundled plugin loader for a zip source.

      For backwards compatibility, if the zipUrl is in fact a file url (acccording to FileUtils.toFile(java.net.URL)), this constructor has the same semantics as BundledPluginLoader(File, List, PluginEventManager) where the first argument is the file referred to by zipUrl, and the pluginPath argument is ignored. That constructor should be used directly in such cases.

      Parameters:
      zipUrl - a url to a zipFile containing plugin artifacts, or a file url to a directory or list file.
      pluginPath - path to the directory to expand zipUrl.
      pluginFactories - as per ScanningPluginLoader.
      eventManager - as per ScanningPluginLoader.
  • Method Details

    • getListSuffix

      public static String getListSuffix()
      The suffix used for bundled plugin list files.
    • postProcess

      protected Plugin postProcess(Plugin plugin)
      Description copied from class: ScanningPluginLoader
      Template method that can be used by a specific PluginLoader to add information to a Plugin after it has been loaded.
      Overrides:
      postProcess in class ScanningPluginLoader
      Parameters:
      plugin - a plugin that has been loaded