org.apache.geronimo.deployment
Class DeploymentContext

java.lang.Object
  extended by org.apache.geronimo.deployment.DeploymentContext

public class DeploymentContext
extends Object


Field Summary
protected  org.apache.geronimo.gbean.AbstractName moduleName
           
 
Constructor Summary
DeploymentContext(File baseDir, File inPlaceConfigurationDir, org.apache.geronimo.kernel.repository.Environment environment, org.apache.geronimo.gbean.AbstractName moduleName, org.apache.geronimo.kernel.config.ConfigurationModuleType moduleType, org.apache.geronimo.kernel.Naming naming, org.apache.geronimo.kernel.config.ConfigurationManager configurationManager)
           
DeploymentContext(File baseDir, File inPlaceConfigurationDir, org.apache.geronimo.kernel.repository.Environment environment, org.apache.geronimo.gbean.AbstractName moduleName, org.apache.geronimo.kernel.config.ConfigurationModuleType moduleType, org.apache.geronimo.kernel.Naming naming, org.apache.geronimo.kernel.config.ConfigurationManager configurationManager, Collection repositories)
           
 
Method Summary
 void addAdditionalDeployment(org.apache.geronimo.kernel.config.ConfigurationData configurationData)
           
 void addChildConfiguration(String moduleName, org.apache.geronimo.kernel.config.ConfigurationData configurationData)
           
 void addClass(URI targetPath, String fqcn, byte[] bytes)
           
 void addFile(URI targetPath, File source)
           
 void addFile(URI targetPath, String source)
           
 void addFile(URI targetPath, URL source)
           
 void addFile(URI targetPath, ZipFile zipFile, ZipEntry zipEntry)
           
 void addGBean(org.apache.geronimo.gbean.GBeanData gbean)
           
 org.apache.geronimo.gbean.GBeanData addGBean(String name, org.apache.geronimo.gbean.GBeanInfo gbeanInfo)
           
 void addInclude(URI targetPath, File source)
          Add a file into the deployment context and place it into the path specified in the target path.
 void addInclude(URI targetPath, URL source)
          Add a file into the deployment context and place it into the path specified in the target path.
 void addInclude(URI targetPath, ZipFile zipFile, ZipEntry zipEntry)
          Add a ZIP file entry into the deployment context and place it into the path specified in the target path.
 void addIncludeAsPackedJar(URI targetPath, JarFile jarFile)
          Add a packed jar file into the deployment context and place it into the path specified in the target path.
 void addManifestClassPath(JarFile moduleFile, URI moduleBaseUri)
          Import the classpath from a jar file's manifest.
 void close()
           
 org.apache.geronimo.gbean.AbstractName findGBean(org.apache.geronimo.gbean.AbstractNameQuery pattern)
           
 org.apache.geronimo.gbean.AbstractName findGBean(Set patterns)
           
 LinkedHashSet findGBeans(org.apache.geronimo.gbean.AbstractNameQuery pattern)
           
 LinkedHashSet findGBeans(Set patterns)
           
 void flush()
           
 List getAdditionalDeployment()
           
 File getBaseDir()
           
 ClassLoader getClassLoader()
           
 org.apache.geronimo.kernel.repository.Artifact getConfigID()
           
 org.apache.geronimo.kernel.config.Configuration getConfiguration()
           
 org.apache.geronimo.kernel.config.ConfigurationData getConfigurationData()
           
 org.apache.geronimo.kernel.config.ConfigurationManager getConfigurationManager()
           
 org.apache.geronimo.gbean.GBeanData getGBeanInstance(org.apache.geronimo.gbean.AbstractName name)
           
 Set getGBeanNames()
           
 File getInPlaceConfigurationDir()
           
 org.apache.geronimo.gbean.AbstractName getModuleName()
           
 org.apache.geronimo.kernel.Naming getNaming()
           
 File getTargetFile(URI targetPath)
           
 Set listGBeans(org.apache.geronimo.gbean.AbstractNameQuery pattern)
          Deprecated. use findGBeans(pattern)
 void removeGBean(org.apache.geronimo.gbean.AbstractName name)
           
 List verify()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

