com.atlassian.plugin.osgi.factory.transform
Class TransformContext

java.lang.Object
  extended by com.atlassian.plugin.osgi.factory.transform.TransformContext

public final class TransformContext
extends java.lang.Object

The transform context containing any configuration necessary to enact a JAR transformation.

Since:
2.2.0

Constructor Summary
TransformContext(java.util.List<HostComponentRegistration> regs, SystemExports systemExports, PluginArtifact pluginArtifact, java.util.Set<Application> applications, java.lang.String descriptorPath, OsgiContainerManager osgiContainerManager)
           
 
Method Summary
 void addBundleClasspathJar(java.lang.String classpath)
           
 void addRequiredHostComponent(HostComponentRegistration hostComponent)
           
 boolean beanExists(java.lang.String name)
          Check if the bean has been tracked.
 java.util.Set<Application> getApplications()
           
 java.util.Map<java.lang.String,java.lang.String> getBndInstructions()
           
 java.util.Set<java.lang.String> getBundleClassPathJars()
           
 java.util.Map<java.lang.String,ComponentImport> getComponentImports()
           
 org.dom4j.Document getDescriptorDocument()
           
 java.util.List<java.lang.String> getExtraExports()
           
 java.util.List<java.lang.String> getExtraImports()
           
 java.util.Map<java.lang.String,byte[]> getFileOverrides()
           
 java.util.List<HostComponentRegistration> getHostComponentRegistrations()
           
 InstallationMode getInstallationMode()
           
 java.util.jar.Manifest getManifest()
           
 OsgiContainerManager getOsgiContainerManager()
           
 PluginArtifact getPluginArtifact()
           
 java.io.File getPluginFile()
           
 java.lang.Iterable<java.util.jar.JarEntry> getPluginJarEntries()
           
 java.util.jar.JarEntry getPluginJarEntry(java.lang.String path)
           
 java.util.Set<HostComponentRegistration> getRequiredHostComponents()
           
 SystemExports getSystemExports()
           
 void setShouldRequireSpring(boolean shouldRequireSpring)
           
 boolean shouldRequireSpring()
           
 void trackBean(java.lang.String name, java.lang.String source)
          Track a bean by remembering its name and source.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TransformContext

public TransformContext(java.util.List<HostComponentRegistration> regs,
                        SystemExports systemExports,
                        PluginArtifact pluginArtifact,
                        java.util.Set<Application> applications,
                        java.lang.String descriptorPath,
                        OsgiContainerManager osgiContainerManager)
Method Detail

getPluginFile

public java.io.File getPluginFile()

getPluginArtifact

public PluginArtifact getPluginArtifact()

getHostComponentRegistrations

public java.util.List<HostComponentRegistration> getHostComponentRegistrations()

getFileOverrides

public java.util.Map<java.lang.String,byte[]> getFileOverrides()

getBndInstructions

public java.util.Map<java.lang.String,java.lang.String> getBndInstructions()

getDescriptorDocument

public org.dom4j.Document getDescriptorDocument()

getManifest

public java.util.jar.Manifest getManifest()

getExtraImports

public java.util.List<java.lang.String> getExtraImports()

getExtraExports

public java.util.List<java.lang.String> getExtraExports()

addBundleClasspathJar

public void addBundleClasspathJar(java.lang.String classpath)

getBundleClassPathJars

public java.util.Set<java.lang.String> getBundleClassPathJars()

getComponentImports

public java.util.Map<java.lang.String,ComponentImport> getComponentImports()

getSystemExports

public SystemExports getSystemExports()

getApplications

public java.util.Set<Application> getApplications()

shouldRequireSpring

public boolean shouldRequireSpring()

setShouldRequireSpring

public void setShouldRequireSpring(boolean shouldRequireSpring)

getOsgiContainerManager

public OsgiContainerManager getOsgiContainerManager()

getPluginJarEntries

public java.lang.Iterable<java.util.jar.JarEntry> getPluginJarEntries()

getPluginJarEntry

public java.util.jar.JarEntry getPluginJarEntry(java.lang.String path)

addRequiredHostComponent

public void addRequiredHostComponent(HostComponentRegistration hostComponent)

getRequiredHostComponents

public java.util.Set<HostComponentRegistration> getRequiredHostComponents()

trackBean

public void trackBean(java.lang.String name,
                      java.lang.String source)
               throws PluginTransformationException
Track a bean by remembering its name and source. If there is already a bean with the same name, PluginTransformationException will be raised.

Parameters:
name - id, name, or alias of the bean = basically any names which can be used to refer to the bean in Spring context.
source - the source of the bean.
Throws:
PluginTransformationException

beanExists

public boolean beanExists(java.lang.String name)
Check if the bean has been tracked. This is used for testing only.

Parameters:
name - the bean name.

getInstallationMode

public InstallationMode getInstallationMode()


Copyright © 2013 Atlassian. All Rights Reserved.