com.atlassian.plugin.osgi.loader
Class BundledOsgiPluginLoader
java.lang.Object
com.atlassian.plugin.loaders.ClassLoadingPluginLoader
com.atlassian.plugin.osgi.loader.OsgiPluginLoader
com.atlassian.plugin.osgi.loader.BundledOsgiPluginLoader
- All Implemented Interfaces:
- DynamicPluginLoader, PluginLoader
public class BundledOsgiPluginLoader
- extends OsgiPluginLoader
Version of the osgi plugin loader that ensures plugins loaded will not be deletable. Also provides an alternative
constructor that will handle unzipping the bundled plugins.
|
Constructor Summary |
BundledOsgiPluginLoader(java.io.File pluginPath,
java.lang.String pluginDescriptorFileName,
PluginFactory pluginFactory,
OsgiContainerManager osgi,
HostComponentProvider provider)
|
BundledOsgiPluginLoader(java.net.URL zipUrl,
java.io.File pluginPath,
java.lang.String pluginDescriptorFileName,
PluginFactory pluginFactory,
OsgiContainerManager osgi,
HostComponentProvider provider)
Constructs the loader, but also unzips the bundled plugins to the specified plugin directory |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
BundledOsgiPluginLoader
public BundledOsgiPluginLoader(java.net.URL zipUrl,
java.io.File pluginPath,
java.lang.String pluginDescriptorFileName,
PluginFactory pluginFactory,
OsgiContainerManager osgi,
HostComponentProvider provider)
- Constructs the loader, but also unzips the bundled plugins to the specified plugin directory
- Parameters:
zipUrl - The url to the zip of bundled pluginspluginPath - The directory that should contain the unzipped bundled pluginspluginDescriptorFileName - The plugin descriptor name, i.e. atlassian-plugins.xmlpluginFactory - The factory to create the pluginsosgi - The osgi container managerprovider - The initial host component provider to use when starting the osgi container (if not already started)
BundledOsgiPluginLoader
public BundledOsgiPluginLoader(java.io.File pluginPath,
java.lang.String pluginDescriptorFileName,
PluginFactory pluginFactory,
OsgiContainerManager osgi,
HostComponentProvider provider)
deployPluginFromUnit
protected Plugin deployPluginFromUnit(DeploymentUnit deploymentUnit,
ModuleDescriptorFactory moduleDescriptorFactory)
throws PluginParseException
- Override the standard plugin loading in order to set isDeleteable = false because we don't ever want to delete
a bundled plugin, evern though we do want to dynamically replace them.
- Overrides:
deployPluginFromUnit in class ClassLoadingPluginLoader
- Parameters:
deploymentUnit - moduleDescriptorFactory -
- Returns:
- The new DynamicPlugin with isDeleteable set to false;
- Throws:
PluginParseException
Copyright © 2008 Atlassian Pty Ltd. All Rights Reserved.