moduleName

protected final org.apache.geronimo.gbean.AbstractName moduleName
Constructor Detail

DeploymentContext

public DeploymentContext(File baseDir,
                         File inPlaceConfigurationDir,
                         org.apache.geronimo.kernel.repository.Environment environment,
                         org.apache.geronimo.gbean.AbstractName moduleName,
                         org.apache.geronimo.kernel.config.ConfigurationModuleType moduleType,
                         org.apache.geronimo.kernel.Naming naming,
                         org.apache.geronimo.kernel.config.ConfigurationManager configurationManager,
                         Collection repositories)
                  throws org.apache.geronimo.common.DeploymentException
Throws:
org.apache.geronimo.common.DeploymentException

DeploymentContext

public DeploymentContext(File baseDir,
                         File inPlaceConfigurationDir,
                         org.apache.geronimo.kernel.repository.Environment environment,
                         org.apache.geronimo.gbean.AbstractName moduleName,
                         org.apache.geronimo.kernel.config.ConfigurationModuleType moduleType,
                         org.apache.geronimo.kernel.Naming naming,
                         org.apache.geronimo.kernel.config.ConfigurationManager configurationManager)
                  throws org.apache.geronimo.common.DeploymentException
Throws:
org.apache.geronimo.common.DeploymentException
Method Detail

getConfigurationManager

public org.apache.geronimo.kernel.config.ConfigurationManager getConfigurationManager()

getConfigID

public org.apache.geronimo.kernel.repository.Artifact getConfigID()

getBaseDir

public File getBaseDir()

getInPlaceConfigurationDir

public File getInPlaceConfigurationDir()

getNaming

public org.apache.geronimo.kernel.Naming getNaming()

addGBean

public org.apache.geronimo.gbean.GBeanData addGBean(String name,
                                                    org.apache.geronimo.gbean.GBeanInfo gbeanInfo)
                                             throws org.apache.geronimo.kernel.GBeanAlreadyExistsException
Throws:
org.apache.geronimo.kernel.GBeanAlreadyExistsException

addGBean

public void addGBean(org.apache.geronimo.gbean.GBeanData gbean)
              throws org.apache.geronimo.kernel.GBeanAlreadyExistsException
Throws:
org.apache.geronimo.kernel.GBeanAlreadyExistsException

removeGBean

public void removeGBean(org.apache.geronimo.gbean.AbstractName name)
                 throws org.apache.geronimo.kernel.GBeanNotFoundException
Throws:
org.apache.geronimo.kernel.GBeanNotFoundException

getGBeanNames

public Set getGBeanNames()

listGBeans

public Set listGBeans(org.apache.geronimo.gbean.AbstractNameQuery pattern)
Deprecated. use findGBeans(pattern)


findGBean

public org.apache.geronimo.gbean.AbstractName findGBean(org.apache.geronimo.gbean.AbstractNameQuery pattern)
                                                 throws org.apache.geronimo.kernel.GBeanNotFoundException
Throws:
org.apache.geronimo.kernel.GBeanNotFoundException

findGBean

public org.apache.geronimo.gbean.AbstractName findGBean(Set patterns)
                                                 throws org.apache.geronimo.kernel.GBeanNotFoundException
Throws:
org.apache.geronimo.kernel.GBeanNotFoundException

findGBeans

public LinkedHashSet findGBeans(org.apache.geronimo.gbean.AbstractNameQuery pattern)

findGBeans

public LinkedHashSet findGBeans(Set patterns)

getGBeanInstance

public org.apache.geronimo.gbean.GBeanData getGBeanInstance(org.apache.geronimo.gbean.AbstractName name)
                                                     throws org.apache.geronimo.kernel.GBeanNotFoundException
Throws:
org.apache.geronimo.kernel.GBeanNotFoundException

addIncludeAsPackedJar

