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 Object

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

Since:
2.2.0

Constructor Summary
TransformContext(List<HostComponentRegistration> regs, SystemExports systemExports, PluginArtifact pluginArtifact, Set<String> applicationKeys, String descriptorPath, OsgiContainerManager osgiContainerManager)
           
 
Method Summary
 void addBundleClasspathJar(String classpath)
           
 void addRequiredHostComponent(HostComponentRegistration hostComponent)
           
 boolean beanExists(String name)
          Check if the bean has been tracked.
 Set<String> getApplicationKeys()
           
 Map<String,String> getBndInstructions()
           
 Set<String> getBundleClassPathJars()
           
 Map<String,ComponentImport> getComponentImports()
           
 org.dom4j.Document getDescriptorDocument()
           
 List<String> getExtraExports()
           
 List<String> getExtraImports()
           
 Map<String,byte[]> getFileOverrides()
           
 List<HostComponentRegistration> getHostComponentRegistrations()
           
 Manifest getManifest()
           
 OsgiContainerManager getOsgiContainerManager()
           
 PluginArtifact getPluginArtifact()
           
 File getPluginFile()
           
 Iterable<JarEntry> getPluginJarEntries()
           
 JarEntry getPluginJarEntry(String path)
           
 Set<HostComponentRegistration> getRequiredHostComponents()
           
 SystemExports getSystemExports()
           
 void setShouldRequireSpring(boolean shouldRequireSpring)
           
 boolean shouldRequireSpring()
           
 void trackBean(String name, 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(List<HostComponentRegistration> regs,
                        SystemExports systemExports,
                        PluginArtifact pluginArtifact,
                        Set<String> applicationKeys,
                        String descriptorPath,
                        OsgiContainerManager osgiContainerManager)
Method Detail

getPluginFile

public File getPluginFile()

getPluginArtifact

public PluginArtifact getPluginArtifact()

getHostComponentRegistrations

public List<HostComponentRegistration> getHostComponentRegistrations()

getFileOverrides

public Map<String,byte[]> getFileOverrides()

getBndInstructions

public Map<String,String> getBndInstructions()

getDescriptorDocument

public org.dom4j.Document getDescriptorDocument()

getManifest

public Manifest getManifest()

getExtraImports

public List<String> getExtraImports()

getExtraExports

public List<String> getExtraExports()

addBundleClasspathJar

public void addBundleClasspathJar(String classpath)

getBundleClassPathJars

public Set<String> getBundleClassPathJars()

getComponentImports

public Map<String,ComponentImport> getComponentImports()

getSystemExports

public SystemExports getSystemExports()

getApplicationKeys

public Set<String> getApplicationKeys()

shouldRequireSpring

public boolean shouldRequireSpring()

setShouldRequireSpring

public void setShouldRequireSpring(boolean shouldRequireSpring)

getOsgiContainerManager

public OsgiContainerManager getOsgiContainerManager()

getPluginJarEntries

public Iterable<JarEntry> getPluginJarEntries()

getPluginJarEntry

public JarEntry getPluginJarEntry(String path)

addRequiredHostComponent

public void addRequiredHostComponent(HostComponentRegistration hostComponent)

getRequiredHostComponents

public Set<HostComponentRegistration> getRequiredHostComponents()

trackBean

public void trackBean(String name,
                      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(String name)
Check if the bean has been tracked. This is used for testing only.

Parameters:
name - the bean name.


Copyright © 2010 Atlassian. All Rights Reserved.