public class

LegacyDynamicPluginFactory

extends Object
implements PluginFactory
java.lang.Object
   ↳ com.atlassian.plugin.factories.LegacyDynamicPluginFactory

Class Overview

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

Summary

Public Constructors
LegacyDynamicPluginFactory(String pluginDescriptorFileName)
LegacyDynamicPluginFactory(String pluginDescriptorFileName, File tempDirectory)
Public Methods
String canCreate(PluginArtifact pluginArtifact)
Determines if this deployer can handle this artifact by looking for the plugin descriptor
Plugin create(PluginArtifact pluginArtifact, ModuleDescriptorFactory moduleDescriptorFactory)
Deploys the plugin artifact
Plugin create(DeploymentUnit deploymentUnit, ModuleDescriptorFactory moduleDescriptorFactory)
This method is deprecated. Since 2.2.0, use create(PluginArtifact, ModuleDescriptorFactory) instead
Protected Methods
Plugin createPlugin(PluginArtifact pluginArtifact, PluginClassLoader loader)
Creates the plugin.
Plugin createPlugin(DeploymentUnit deploymentUnit, PluginClassLoader loader)
This method is deprecated. Since 2.2.0, use createPlugin(PluginArtifact, PluginClassLoader) instead
[Expand]
Inherited Methods
From class java.lang.Object
From interface com.atlassian.plugin.factories.PluginFactory

Public Constructors

public LegacyDynamicPluginFactory (String pluginDescriptorFileName)

public LegacyDynamicPluginFactory (String pluginDescriptorFileName, File tempDirectory)

Public Methods

public String canCreate (PluginArtifact pluginArtifact)

Determines if this deployer can handle this artifact by looking for the plugin descriptor

Parameters
pluginArtifact The artifact to test
Returns
  • The plugin key, null if it cannot load the plugin
Throws
PluginParseException If there are exceptions parsing the plugin configuration

public Plugin create (PluginArtifact pluginArtifact, ModuleDescriptorFactory moduleDescriptorFactory)

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

public Plugin create (DeploymentUnit deploymentUnit, ModuleDescriptorFactory moduleDescriptorFactory)

This method is deprecated.
Since 2.2.0, use create(PluginArtifact, ModuleDescriptorFactory) instead

Deploys the deployment unit by instantiating the plugin and configuring it. Should only be called if the respective canCreate(PluginArtifact) call returned the plugin key

Parameters
deploymentUnit the unit to deploy
moduleDescriptorFactory the factory for the module descriptors
Returns
  • the plugin loaded from the deployment unit, or an UnloadablePlugin instance if loading fails.

Protected Methods

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

protected Plugin createPlugin (DeploymentUnit deploymentUnit, PluginClassLoader loader)

This method is deprecated.
Since 2.2.0, use createPlugin(PluginArtifact, PluginClassLoader) instead