public void addIncludeAsPackedJar(URI targetPath,
                                  JarFile jarFile)
                           throws IOException
Add a packed jar file into the deployment context and place it into the path specified in the target path. The newly added packed jar is added to the classpath of the configuration.

Parameters:
targetPath - where the packed jar file should be placed
jarFile - the jar file to copy
Throws:
IOException - if there's a problem copying the jar file

addInclude

public void addInclude(URI targetPath,
                       ZipFile zipFile,
                       ZipEntry zipEntry)
                throws IOException
Add a ZIP file entry into the deployment context and place it into the path specified in the target path. The newly added entry is added to the classpath of the configuration.

Parameters:
targetPath - where the ZIP file entry should be placed
zipFile - the ZIP file
zipEntry - the ZIP file entry
Throws:
IOException - if there's a problem copying the ZIP entry

addInclude

public void addInclude(URI targetPath,
                       URL source)
                throws IOException
Add a file into the deployment context and place it into the path specified in the target path. The newly added file is added to the classpath of the configuration.

Parameters:
targetPath - where the file should be placed
source - the URL of file to be copied
Throws:
IOException - if there's a problem copying the ZIP entry

addInclude

public void addInclude(URI targetPath,
                       File source)
                throws IOException
Add a file into the deployment context and place it into the path specified in the target path. The newly added file is added to the classpath of the configuration.

Parameters:
targetPath - where the file should be placed
source - the file to be copied
Throws:
IOException - if there's a problem copying the ZIP entry

addManifestClassPath

public void addManifestClassPath(JarFile moduleFile,
                                 URI moduleBaseUri)
                          throws org.apache.geronimo.common.DeploymentException
Import the classpath from a jar file's manifest. The imported classpath is crafted relative to moduleBaseUri.

Parameters:
moduleFile - the jar file from which the manifest is obtained.
moduleBaseUri - the base for the imported classpath
Throws:
org.apache.geronimo.common.DeploymentException - if there is a problem with the classpath in the manifest

addClass

public void addClass(URI targetPath,
                     String fqcn,
                     byte[] bytes)
              throws IOException,
                     URISyntaxException
Throws:
IOException
URISyntaxException

addFile

public void addFile(URI targetPath,
                    ZipFile zipFile,
                    ZipEntry zipEntry)
             throws IOException
Throws:
IOException

addFile

public void addFile(URI targetPath,
                    URL source)
             throws IOException
Throws:
IOException

addFile

public void addFile(URI targetPath,
                    File source)
             throws IOException
Throws:
IOException

addFile

public void addFile(URI targetPath,
                    String source)
             throws IOException
Throws:
IOException

getTargetFile

public File getTargetFile(URI targetPath)

getClassLoader

public ClassLoader getClassLoader()
                           throws org.apache.geronimo.common.DeploymentException
Throws:
org.apache.geronimo.common.DeploymentException

getConfiguration

public org.apache.geronimo.kernel.config.Configuration getConfiguration()

flush

public void flush()
           throws IOException
Throws:
IOException

close

public void close()
           throws IOException,
                  org.apache.geronimo.common.DeploymentException
Throws:
IOException
org.apache.geronimo.common.DeploymentException

addChildConfiguration

public void addChildConfiguration(String moduleName,
                                  org.apache.geronimo.kernel.config.ConfigurationData configurationData)

getConfigurationData

public org.apache.geronimo.kernel.config.ConfigurationData getConfigurationData()
                                                                         throws org.apache.geronimo.common.DeploymentException
Throws:
org.apache.geronimo.common.DeploymentException

addAdditionalDeployment

public void addAdditionalDeployment(org.apache.geronimo.kernel.config.ConfigurationData configurationData)

getAdditionalDeployment

public List getAdditionalDeployment()

getModuleName

public org.apache.geronimo.gbean.AbstractName getModuleName()

verify

public List verify()
            throws org.apache.geronimo.common.DeploymentException
Throws:
org.apache.geronimo.common.DeploymentException


Copyright © 2006 Apache Software Foundation. All Rights Reserved.