com.atlassian.plugin.osgi.loader
Class BundledOsgiPluginLoader

java.lang.Object
  extended by com.atlassian.plugin.loaders.ClassLoadingPluginLoader
      extended by com.atlassian.plugin.osgi.loader.OsgiPluginLoader
          extended by 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
 
Method Summary
protected  Plugin deployPluginFromUnit(DeploymentUnit deploymentUnit, ModuleDescriptorFactory moduleDescriptorFactory)
          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.
 
Methods inherited from class com.atlassian.plugin.osgi.loader.OsgiPluginLoader
addFoundPlugins, canLoad, createPlugin, handleNoDescriptor, loadAllPlugins, setPluginTransformer, shutDown
 
Methods inherited from class com.atlassian.plugin.loaders.ClassLoadingPluginLoader
removePlugin, setDescriptorParserFactory, supportsAddition, supportsRemoval
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

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 plugins
pluginPath - The directory that should contain the unzipped bundled plugins
pluginDescriptorFileName - The plugin descriptor name, i.e. atlassian-plugins.xml
pluginFactory - The factory to create the plugins
osgi - The osgi container manager
provider - 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)
Method Detail

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.