FileDocCategorySizeDatePackage
DeploymentRequest.javaAPI DocGlassfish v2 API40273Fri May 04 22:34:30 BST 2007com.sun.enterprise.deployment.backend

DeploymentRequest

public class DeploymentRequest extends Object
author
bnevins
version

Fields Summary
private boolean
isDone
private FileSource
fileSource
private File
deploymentPlan
private com.sun.enterprise.management.deploy.DeploymentCallback
deploymentCallback
private boolean
isAborted
private boolean
isExternallyManagedApp
private boolean
isExternallyManagedPath
private boolean
isReload
private String
targetName
private DeployableObjectType
type
private DeploymentCommand
command
private String
name
private String
contextRoot
private String
defaultContextRoot
private com.sun.enterprise.instance.InstanceEnvironment
instanceEnv
private com.sun.enterprise.instance.ApplicationEnvironment
appEnv
private com.sun.enterprise.instance.ModuleEnvironment
moduleEnv
private File
clientJar
private File
deployedDirectory
private File
jspDirectory
private File
stubsDirectory
private File
generatedXMLDirectory
private boolean
shared
private boolean
forced
private boolean
isVerified
private boolean
isVerifying
private boolean
debug
private boolean
noEJBC
private boolean
precompileJSP
private boolean
generateRMIStubs
private boolean
availabilityEnabled
private boolean
javaWebStartEnabled
private String
libraries
private String
resourceAction
private String
resourceTargetList
private boolean
directoryDeployed
private List
parentClasspath
private ClassLoader
parentClassLoader
private List
completeClasspath
private List
moduleClasspath
private ClassLoader
ejbClassLoader
private Properties
optionalAttributes
private Properties
optionalArguments
private String
httpHostName
private int
httpPort
private String
httpsHostName
private int
httpsPort
private com.sun.enterprise.deployment.Application
application
private static com.sun.enterprise.util.i18n.StringManager
localStrings
private javax.enterprise.deploy.spi.Target
target
target name on which this deployment request is performed
private boolean
startOnDeploy
application state after Deploy/Associate
private int
actionCode
action code of this request
private boolean
cascade
cascading the undeploy
private DeploymentStatus
currentDeploymentStatus
current deployment status
private String
description
private boolean
reregisterOnFailure
failed directory redeploy should NOT reregister from the MBean
private boolean
isRedeployInProgress
records whether this request and command are part of a larger redeployment sequence
Constructors Summary
public DeploymentRequest(com.sun.enterprise.instance.InstanceEnvironment iEnv, DeployableObjectType theType, DeploymentCommand theCommand)
Create a deployment request object. The constructor must be called with the three arguments required for all deployment requests. You must call other methods to set attributes required for some requests.

