KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > com > sun > enterprise > instance > ExceptionType


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 /*
25  * ExceptionType.java
26  *
27  * Created on July 8, 2002, 12:34 AM
28  *
29  * @author bnevins
30  * @version $Revision: 1.3 $
31  * <BR> <I>$Source: /cvs/glassfish/appserv-core/src/java/com/sun/enterprise/instance/ExceptionType.java,v $
32  *
33  * Copyright 2000-2001 by iPlanet/Sun Microsystems, Inc.,
34  * 901 San Antonio Road, Palo Alto, California, 94303, U.S.A.
35  * All rights reserved.
36  *
37  * This software is the confidential and proprietary information
38  * of iPlanet/Sun Microsystems, Inc. ("Confidential Information").
39  * You shall not disclose such Confidential Information and shall
40  * use it only in accordance with the terms of the license
41  * agreement you entered into with iPlanet/Sun Microsystems.
42  *
43  */

44
45 package com.sun.enterprise.instance;
46 import java.util.*;
47
48 class ExceptionType
49 {
50     private ExceptionType(String JavaDoc theKey, int theNumArgs)
51     {
52         assert theKey != null;
53         assert theNumArgs >= 0;
54         
55         key = theKey;
56         numArgs = theNumArgs;
57         allTypes.add(this);
58     }
59     
60     ///////////////////////////////////////////////////////////////////////////
61

62     String JavaDoc getString()
63     {
64         return key;
65     }
66     
67     ///////////////////////////////////////////////////////////////////////////
68

69     int getNumArgs()
70     {
71         return numArgs;
72     }
73     
74     ///////////////////////////////////////////////////////////////////////////
75

76     static ArrayList getAllTypes()
77     {
78         return allTypes;
79     }
80     
81     ///////////////////////////////////////////////////////////////////////////
82

83     // for testing:
84
private static ArrayList allTypes = new ArrayList();
85
86     static final ExceptionType FAIL_DD_LOAD = new ExceptionType("01", 1);
87     static final ExceptionType FAIL_DD_SAVE = new ExceptionType("02", 1);
88     static final ExceptionType APP_NOT_EXIST = new ExceptionType("03", 0);
89     static final ExceptionType BAD_REG = new ExceptionType("04", 0);
90     static final ExceptionType MISSING_SERVER_NODE = new ExceptionType("05", 0);
91     static final ExceptionType CANT_APPLY = new ExceptionType("06", 0);
92     static final ExceptionType UNSUPPORTED = new ExceptionType("07", 1);
93     static final ExceptionType NULL_INSTANCE_NAME = new ExceptionType("08", 0);
94     static final ExceptionType NULL_INSTANCE = new ExceptionType("09", 0);
95     static final ExceptionType INSTANCE_EXISTS = new ExceptionType("10", 1);
96     static final ExceptionType PORT_IN_USE = new ExceptionType("11", 1);
97     static final ExceptionType PORT_TAKEN = new ExceptionType("12", 0);
98     static final ExceptionType CANT_CREATE_ADMIN = new ExceptionType("13", 0);
99     static final ExceptionType NO_JAVA_HOME = new ExceptionType("14", 0);
100     static final ExceptionType NO_IMQ_HOME = new ExceptionType("15", 0);
101     static final ExceptionType NO_SUCH_INSTANCE = new ExceptionType("16", 1);
102     static final ExceptionType SERVER_NO_START = new ExceptionType("17", 0);
103     static final ExceptionType NO_RECEIVE_TOKENS = new ExceptionType("18", 0);
104     static final ExceptionType NO_SUCH_CON_MOD = new ExceptionType("19", 0);
105     static final ExceptionType BAD_CON_MOD_INFO = new ExceptionType("20", 0);
106     static final ExceptionType WRONG_MOD_INFO = new ExceptionType("21", 0);
107     static final ExceptionType NO_SUCH_EJB_MOD = new ExceptionType("22", 0);
108     static final ExceptionType BAD_EJB_MOD_INFO = new ExceptionType("23", 0);
109     static final ExceptionType IO_ERROR_LOADING_DD = new ExceptionType("24", 1);
110     static final ExceptionType IO_ERROR_SAVING_DD = new ExceptionType("25", 1);
111     static final ExceptionType ILLEGAL_PORT = new ExceptionType("26", 0);
112     static final ExceptionType ILLEGAL_RESTART = new ExceptionType("27", 0);
113     static final ExceptionType NULL_ARG = new ExceptionType("28", 0);
114     static final ExceptionType NO_INSTANCE_DIR = new ExceptionType("29", 2);
115     static final ExceptionType CANNOT_APPLY_CHANGES= new ExceptionType("30", 0);
116     static final ExceptionType BIZARRO_MESSAGE = new ExceptionType("31", 0);
117     static final ExceptionType NO_XML = new ExceptionType("32", 0);
118     static final ExceptionType NO_XML_BU = new ExceptionType("33", 0);
119     static final ExceptionType FROM_NOT_EXIST = new ExceptionType("34", 1);
120     static final ExceptionType FROM_IS_DIR = new ExceptionType("35", 1);
121     static final ExceptionType TO_READ_ONLY = new ExceptionType("36", 1);
122     static final ExceptionType TO_IS_DIR = new ExceptionType("37", 1);
123     static final ExceptionType FAILED_COPY = new ExceptionType("38", 3);
124     static final ExceptionType NULL_MODULE_TYPE = new ExceptionType("39", 0);
125     static final ExceptionType NO_SUCH_WEB_MOD = new ExceptionType("40", 0);
126     static final ExceptionType BAD_WEB_MOD_INFO = new ExceptionType("41", 0);
127     //static final ExceptionType = new ExceptionType("40", 0);
128
//static final ExceptionType = new ExceptionType("40", 0);
129
//static final ExceptionType = new ExceptionType("40", 0);
130
//static final ExceptionType = new ExceptionType("40", 0);
131
//static final ExceptionType = new ExceptionType("40", 0);
132
//static final ExceptionType = new ExceptionType("40", 0);
133

134     
135     private final String JavaDoc key;
136     private final int numArgs;
137
138     
139 }
140
141
142
143
Popular Tags