com.atlassian.plugin.loaders
Class BundledPluginLoader

java.lang.Object
  extended by com.atlassian.plugin.loaders.ScanningPluginLoader
      extended by 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:


Field Summary
 
Fields inherited from class com.atlassian.plugin.loaders.ScanningPluginLoader
pluginArtifactFactory, pluginFactories, plugins, scanner
 
Constructor Summary
BundledPluginLoader(File source, List<PluginFactory> pluginFactories, PluginEventManager eventManager)
          Construct a bundled plugin loader for a directory or list file source.
BundledPluginLoader(URL zipUrl, File pluginPath, List<PluginFactory> pluginFactories, PluginEventManager eventManager)
          Construct a bundled plugin loader for a zip source.
 
Method Summary
static String getListSuffix()
          The suffix used for bundled plugin list files.
protected  Plugin postProcess(Plugin plugin)
          Template method that can be used by a specific PluginLoader to add information to a Plugin after it has been loaded.
 
Methods inherited from class com.atlassian.plugin.loaders.ScanningPluginLoader
canLoad, deployPluginFromUnit, discardPlugin, isDynamicPluginLoader, loadAllPlugins, loadFoundPlugins, onShutdown, removePlugin, shutDown, supportsAddition, supportsRemoval
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

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 Detail

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


Copyright © 2014 Atlassian. All rights reserved.