parameter
iEnv InstanceEnvironment object
parameter
theCommand The command (Deploy Redeploy Undeploy) of the request
parameter
theType The type of deployment (Application, Web Module, EJB Module, Connector Module

    
	///////////////////////////////////////////////////////////////////////////
	/////////  Public Methods       ///////////////////////////////////////////
	///////////////////////////////////////////////////////////////////////////

	                                                            	 
	 
				
			 
				
		//File					source,	// directory or archive here - optional for undeploy
		//String					theName)
		 
	
		// order counts -- don't change it unless you know what you're doing!
		instanceEnv = iEnv;
		setType(theType);
		setCommand(theCommand);
	
Methods Summary
public voidaddOptionalArgument(java.lang.String key, java.lang.String value)
Adds one optional argument.

see
addOptionalArguments

		optionalArguments.put(key, value);
	
public voidaddOptionalArguments(java.util.Properties props)
Adds the optional arguments for this request. Currently - these are CMP-only args. It would have been nice to add these args to the pre-existing optionalAttributes. But those attributes are all blindly added to Config by classes in the instance package. It would have been a KLUDGE-fest to separate the different name-value pairs in this class and then repackage. Which is why we have yet-another Properties object. bnevins 4/3/2003

		/* We want to be slightly smart here.  If this method is called more than once,
		* we can't just wipe-out the earlier mappings!
		* So we keep our own Properties object and always ADD to it...
		* If this method is never called, optionalArguments will be empty but not null.
		*/
			optionalArguments.putAll(props);
		
public voidaddOptionalArguments(java.util.Map map)

            optionalArguments.putAll(map);
        
private voidcheckForRedeploy()
We need to figure-out if it is REALLY an App-Redeploy very early because DeployerFactory needs to create the right kind of Deployer object

		if(isUnDeploy())
			return;	// don't need to do anything!
		
		assert (appEnv != null && moduleEnv == null)|| (appEnv == null && moduleEnv != null);
		assert !isVerified;
		assert StringUtils.ok(name);
		assert instanceEnv != null;
		
		if(moduleEnv != null)
		{
			// too difficult, and not neccessary,  to figure this out here
			return;
		}
		
		try
		{
			AppsManager	appMgr = new AppsManager(instanceEnv);
			boolean		isReg = appMgr.isRegistered(name);
			
			if(forced && isReg && isDeploy())
				command = DeploymentCommand.REDEPLOY;
		}
		catch(Exception e)
		{
			throw new IASDeploymentException(e);
		}
	
private voidcreateName()

		String aname = fileSource.getSource().getName();
		
		// special-case.  If it's xxx.ear, the name is xxx, not xxx_ear
		if(isEar())
			name = FileUtils.makeFriendlyFilenameNoExtension(aname);
		else
			name = FileUtils.makeFriendlyFilename(aname);
	
public voiddone()
Releases any resources held by the deployment request, notably the EJBClassLoader.

         if ( ! isDone) {
             isDone = true;
             if (ejbClassLoader != null && ejbClassLoader instanceof EJBClassLoader) {
                 ((EJBClassLoader) ejbClassLoader).done();
             }
         }
     
public intgetActionCode()
returns the actionCode

return
int action code

        return actionCode;
    
com.sun.enterprise.instance.ApplicationEnvironmentgetAppEnv()

		if(!isApplication()) {
			String msg = localStrings.getString(
				"enterprise.deployment.backend.illegal_getapplicationenv_call");
			throw new IASDeploymentException( msg );
		}
		
		return appEnv;
	
public booleangetCascade()
returns true if cascade is true false otherwise

return
true/false

        return this.cascade;
    
public java.io.FilegetClientJar()

		return clientJar;
	
DeploymentCommandgetCommand()

		return command;
	
java.util.ListgetCompleteClasspath()
Returns the complete class paths for this request.

return
the ejb class paths

        return this.completeClasspath;
    
public java.lang.StringgetContextRoot()

		return contextRoot;
	
public DeploymentStatusgetCurrentDeploymentStatus()
Returns the current deployment status

return
currentDeploymentStatus current deployment status

        return currentDeploymentStatus;
    
public booleangetDebug()

		return debug;
	
public java.lang.StringgetDefaultContextRoot()

                return defaultContextRoot;
        
public java.io.FilegetDeployedDirectory()
Return the App or Module Directory so that ownership can be modified, if neccessary.

return
The full path root directory of the deployed directory

		if(!FileUtils.safeIsDirectory(deployedDirectory))
			deployedDirectory = null;
		
        return deployedDirectory;
    
public com.sun.enterprise.management.deploy.DeploymentCallbackgetDeploymentCallback()

             return deploymentCallback;
         
public java.io.FilegetDeploymentPlan()

             return deploymentPlan;
         
public java.lang.StringgetDescription()

return
the description associated with this request

         return description;
     
public com.sun.enterprise.deployment.ApplicationgetDescriptor()

return
the application descriptor associated with this request

	 return application;
     
java.lang.ClassLoadergetEjbClassLoader()
Returns the ejb class loader for this request.

return
the ejb class loader

        return this.ejbClassLoader;
    
public FileSourcegetFileSource()

		return fileSource;
	
public booleangetGenerateRMIStubs()

returns
the 'generate-rmi-stubs' attribute.

                return generateRMIStubs;
        
public java.io.FilegetGeneratedXMLDirectory()
Return the Directory where the modified xml files will be located.

return
The full path generated xml directory root.

                if(!FileUtils.safeIsDirectory(generatedXMLDirectory))
                        generatedXMLDirectory = null;

        return generatedXMLDirectory;
    
public java.lang.StringgetHttpHostName()

            return httpHostName;
        
public intgetHttpPort()

            return httpPort;
        
public java.lang.StringgetHttpsHostName()

            return httpsHostName;
        
public intgetHttpsPort()

            return httpsPort;
        
public com.sun.enterprise.instance.InstanceEnvironmentgetInstanceEnv()
String getInstanceName() { return instanceEnv.getName(); }

		return instanceEnv;
	
public java.io.FilegetJSPDirectory()
Return the Stubs Directory so that ownership can be modified, if neccessary.

return
The full path stubs directory root.

		if(!FileUtils.safeIsDirectory(jspDirectory))
			jspDirectory = null;
		
        return jspDirectory;
    
public java.lang.StringgetLibraries()

returns
the 'libraries' attribute.

                return libraries;
        
java.util.ListgetModuleClasspath()

return
the module classpath for this request

	
	return moduleClasspath;
    
com.sun.enterprise.instance.ModuleEnvironmentgetModuleEnv()

		if(!isModule()) {
			String msg = localStrings.getString(
					"enterprise.deployment.backend.illegal_getmoduleenv_call");
			throw new IASDeploymentException( msg );
		}

		return moduleEnv;
	
public java.lang.StringgetName()

		return name;
	
public booleangetNoEJBC()

		return noEJBC;
	
public java.util.PropertiesgetOptionalArguments()
Returns the optional arguments for this request. It is guaranteed to be not-null, but might be empty.

return
the optional arguments

		return optionalArguments;
	
public java.util.PropertiesgetOptionalAttributes()
Returns the optional attributes for this request.

return
Properties with the optional attributes

        return this.optionalAttributes;
    
java.lang.ClassLoadergetParentClassLoader()
Returns the parent class loader for this request.

return
the parent class loader

        return this.parentClassLoader;
    
java.util.ListgetParentClasspath()
Returns the parent class paths for this request.

return
the parent class paths

        return this.parentClasspath;
    
public booleangetPrecompileJSP()

returns
whether or not precompiling JSP is enabled -- the default is false.

		return precompileJSP;
	
public booleangetReRegisterOnFailure()
Should the app or module be re-registered on fatal errors? If false is returned, this means that it could NOT be rollbacked to a previous working version.

		return reregisterOnFailure;
     
public java.lang.StringgetResourceAction()

returns
the 'resourceAction' attribute.

                return resourceAction;
        
public java.lang.StringgetResourceTargetList()

returns
the 'targetList' attribute.

                return resourceTargetList;
        
public java.io.FilegetStubsDirectory()
Return the Stubs Directory so that ownership can be modified, if neccessary.

return
The full path stubs directory root.

		if(!FileUtils.safeIsDirectory(stubsDirectory))
			stubsDirectory = null;
		
        return stubsDirectory;
    
public javax.enterprise.deploy.spi.TargetgetTarget()
Returns the target

return
target JSR88 Target object

        return  target;
    
public java.lang.StringgetTargetName()

             return targetName;
         
public DeployableObjectTypegetType()

		return type;
	
public booleanisAborted()

             return isAborted;
         
public booleanisAppClientModule()

		return DeployableObjectType.CAR.equals(type);
	
public booleanisApplication()

		return DeployableObjectType.APP.equals(type);
	
public booleanisArchive()

		if(isUnDeploy()) {
			String msg = localStrings.getString(
					"enterprise.deployment.backend.invalid_isarchive_call" );
			throw new IASDeploymentException( msg );
		}

		return getFileSource().isArchive();
	
public booleanisAvailabilityEnabled()

returns
the 'availability-enabled' attribute.

                return availabilityEnabled;
        
public booleanisConnectorModule()

		return DeployableObjectType.CONN.equals(type);
	
private booleanisContextRootRequired()

		// it is required for WebModules that are Deployed or Redeployed
		return isWebModule() && ( isDeploy() || isReDeploy());
	
public booleanisDeploy()

		if(command == null) 
		{
			String msg =localStrings.getString(	"enterprise.deployment.backend.no_command");
			throw new IASDeploymentException( msg );
		}
		// setCommand, called from the ctor already verified command
		// if this assert fires that means a programmer must have set the
		// command back to null -- Programmer Error
		//assert command != null;	
		
		// check for null again -- this might be a release build!
		//if(command == null)
			//return false;
		
		return command.equals(DeploymentCommand.DEPLOY);
	
public booleanisDirectory()

		if(isUnDeploy())
			//throw new IASDeploymentException("Internal Error -- invalid to call isDirectory() for an Undeploy");
			return false;
		
		return getFileSource().isDirectory();
	
booleanisEar()

		// check if it's archive deployment and 
                // if it's an application 
		return isApplication() && fileSource.isArchive();
	
booleanisEjbJar()

		// check if it's archive deployment and 
                // if it's a ejb module
		return isEjbModule() && fileSource.isArchive();
	
public booleanisEjbModule()

		return DeployableObjectType.EJB.equals(type);
	
public booleanisExternallyManagedApp()

             return isExternallyManagedApp;
         
public booleanisExternallyManagedPath()

             return isExternallyManagedPath;
         
private booleanisFileSourceRequired()

		if(isUnDeploy())
			return false;
		else
			return true;
	
public booleanisForced()
gets the 'forced' attribute.

return
forced attribute

		return forced;
	
public booleanisJavaWebStartEnabled()

returns
the 'java-web-start-enabled' attribute.

                return javaWebStartEnabled;
        
booleanisMaybeCMPDropTables()
return false, if the variable is false. Any other case -- return true.

		String s = getOptionalArguments().getProperty(Constants.CMP_DROP_TABLES);
		
		if(s != null && s.equalsIgnoreCase(Constants.FALSE))
			return false;
		
		return true;
	
public booleanisModule()

		return isWebModule() || isEjbModule() || isConnectorModule() || isAppClientModule();
	
private booleanisNameRequired()

		if(isDeploy())
			return false;
		else
			return true;
	
public booleanisReDeploy()

		if(command == null) 
		{
			String msg =localStrings.getString(	"enterprise.deployment.backend.no_command");
			throw new IASDeploymentException( msg );
		}
		
		// setCommand, called from the ctor already verified command
		// if this assert fires that means a programmer must have set the
		// command back to null -- Programmer Error
		//assert command != null;	
		
		// check for null again -- this might be a release build!
		//if(command == null)
			//return false;
		
		return command.equals(DeploymentCommand.REDEPLOY);
	
public booleanisRedeployInProgress()
Reports whether this request is part of a larger redeployment sequence.

         return isRedeployInProgress;
     
public booleanisReload()

             return isReload;
         
public booleanisSharedModule()

		return isModule() && shared;
	
public booleanisStandAloneModule()

		return isModule() && !shared;
	
public booleanisStartOnDeploy()
returns true if isStartOnDeploy is true false otherwise

return
true/false

        return this.startOnDeploy;
    
public booleanisUnDeploy()

		if(command == null) 
		{
			String msg =localStrings.getString(	"enterprise.deployment.backend.no_command");
			throw new IASDeploymentException( msg );
		}
		
		// setCommand, called from the ctor already verified command
		// if this assert fires that means a programmer must have set the
		// command back to null -- Programmer Error
		//assert command != null;	
		
		// check for null again -- this might be a release build!
		//if(command == null)
			//return false;
		
		return command.equals(DeploymentCommand.UNDEPLOY);
	
public booleanisVerifying()
Returns a boolean indicating whether this application is going to be verified during deployment.

return
when true, deployment backedn runs verifier

        return isVerifying;
    
booleanisWar()

		// check if it's archive deployment and 
                // if it's a web module
		return isWebModule() && fileSource.isArchive();
	
public booleanisWebModule()

		return DeployableObjectType.WEB.equals(type);
	
public voidsetAbort(boolean isAborted)

             this.isAborted = isAborted;
         
public voidsetActionCode(int actionCode)
Sets the actioncode to as specified

param
actionCode

        this.actionCode = actionCode;
    
public voidsetAvailabilityEnabled(boolean newAvailabilityEnabled)
sets the 'availability-enabled' attribute.

param
newAvailabilityEnabled

                availabilityEnabled = newAvailabilityEnabled;
        
public voidsetCascade(boolean cascade)
Sets cascade. Dependent resources associated with a connector resource are destroyed if this flag is true

param
startOnDeploy

        this.cascade = cascade;
    
voidsetClientJar(java.io.File f)

		/*
		File p = f.getParentFile();
		
		if(!FileUtils.safeIsDirectory(f))
			throw new IASDeploymentException("Illegal parameter to setClientJarFile().  " +
				"The file (" + FileUtils.safeGetCanonicalPath(f) + ") has no existing parent directory.");
		*/
		clientJar = f;
	
voidsetCommand(DeploymentCommand theCommand)

		command = theCommand;
		
		if(command == null) {
			String msg = localStrings.getString(
					"enterprise.deployment.backend.null_command_type" );
			throw new IASDeploymentException( msg );
		}
	
voidsetCompleteClasspath(java.util.List classpaths)
Sets the complete class paths for this request.

        this.completeClasspath = classpaths;
    
public voidsetContextRoot(java.lang.String s)
Set the Context Root for Web Modules

		contextRoot = s;
	
public voidsetCurrentDeploymentStatus(DeploymentStatus status)
Sets the current deployment status to as specified

param
status deployment status

        currentDeploymentStatus = status;
    
public voidsetDebug(boolean what)

		debug = true;
	
public voidsetDefaultContextRoot(java.lang.String s)
Set the default Context Root for Web Modules

                defaultContextRoot = s;
        
public voidsetDeployedDirectory(java.io.File d)
Set the App or Module Directory so that ownership can be modified, if neccessary.

        deployedDirectory = d;
    
public voidsetDeploymentCallback(com.sun.enterprise.management.deploy.DeploymentCallback callback)

             deploymentCallback = callback;
         
public voidsetDeploymentPlan(java.io.File plan)

             deploymentPlan = plan;
         
public voidsetDescription(java.lang.String description)
Sets the description associated with this request

         this.description = description;
     
public voidsetDescriptor(com.sun.enterprise.deployment.Application app)
Sets the descriptor associated with this request

	 this.application = app;
     
voidsetEjbClassLoader(java.lang.ClassLoader cl)
Sets the ejb class loader to be used for this request.

param
cl ejb class loader

        this.ejbClassLoader = cl;
    
private voidsetEnv()

		if(instanceEnv == null) {
			String msg = localStrings.getString(
					"enterprise.deployment.backend.null_instanceenvironment" );
			throw new IASDeploymentException( msg );
		}
		
		if(isApplication())
			appEnv = new ApplicationEnvironment(instanceEnv, name);
		else if(isWebModule())
			moduleEnv = new ModuleEnvironment(instanceEnv, name, DeployableObjectType.WEB);
		else if(isEjbModule())
			moduleEnv = new ModuleEnvironment(instanceEnv, name, DeployableObjectType.EJB);
		else if(isConnectorModule())
			moduleEnv = new ModuleEnvironment(instanceEnv, name, DeployableObjectType.CONN);
                else if (isAppClientModule()) 
                        moduleEnv = new ModuleEnvironment(instanceEnv, name ,DeployableObjectType.CAR);                    
		else {
			String msg = localStrings.getString(
					"enterprise.deployment.backend.unknown_deployable_object",
					getClass().getName() );
			throw new IASDeploymentException( msg );
		}
	
public voidsetExternallyManagedApp(boolean isExtManagedApp)

             isExternallyManagedApp = isExtManagedApp;
         
public voidsetExternallyManagedPath(boolean isExtManagedPath)

             isExternallyManagedPath = isExtManagedPath;
         
public voidsetFileSource(java.lang.String src)
Sets the source of deployment files.
Deploy - required
Redeploy - required
Undeploy - not required

param
src String pointing at Archive file or root-dir for user-specified 'pre-exploded' deployment

		setFileSource(new File(src));
	
public voidsetFileSource(java.io.File src)
Sets the source of deployment files.
Deploy - required
Redeploy - required
Undeploy - not required

param
src File Object pointing at Archive file or root-dir for user-specified 'pre-exploded' deployment

		fileSource = null;
		
		if(src == null && !isFileSourceRequired())
			return;	// all OK...
		
		try
		{
			fileSource = new FileSource(src);
		}
		catch(Exception e)
		{
			if(isFileSourceRequired())
				throw new IASDeploymentException("DeploymentRequest.setFileSource()" + e);
		}
	
public voidsetForced(boolean newForced)
sets the 'forced' attribute. If set to true - no error occurs if the App or Module is already registered. If false, an Exception will be thrown if the App or Module is already deployed.

param
newForced true for forcing Deployment of already registered Apps/Modules. I.e. a Redeployment

		forced = newForced;
	
public voidsetGenerateRMIStubs(boolean newGenerateRMIStubs)
sets the 'generate-rmi-stubs' attribute.

param
newGenerateRMIStubs

                generateRMIStubs = newGenerateRMIStubs; 
        
public voidsetGeneratedXMLDirectory(java.io.File d)
Set the Directory where the modified xml files will be located

        generatedXMLDirectory = d;
    
public voidsetHttpHostName(java.lang.String hostName)

            httpHostName = hostName;
        
public voidsetHttpPort(int port)

            httpPort = port;
        
public voidsetHttpsHostName(java.lang.String hostName)

            httpsHostName = hostName;
        
public voidsetHttpsPort(int port)

            httpsPort = port;
        
public voidsetIsRedeployInProgress(boolean inProgress)
Sets whether this request is part of a larger redeployment sequence.

param
inProgress boolean setting for the value

         isRedeployInProgress = inProgress;
     
public voidsetJSPDirectory(java.io.File d)
Set the Stubs Directory so that ownership can be modified, if neccessary.

        jspDirectory = d;
    
public voidsetJavaWebStartEnabled(boolean newJavaWebStartEnabled)
sets the 'java-web-start-enabled' attribute.

param
newJavaWebStartEnabled

                javaWebStartEnabled = newJavaWebStartEnabled;
        
public voidsetLibraries(java.lang.String newLibraries)
sets the 'libraries' attribute.

param
newLibraries

                libraries = newLibraries;
        
voidsetModuleClasspath(java.util.List classpath)
Sets the module classpath (no env classpath) for this request

param
the module classpath

	moduleClasspath = classpath;
    
public voidsetName(java.lang.String theName)
sets the Name of the App or Module. If you don't call this, and if it's legal, one will be provided for you at no cost.
Deploy - not required
Redeploy - required
Undeploy - required

param
theName String name of module or application

		if(StringUtils.ok(theName))
			name = theName;

		else if(isNameRequired()) {
			String msg = localStrings.getString(
					"enterprise.deployment.backend.null_setname" );
			throw new IASDeploymentException( msg );
		}
	
public voidsetNoEJBC()

		noEJBC = true;
	
public voidsetOptionalAttributes(java.util.Properties optionalAttributes)
Sets the optional attributes for this request.

        this.optionalAttributes = optionalAttributes;
    
voidsetParentClassLoader(java.lang.ClassLoader cl)
Sets the parent class loader to be used for this request.

param
cl parant class loader

        this.parentClassLoader = cl;
    
voidsetParentClasspath(java.util.List classpaths)
Sets the parent class paths for this request.

        this.parentClasspath = classpaths;
    
public voidsetPrecompileJSP(boolean newPrecompileJSP)
sets the 'precompile-jsp' attribute. If set to true - JSP precompilation is performed, if neccessary. If the precompile has errors, the deployment will officially fail. This feature is by default, false.

param
precompileJSP true for performing JSP compilation at Deployment Time.

		precompileJSP = newPrecompileJSP;
	
voidsetReRegisterOnFailure(boolean b)

		reregisterOnFailure = b;
     
public voidsetReload(boolean isReload)

             this.isReload = isReload;
         
public voidsetResourceAction(java.lang.String newResourceAction)
sets the 'resourceAction' attribute.

param
newResourcesAction

                resourceAction = newResourceAction;
        
public voidsetResourceTargetList(java.lang.String newTargetList)
sets the 'targetList' attribute.

param
newTargetList

                resourceTargetList = newTargetList;
        
public voidsetShared(boolean newShared)
sets the 'shared' attribute

param
shared true for shared Ejb modules, false for unshared Ejb modules

		if(!isEjbModule()) {
			String msg = localStrings.getString(
					"enterprise.deployment.backend.cannot_set_shared_flag" );
			throw new IASDeploymentException( msg );
		}
			
		shared = newShared;
	
public voidsetStartOnDeploy(boolean startOnDeploy)
Sets startOnUndeploy. An application is set to enabled after deployment or association when this is true

param
startOnDeploy

        this.startOnDeploy = startOnDeploy;
    
public voidsetStubsDirectory(java.io.File d)
Set the Stubs Directory so that ownership can be modified, if neccessary.

        stubsDirectory = d;
    
public voidsetTarget(javax.enterprise.deploy.spi.Target target)
Sets the target to as specified

param
target JSR88 target

        this.target = target;
    
public voidsetTargetName(java.lang.String name)

             targetName = name;
         
private voidsetType(DeployableObjectType theType)

		type = theType;

		if(isConnectorModule())
			shared = true;
		else
			shared = false;
	
public voidsetVerifying(boolean what)
Deployment backend runs verifier during deployment when set to true.

param
what when true, deployment backend runs verifier

        isVerifying = what;
    
public java.lang.StringtoString()

		return ObjectAnalyzer.toString(this);
	
public voidverify()
Makes sure everything that needs to be setup is OK. Use it just before deploying WBN: 4-26-02 added code to change Deploy to Redeploy if neccessary

		if(isVerified)
			return;
		
		if(isFileSourceRequired() && fileSource == null) {
			String msg = localStrings.getString(
					"enterprise.deployment.backend.file_source_required" );
			throw new IASDeploymentException( msg );
		}
	
		if(isNameRequired() && name == null) {
			String msg = localStrings.getString(
					"enterprise.deployment.backend.name_required" );
			throw new IASDeploymentException( msg );
		}
		
		if(isContextRootRequired() && contextRoot == null &&
                    defaultContextRoot == null) {

			String msg = localStrings.getString(
					"enterprise.deployment.backend.context_root_required" );
			throw new IASDeploymentException( msg );
		}
		
		if(name == null) // this is true iff no name is required to be supplied
			createName();
		
		// Bug 4679970 -- we must have a file-system-legal name.
		// we have a contract with other code that there will be a client jar
		// whose name is <app-name>Client.jar
		// thus AppName: "foo?<*//x" --> "foo?<*//xClient.jar" -- impossible to create!!
		
		if(!FileUtils.isLegalFilename(name))
		{
			// 2 approaches -- (1) don't allow it and (2) change the name
			// We're going with approach (1) for now...
			
			// approach (1)
			String msg = localStrings.getString(
				"enterprise.deployment.backend.illegal_characters_in_component_name",
				FileUtils.getIllegalFilenameCharacters() );
			throw new IASDeploymentException( msg );
			// approach (2)
			//name = FileUtils.makeLegalFilename(name);
		}
	
		setEnv();
		checkForRedeploy();
		isVerified = true;