com.atlassian.plugin.factories
Class LegacyDynamicPluginFactory

java.lang.Object
  extended by com.atlassian.plugin.factories.AbstractPluginFactory
      extended by com.atlassian.plugin.factories.LegacyDynamicPluginFactory
All Implemented Interfaces:
PluginFactory

public final class LegacyDynamicPluginFactory
extends AbstractPluginFactory

Deploys version 1.0 plugins into the legacy custom classloader structure that gives each plugin its own classloader.

Since:
2.0.0

Field Summary
 
Fields inherited from class com.atlassian.plugin.factories.AbstractPluginFactory
applications, descriptorParserFactory
 
Constructor Summary
LegacyDynamicPluginFactory(String pluginDescriptorFileName)
           
LegacyDynamicPluginFactory(String pluginDescriptorFileName, File tempDirectory)
           
 
Method Summary
 Plugin create(PluginArtifact pluginArtifact, ModuleDescriptorFactory moduleDescriptorFactory)
          Deploys the plugin artifact
protected  Plugin createPlugin(DeploymentUnit deploymentUnit, PluginClassLoader loader)
          Deprecated. Since 2.2.0, use createPlugin(PluginArtifact,PluginClassLoader) instead
protected  Plugin createPlugin(PluginArtifact pluginArtifact, PluginClassLoader loader)
          Creates the plugin.
protected  InputStream getDescriptorInputStream(PluginArtifact pluginArtifact)
           
protected  com.google.common.base.Predicate<Integer> isValidPluginsVersion()
           
 
Methods inherited from class com.atlassian.plugin.factories.AbstractPluginFactory
canCreate, create, getPluginKeyFromDescriptor, hasDescriptor
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

LegacyDynamicPluginFactory

public LegacyDynamicPluginFactory(String pluginDescriptorFileName)

LegacyDynamicPluginFactory

public LegacyDynamicPluginFactory(String pluginDescriptorFileName,
                                  File tempDirectory)
Method Detail

getDescriptorInputStream

protected InputStream getDescriptorInputStream(PluginArtifact pluginArtifact)
Specified by:
getDescriptorInputStream in class AbstractPluginFactory

isValidPluginsVersion

protected com.google.common.base.Predicate<Integer> isValidPluginsVersion()
Specified by:
isValidPluginsVersion in class AbstractPluginFactory

create

public Plugin create(PluginArtifact pluginArtifact,
                     ModuleDescriptorFactory moduleDescriptorFactory)
              throws PluginParseException
Deploys the plugin artifact

Parameters:
pluginArtifact - the plugin artifact to deploy
moduleDescriptorFactory - The factory for plugin modules
Returns:
The instantiated and populated plugin
Throws:
PluginParseException - If the descriptor cannot be parsed
Since:
2.2.0

createPlugin

protected Plugin createPlugin(DeploymentUnit deploymentUnit,
                              PluginClassLoader loader)
Deprecated. Since 2.2.0, use createPlugin(PluginArtifact,PluginClassLoader) instead


createPlugin

protected Plugin createPlugin(PluginArtifact pluginArtifact,
                              PluginClassLoader loader)
Creates the plugin. Override to use a different Plugin class

Parameters:
pluginArtifact - The plugin artifact
loader - The plugin loader
Returns:
The plugin instance
Since:
2.2.0


Copyright © 2015 Atlassian. All rights reserved.