|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.apache.geronimo.deployment.DeploymentContext
public class DeploymentContext
Field Summary | |
---|---|
protected AbstractName |
moduleName
|
Constructor Summary | |
---|---|
DeploymentContext(File baseDir,
File inPlaceConfigurationDir,
Environment environment,
AbstractName moduleName,
ConfigurationModuleType moduleType,
Naming naming,
ConfigurationManager configurationManager)
|
|
DeploymentContext(File baseDir,
File inPlaceConfigurationDir,
Environment environment,
AbstractName moduleName,
ConfigurationModuleType moduleType,
Naming naming,
ConfigurationManager configurationManager,
Collection repositories)
|
Method Summary | |
---|---|
void |
addAdditionalDeployment(ConfigurationData configurationData)
|
void |
addChildConfiguration(String moduleName,
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(GBeanData gbean)
|
GBeanData |
addGBean(String name,
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()
|
AbstractName |
findGBean(AbstractNameQuery pattern)
|
AbstractName |
findGBean(Set<AbstractNameQuery> patterns)
|
LinkedHashSet<GBeanData> |
findGBeanDatas(Configuration configuration,
AbstractNameQuery pattern)
|
LinkedHashSet<AbstractName> |
findGBeans(AbstractNameQuery pattern)
|
LinkedHashSet<AbstractName> |
findGBeans(Set<AbstractNameQuery> patterns)
|
void |
flush()
|
List |
getAdditionalDeployment()
|
File |
getBaseDir()
|
ClassLoader |
getClassLoader()
|
void |
getCompleteManifestClassPath(JarFile moduleFile,
URI moduleBaseUri,
URI resolutionUri,
ClassPathList classpath,
ModuleList exclusions)
|
void |
getCompleteManifestClassPath(JarFile moduleFile,
URI moduleBaseUri,
URI resolutionUri,
ClassPathList classpath,
ModuleList exclusions,
org.apache.geronimo.deployment.DeploymentContext.JarFileFactory factory,
List<DeploymentException> problems)
Recursively construct the complete set of paths in the ear for the manifest classpath of the supplied modulefile. |
Artifact |
getConfigID()
|
Configuration |
getConfiguration()
|
ConfigurationData |
getConfigurationData()
|
ConfigurationManager |
getConfigurationManager()
|
GBeanData |
getGBeanInstance(AbstractName name)
|
Set<AbstractName> |
getGBeanNames()
|
File |
getInPlaceConfigurationDir()
|
AbstractName |
getModuleName()
|
Naming |
getNaming()
|
File |
getTargetFile(URI targetPath)
|
Set<AbstractName> |
listGBeans(AbstractNameQuery pattern)
Deprecated. use findGBeans(pattern) |
void |
removeGBean(AbstractName name)
|
List<String> |
verify(Configuration configuration)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected final AbstractName moduleName
Constructor Detail |
---|
public DeploymentContext(File baseDir, File inPlaceConfigurationDir, Environment environment, AbstractName moduleName, ConfigurationModuleType moduleType, Naming naming, ConfigurationManager configurationManager, Collection repositories) throws DeploymentException
DeploymentException
public DeploymentContext(File baseDir, File inPlaceConfigurationDir, Environment environment, AbstractName moduleName, ConfigurationModuleType moduleType, Naming naming, ConfigurationManager configurationManager) throws DeploymentException
DeploymentException
Method Detail |
---|
public ConfigurationManager getConfigurationManager()
public Artifact getConfigID()
public File getBaseDir()
public File getInPlaceConfigurationDir()
public Naming getNaming()
public GBeanData addGBean(String name, GBeanInfo gbeanInfo) throws GBeanAlreadyExistsException
GBeanAlreadyExistsException
public void addGBean(GBeanData gbean) throws GBeanAlreadyExistsException
GBeanAlreadyExistsException
public void removeGBean(AbstractName name) throws GBeanNotFoundException
GBeanNotFoundException
public Set<AbstractName> getGBeanNames()
public Set<AbstractName> listGBeans(AbstractNameQuery pattern)
pattern
- Search for gbeans whose name matches pattern.
public AbstractName findGBean(AbstractNameQuery pattern) throws GBeanNotFoundException
GBeanNotFoundException
public AbstractName findGBean(Set<AbstractNameQuery> patterns) throws GBeanNotFoundException
GBeanNotFoundException
public LinkedHashSet<AbstractName> findGBeans(AbstractNameQuery pattern)
public LinkedHashSet<GBeanData> findGBeanDatas(Configuration configuration, AbstractNameQuery pattern)
public LinkedHashSet<AbstractName> findGBeans(Set<AbstractNameQuery> patterns)
public GBeanData getGBeanInstance(AbstractName name) throws GBeanNotFoundException
GBeanNotFoundException
public void addIncludeAsPackedJar(URI targetPath, JarFile jarFile) throws IOException
targetPath
- where the packed jar file should be placedjarFile
- the jar file to copy
IOException
- if there's a problem copying the jar filepublic void addInclude(URI targetPath, ZipFile zipFile, ZipEntry zipEntry) throws IOException
targetPath
- where the ZIP file entry should be placedzipFile
- the ZIP filezipEntry
- the ZIP file entry
IOException
- if there's a problem copying the ZIP entrypublic void addInclude(URI targetPath, URL source) throws IOException
targetPath
- where the file should be placedsource
- the URL of file to be copied
IOException
- if there's a problem copying the ZIP entrypublic void addInclude(URI targetPath, File source) throws IOException
targetPath
- where the file should be placedsource
- the file to be copied
IOException
- if there's a problem copying the ZIP entrypublic void getCompleteManifestClassPath(JarFile moduleFile, URI moduleBaseUri, URI resolutionUri, ClassPathList classpath, ModuleList exclusions) throws DeploymentException
DeploymentException
public void getCompleteManifestClassPath(JarFile moduleFile, URI moduleBaseUri, URI resolutionUri, ClassPathList classpath, ModuleList exclusions, org.apache.geronimo.deployment.DeploymentContext.JarFileFactory factory, List<DeploymentException> problems) throws DeploymentException
moduleFile
- the module that we start looking at classpaths at, in the car.moduleBaseUri
- where the moduleFile is inside the car file. For an (unpacked) war this ends with / which means we also need:resolutionUri
- the uri to resolve all entries against. For a module such as an ejb jar that is part of the
root ear car it is ".". For a sub-configuration such as a war it is the "reverse" of the path to the war file in the car.
For instance, if the war file is foo/bar/myweb.war, the resolutionUri is "../../..".classpath
- the classpath list we are constructing.exclusions
- the paths to not investigate. These are typically the other modules in the ear/car file: they will have their contents processed for themselves.factory
- the factory for constructing JarFiles and the way to extract the manifest classpath from a JarFile. Introduced to make
testing plausible, but may be useful for in-IDE deployment.problems
- List to save all the problems we encounter.
DeploymentException
- if something goes wrong.public void addManifestClassPath(JarFile moduleFile, URI moduleBaseUri) throws DeploymentException
moduleBaseUri
.
moduleFile
- the jar file from which the manifest is obtained.moduleBaseUri
- the base for the imported classpath
DeploymentException
- if there is a problem with the classpath in
the manifestpublic void addClass(URI targetPath, String fqcn, byte[] bytes) throws IOException, URISyntaxException
IOException
URISyntaxException
public void addFile(URI targetPath, ZipFile zipFile, ZipEntry zipEntry) throws IOException
IOException
public void addFile(URI targetPath, URL source) throws IOException
IOException
public void addFile(URI targetPath, File source) throws IOException
IOException
public void addFile(URI targetPath, String source) throws IOException
IOException
public File getTargetFile(URI targetPath)
public ClassLoader getClassLoader() throws DeploymentException
DeploymentException
public Configuration getConfiguration()
public void flush() throws IOException
IOException
public void close() throws IOException, DeploymentException
IOException
DeploymentException
public void addChildConfiguration(String moduleName, ConfigurationData configurationData)
public ConfigurationData getConfigurationData() throws DeploymentException
DeploymentException
public void addAdditionalDeployment(ConfigurationData configurationData)
public List getAdditionalDeployment()
public AbstractName getModuleName()
public List<String> verify(Configuration configuration) throws DeploymentException
DeploymentException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |