Package com.atlassian.plugin.loaders
Class BundledPluginLoader
java.lang.Object
com.atlassian.plugin.loaders.ScanningPluginLoader
com.atlassian.plugin.loaders.BundledPluginLoader
- All Implemented Interfaces:
DiscardablePluginLoader,DynamicPluginLoader,PluginLoader
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.
-
Field Summary
Fields inherited from class com.atlassian.plugin.loaders.ScanningPluginLoader
pluginArtifactFactory, pluginFactories, plugins, scanner -
Constructor Summary
ConstructorsConstructorDescriptionBundledPluginLoader(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
Modifier and TypeMethodDescriptionstatic StringThe suffix used for bundled plugin list files.protected PluginpostProcess(Plugin plugin) Template method that can be used by a specificPluginLoaderto add information to aPluginafter it has been loaded.Methods inherited from class com.atlassian.plugin.loaders.ScanningPluginLoader
canLoad, createModule, deployPluginFromUnit, discardPlugin, isDynamicPluginLoader, loadAllPlugins, loadFoundPlugins, onShutdown, removePlugin, supportsAddition, supportsRemoval
-
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 suffixgetListSuffix()containing a list of paths to plugin artifacts.pluginFactories- as perScanningPluginLoader.eventManager- as perScanningPluginLoader.- 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 asBundledPluginLoader(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 perScanningPluginLoader.eventManager- as perScanningPluginLoader.
-
-
Method Details
-
getListSuffix
The suffix used for bundled plugin list files. -
postProcess
Description copied from class:ScanningPluginLoaderTemplate method that can be used by a specificPluginLoaderto add information to aPluginafter it has been loaded.- Overrides:
postProcessin classScanningPluginLoader- Parameters:
plugin- a plugin that has been loaded
-