Class DefaultPluginTransformer
java.lang.Object
com.atlassian.plugin.osgi.internal.factory.transform.DefaultPluginTransformer
- All Implemented Interfaces:
PluginTransformer
Default implementation of plugin transformation that uses stages to convert a plain JAR into an OSGi bundle.
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionDefaultPluginTransformer(OsgiPersistentCache cache, SystemExports systemExports, Set<Application> applications, String pluginDescriptorPath, OsgiContainerManager osgiContainerManager) Constructs a transformer with the default stagesDefaultPluginTransformer(OsgiPersistentCache cache, SystemExports systemExports, Set<Application> applications, String pluginDescriptorPath, OsgiContainerManager osgiContainerManager, List<TransformStage> stages) Constructs a transformer and its stages -
Method Summary
Modifier and TypeMethodDescriptionstatic ArrayList<TransformStage>Gets the default list of transform stages performed by the transformer.transform(PluginArtifact pluginArtifact, List<HostComponentRegistration> regs) Transforms the file into an OSGi bundletransform(File pluginJar, List<HostComponentRegistration> regs) Transforms the file into an OSGi bundle
-
Field Details
-
TRANSFORM_COMPRESSION_LEVEL
- See Also:
-
-
Constructor Details
-
DefaultPluginTransformer
public DefaultPluginTransformer(OsgiPersistentCache cache, SystemExports systemExports, Set<Application> applications, String pluginDescriptorPath, OsgiContainerManager osgiContainerManager) Constructs a transformer with the default stages- Parameters:
cache- The OSGi cache configuration for transformed pluginssystemExports- The packages the system bundle exportspluginDescriptorPath- The path to the plugin descriptor- Since:
- 2.2.0
-
DefaultPluginTransformer
public DefaultPluginTransformer(OsgiPersistentCache cache, SystemExports systemExports, Set<Application> applications, String pluginDescriptorPath, OsgiContainerManager osgiContainerManager, List<TransformStage> stages) Constructs a transformer and its stages- Parameters:
cache- The OSGi cache configuration for transformed pluginssystemExports- The packages the system bundle exportspluginDescriptorPath- The descriptor pathstages- A set of stages- Since:
- 2.2.0
-
-
Method Details
-
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. -
transform
Transforms the file into an OSGi bundle- Parameters:
pluginJar- The plugin jarregs- The list of registered host components- Returns:
- The new OSGi-enabled plugin jar
- Throws:
PluginTransformationException- If anything goes wrong
-
transform
Transforms the file into an OSGi bundle- Specified by:
transformin interfacePluginTransformer- Parameters:
pluginArtifact- The plugin artifact, usually a jarregs- The list of registered host components- Returns:
- The new OSGi-enabled plugin jar
- Throws:
PluginTransformationException- If anything goes wrong
-