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

DeployableObjectType

public class DeployableObjectType extends Object
author
bnevins
version

Fields Summary
public static final DeployableObjectType
APP
public static final DeployableObjectType
EJB
public static final DeployableObjectType
WEB
public static final DeployableObjectType
CONN
public static final DeployableObjectType
CAR
public static final DeployableObjectType
LCM
public static final DeployableObjectType
CMB
private final String
name
private final String
ddName
private final String
runtimeDD
private final String
extension
private final javax.enterprise.deploy.shared.ModuleType
jsr88Type
private static com.sun.enterprise.util.i18n.StringManager
localStrings
private static List
allTypes
Constructors Summary
private DeployableObjectType(String theName, String theDDName, String theRuntimeDD, String ext, javax.enterprise.deploy.shared.ModuleType type)


        name        = theName;
        ddName      = theDDName;
        runtimeDD   = theRuntimeDD;
        extension   = ext;
        jsr88Type   = type;
        allTypes.add(this);
   
Methods Summary
public javax.enterprise.deploy.shared.ModuleTypegetModuleType()

		return jsr88Type;
	
public booleanisAPP()

		return this == APP;
	
public booleanisCAR()

		return this == CAR;
	
public booleanisCMB()

		return this == CMB;
	
public booleanisCONN()

		return this == CONN;
	
public booleanisEJB()

		return this == EJB;
	
public booleanisLCM()

		return this == LCM;
	
public booleanisWEB()

		return this == WEB;
	
public static voidmain(java.lang.String[] args)

	
     
        allTypes = new ArrayList(7);
        APP  = new DeployableObjectType("Application",
                                        "META-INF/application.xml", 
                                        "META-INF/sun-application.xml",
                                        ".ear", ModuleType.EAR);
 
         WEB  = new DeployableObjectType("Web Module",
                                         "WEB-INF/web.xml",
                                         "WEB-INF/sun-web.xml",
                                         ".war", ModuleType.WAR);
 
         CONN = new DeployableObjectType("Connector Module",   
                                         "META-INF/ra.xml",
                                         "META-INF/sun-ra.xml",
                                         ".rar", ModuleType.RAR);
 
         CAR  = new DeployableObjectType("AppClient Module",   
                                         "META-INF/application-client.xml",  
                                         "META-INF/sun-application-client.xml",
                                         ".jar", ModuleType.CAR);

         EJB  = new DeployableObjectType("EJB Module",
                                         "META-INF/ejb-jar.xml",
                                         "META-INF/sun-ejb-jar.xml",
                                         ".jar", ModuleType.EJB);
 
         LCM  = new DeployableObjectType("Lifecycle Module",
                                         null,
                                         null,
                                         ".jar", XModuleType.LCM);
 
         CMB  = new DeployableObjectType("Custom MBean Module",
                                         null,
                                         null,
                                         ".jar", XModuleType.CMB);
 
   
		String[] files = new String[] { "pkgingEApp.ear", "foof.rar", "hello.war", "foo.jar", "nothere", "junk.ear",
			"ear", "ejb", "rar", "war"};
		
		for(int i = 0; i < files.length; i++)
		{
			File f = new File("C:/ias8samples/" + files[i]);
			
			try 
			{
				// used to display (f.getName() + " is a: " + valueOf(f));
			} 
			catch (Exception ex) 
			{
				ex.printStackTrace();
			}	
		}
	
public java.lang.StringtoString()

		return name;