FileDocCategorySizeDatePackage
DeploymentContext.javaAPI DocGlassfish v2 API4493Fri May 04 22:34:30 BST 2007com.sun.enterprise.deployment

DeploymentContext

public class DeploymentContext extends Object
The class contains all the information relative to a particular deployment Its lifetime isl imited to the actual deployment process.
author
Jerome Dochez
version

Fields Summary
private Application
application
the application descriptor we are deploying
private com.sun.enterprise.deployment.deploy.shared.AbstractArchive
archive
Archive abstraction of the deployable application
private File
appTmpDir
Temporary directory used to generating the implementation classes
static Logger
_logger
Constructors Summary
public DeploymentContext(com.sun.enterprise.deployment.deploy.shared.AbstractArchive archive, Application application)
Creates new DeploymentContext

param
application descriptor to be deployed

    
                     
         
        this.application = application;
        this.archive = archive;
    
Methods Summary
public static voiddeleteDirectory(java.io.File dir)
delete all content of a given directory

	File[] files = dir.listFiles();
	if (files != null) {
	    for(int i=0; i < files.length; ++i) {
		File child = files[i];
		if(child.isDirectory()) {
		    deleteDirectory(child);
		} 
		child.delete();
	    }
	}
	dir.delete();
    
public ApplicationgetApplication()

return
the Application object we are deploying

        return application;
    
public com.sun.enterprise.deployment.deploy.shared.AbstractArchivegetArchive()

return
the archive abstraction used to represent the application bunlde being deployed

        return archive;
    
public java.lang.ClassLoadergetClassLoader()

return
the class loader that should be used for loading classes during deployment

        return application.getClassLoader();
    
public java.io.FilegetOutputDirectory()

return
the tmp output directory used to generate files that will be added later to the cooked archive file

        return new File(archive.getArchiveUri());
    
public java.io.FilegetSourceDirectory()

return
the source directory where the content of this deployment has been saved in

        return new File(archive.getArchiveUri());