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

DeployerFactory

public class DeployerFactory extends Object
author
bnevins
version

Fields Summary
private static com.sun.enterprise.util.i18n.StringManager
localStrings
Constructors Summary
private DeployerFactory()


	  
	
	
Methods Summary
public static DeployergetAppDeployer(DeploymentRequest request)

		if(request.isDeploy())
		{
			return new AppDeployer(request);
		}
		else if(request.isReDeploy())
		{
			return new AppReDeployer(request);
		}
		else if(request.isUnDeploy())
		{
			return new AppUnDeployer(request);
		}
		else {
			String msg = localStrings.getString(
            "enterprise.deployment.backend.unknown_deployment_request_type" );
			throw new IASDeploymentException( msg );
		}
	
public static DeployergetDeployer(DeploymentRequest request)

		assert request != null;
		request.verify();
		
		if(request.isApplication())
			return getAppDeployer(request);
		else if(request.isEjbModule())
			return new EjbModuleDeployer(request);
		else if(request.isWebModule())
			return new WebModuleDeployer(request);
		else if(request.isConnectorModule())
			return new ConnectorModuleDeployer(request);
		else if (request.isAppClientModule())
		{
			if(request.isDirectory())
			{
				String msg = localStrings.getStringWithDefault
				(
					"enterprise.deployment.backend.DirDeployOfAppClient",
					"App Client Directory-Deployment not supported"
				);
				throw new IASDeploymentException(msg);
			}
			else
				return new AppClientModuleDeployer(request);	
		}
		else {
			String msg = localStrings.getString(
					"enterprise.deployment.backend.deployment_not_supported" );
			throw new IASDeploymentException( msg );
		}