public class

DefaultPluginTransformer

extends Object
implements PluginTransformer
java.lang.Object
   ↳ com.atlassian.plugin.osgi.factory.transform.DefaultPluginTransformer

Class Overview

Default implementation of plugin transformation that uses stages to convert a plain JAR into an OSGi bundle.

Summary

Public Constructors
DefaultPluginTransformer(OsgiPersistentCache cache, SystemExports systemExports, Set<String> applicationKeys, String pluginDescriptorPath, OsgiContainerManager osgiContainerManager)
Constructs a transformer with the default stages
DefaultPluginTransformer(OsgiPersistentCache cache, SystemExports systemExports, Set<String> applicationKeys, String pluginDescriptorPath, OsgiContainerManager osgiContainerManager, List<TransformStage> stages)
Constructs a transformer and its stages
Public Methods
static ArrayList<TransformStage> getDefaultTransformStages()
Gets the default list of transform stages performed by the transformer.
File transform(File pluginJar, List<HostComponentRegistration> regs)
Transforms the file into an OSGi bundle
File transform(PluginArtifact pluginArtifact, List<HostComponentRegistration> regs)
Transforms the file into an OSGi bundle
[Expand]
Inherited Methods
From class java.lang.Object
From interface com.atlassian.plugin.osgi.factory.transform.PluginTransformer

Public Constructors

public DefaultPluginTransformer (OsgiPersistentCache cache, SystemExports systemExports, Set<String> applicationKeys, String pluginDescriptorPath, OsgiContainerManager osgiContainerManager)

Constructs a transformer with the default stages

Parameters
cache The OSGi cache configuration for transformed plugins
systemExports The packages the system bundle exports
pluginDescriptorPath The path to the plugin descriptor

public DefaultPluginTransformer (OsgiPersistentCache cache, SystemExports systemExports, Set<String> applicationKeys, String pluginDescriptorPath, OsgiContainerManager osgiContainerManager, List<TransformStage> stages)

Constructs a transformer and its stages

Parameters
cache The OSGi cache configuration for transformed plugins
systemExports The packages the system bundle exports
pluginDescriptorPath The descriptor path
stages A set of stages

Public Methods

public static ArrayList<TransformStage> getDefaultTransformStages ()

Gets the default list of transform stages performed by the transformer. Clients wishing to add stages to the transformation process should use this list as a template rather than creating their own from scratch.

public File transform (File pluginJar, List<HostComponentRegistration> regs)

Transforms the file into an OSGi bundle

Parameters
pluginJar The plugin jar
regs The list of registered host components
Returns
  • The new OSGi-enabled plugin jar
Throws
PluginTransformationException If anything goes wrong

public File transform (PluginArtifact pluginArtifact, List<HostComponentRegistration> regs)

Transforms the file into an OSGi bundle

Parameters
pluginArtifact The plugin artifact, usually a jar
regs The list of registered host components
Returns
  • The new OSGi-enabled plugin jar
Throws
PluginTransformationException If anything goes wrong