KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > com > sun > enterprise > deployment > io > DescriptorList


1 /*
2  * The contents of this file are subject to the terms
3  * of the Common Development and Distribution License
4  * (the License). You may not use this file except in
5  * compliance with the License.
6  *
7  * You can obtain a copy of the license at
8  * https://glassfish.dev.java.net/public/CDDLv1.0.html or
9  * glassfish/bootstrap/legal/CDDLv1.0.txt.
10  * See the License for the specific language governing
11  * permissions and limitations under the License.
12  *
13  * When distributing Covered Code, include this CDDL
14  * Header Notice in each file and include the License file
15  * at glassfish/bootstrap/legal/CDDLv1.0.txt.
16  * If applicable, add the following below the CDDL Header,
17  * with the fields enclosed by brackets [] replaced by
18  * you own identifying information:
19  * "Portions Copyrighted [year] [name of copyright owner]"
20  *
21  * Copyright 2006 Sun Microsystems, Inc. All rights reserved.
22  */

23
24 package com.sun.enterprise.deployment.io;
25
26 import javax.enterprise.deploy.shared.ModuleType JavaDoc;
27
28 /**
29  * Repository of descriptors
30  * This class will evolve to provide a comprhensive list of
31  * descriptors for any given type of j2ee application or
32  * stand-alone module.
33  *
34  * @author Sreenivas Munnangi
35  */

36
37 public class DescriptorList {
38
39     public final static String JavaDoc [] earList = {
40         DescriptorConstants.APPLICATION_DD_ENTRY,
41         DescriptorConstants.S1AS_APPLICATION_DD_ENTRY
42     };
43
44     public final static String JavaDoc [] ejbList = {
45         DescriptorConstants.EJB_DD_ENTRY,
46         DescriptorConstants.S1AS_EJB_DD_ENTRY,
47         DescriptorConstants.S1AS_CMP_MAPPING_DD_ENTRY,
48         DescriptorConstants.EJB_WEBSERVICES_JAR_ENTRY
49     };
50
51     public final static String JavaDoc [] warList = {
52         DescriptorConstants.WEB_DD_ENTRY,
53         DescriptorConstants.S1AS_WEB_DD_ENTRY,
54         DescriptorConstants.WEB_WEBSERVICES_JAR_ENTRY,
55         DescriptorConstants.JAXRPC_JAR_ENTRY
56     };
57
58     public final static String JavaDoc [] rarList = {
59         DescriptorConstants.RAR_DD_ENTRY,
60         DescriptorConstants.S1AS_RAR_DD_ENTRY
61     };
62
63     public final static String JavaDoc [] carList = {
64         DescriptorConstants.APP_CLIENT_DD_ENTRY,
65         DescriptorConstants.S1AS_APP_CLIENT_DD_ENTRY
66     };
67
68     public final static String JavaDoc [] getDescriptorsList (ModuleType JavaDoc moduleType) {
69         if (moduleType == null) return null;
70         if (moduleType == ModuleType.EAR) {
71             return earList;
72         } else if (moduleType == ModuleType.EJB) {
73             return ejbList;
74         } else if (moduleType == ModuleType.WAR) {
75             return warList;
76         } else if (moduleType == ModuleType.RAR) {
77             return rarList;
78         } else if (moduleType == ModuleType.CAR) {
79             return carList;
80         }
81         return null;
82     }
83 }
84
Popular Tags