KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > com > sun > enterprise > tools > common > dd > webapp > ClassLoader


1 /**
2  * This generated bean class ClassLoader matches the schema element class-loader
3  *
4  * Generated on Tue Mar 02 19:59:37 PST 2004
5  */

6
7 package com.sun.enterprise.tools.common.dd.webapp;
8
9 import org.w3c.dom.*;
10 import org.netbeans.modules.schema2beans.*;
11 import java.beans.*;
12 import java.util.*;
13
14 // BEGIN_NOI18N
15

16 public class ClassLoader extends com.sun.enterprise.tools.common.dd.SunBaseBean
17 {
18
19     static Vector comparators = new Vector();
20
21     static public final String JavaDoc EXTRACLASSPATH = "ExtraClassPath"; // NOI18N
22
static public final String JavaDoc DELEGATE = "Delegate"; // NOI18N
23
static public final String JavaDoc DYNAMICRELOADINTERVAL = "DynamicReloadInterval"; // NOI18N
24
static public final String JavaDoc PROPERTY = "WebProperty"; // NOI18N
25

26     public ClassLoader() {
27         this(Common.USE_DEFAULT_VALUES);
28     }
29
30     public ClassLoader(int options)
31     {
32         super(comparators, new org.netbeans.modules.schema2beans.Version(1, 2, 0));
33         // Properties (see root bean comments for the bean graph)
34
this.createProperty("property", // NOI18N
35
PROPERTY,
36             Common.TYPE_0_N | Common.TYPE_BEAN | Common.TYPE_KEY,
37             WebProperty.class);
38         this.createAttribute(PROPERTY, "name", "Name",
39                         AttrProp.CDATA | AttrProp.REQUIRED,
40                         null, null);
41         this.createAttribute(PROPERTY, "value", "Value",
42                         AttrProp.CDATA | AttrProp.REQUIRED,
43                         null, null);
44         this.initialize(options);
45     }
46
47     // Setting the default values of the properties
48
void initialize(int options)
49     {
50
51     }
52
53     // This attribute is optional
54
public void setExtraClassPath(java.lang.String JavaDoc value) {
55         setAttributeValue(EXTRACLASSPATH, value);
56     }
57
58     //
59
public java.lang.String JavaDoc getExtraClassPath() {
60         return getAttributeValue(EXTRACLASSPATH);
61     }
62
63     // This attribute is mandatory
64
public void setDelegate(java.lang.String JavaDoc value) {
65         setAttributeValue(DELEGATE, value);
66     }
67
68     //
69
public java.lang.String JavaDoc getDelegate() {
70         return getAttributeValue(DELEGATE);
71     }
72
73     // This attribute is optional
74
public void setDynamicReloadInterval(java.lang.String JavaDoc value) {
75         setAttributeValue(DYNAMICRELOADINTERVAL, value);
76     }
77
78     //
79
public java.lang.String JavaDoc getDynamicReloadInterval() {
80         return getAttributeValue(DYNAMICRELOADINTERVAL);
81     }
82
83     // This attribute is an array, possibly empty
84
public void setWebProperty(int index, WebProperty value) {
85         this.setValue(PROPERTY, index, value);
86     }
87
88     //
89
public WebProperty getWebProperty(int index) {
90         return (WebProperty)this.getValue(PROPERTY, index);
91     }
92
93     // This attribute is an array, possibly empty
94
public void setWebProperty(WebProperty[] value) {
95         this.setValue(PROPERTY, value);
96     }
97
98     //
99
public WebProperty[] getWebProperty() {
100         return (WebProperty[])this.getValues(PROPERTY);
101     }
102
103     // Return the number of properties
104
public int sizeWebProperty() {
105         return this.size(PROPERTY);
106     }
107
108     // Add a new element returning its index in the list
109
public int addWebProperty(com.sun.enterprise.tools.common.dd.webapp.WebProperty value) {
110         return this.addValue(PROPERTY, value);
111     }
112
113     //
114
// Remove an element using its reference
115
// Returns the index the element had in the list
116
//
117
public int removeWebProperty(com.sun.enterprise.tools.common.dd.webapp.WebProperty value) {
118         return this.removeValue(PROPERTY, value);
119     }
120
121     //
122
public static void addComparator(org.netbeans.modules.schema2beans.BeanComparator c) {
123         comparators.add(c);
124     }
125
126     //
127
public static void removeComparator(org.netbeans.modules.schema2beans.BeanComparator c) {
128         comparators.remove(c);
129     }
130     public void validate() throws org.netbeans.modules.schema2beans.ValidateException {
131         boolean restrictionFailure = false;
132         // Validating property extraClassPath
133
if (getExtraClassPath() != null) {
134         }
135         // Validating property delegate
136
if (getDelegate() == null) {
137             throw new org.netbeans.modules.schema2beans.ValidateException("getDelegate() == null", "delegate", this); // NOI18N
138
}
139         // Validating property dynamicReloadInterval
140
if (getDynamicReloadInterval() != null) {
141         }
142         // Validating property webProperty
143
for (int _index = 0; _index < sizeWebProperty(); ++_index) {
144             com.sun.enterprise.tools.common.dd.webapp.WebProperty element = getWebProperty(_index);
145             if (element != null) {
146                 element.validate();
147             }
148         }
149     }
150
151     // Dump the content of this bean returning it as a String
152
public void dump(StringBuffer JavaDoc str, String JavaDoc indent){
153         String JavaDoc s;
154         Object JavaDoc o;
155         org.netbeans.modules.schema2beans.BaseBean n;
156         str.append(indent);
157         str.append("WebProperty["+this.sizeWebProperty()+"]"); // NOI18N
158
for(int i=0; i<this.sizeWebProperty(); i++)
159         {
160             str.append(indent+"\t");
161             str.append("#"+i+":");
162             n = (org.netbeans.modules.schema2beans.BaseBean) this.getWebProperty(i);
163             if (n != null)
164                 n.dump(str, indent + "\t"); // NOI18N
165
else
166                 str.append(indent+"\tnull"); // NOI18N
167
this.dumpAttributes(PROPERTY, i, str, indent);
168         }
169
170     }
171     public String JavaDoc dumpBeanNode(){
172         StringBuffer JavaDoc str = new StringBuffer JavaDoc();
173         str.append("ClassLoader\n"); // NOI18N
174
this.dump(str, "\n "); // NOI18N
175
return str.toString();
176     }}
177
178 // END_NOI18N
179

180
181 /*
182  * The contents of this file are subject to the terms
183  * of the Common Development and Distribution License
184  * (the License). You may not use this file except in
185  * compliance with the License.
186  *
187  * You can obtain a copy of the license at
188  * https://glassfish.dev.java.net/public/CDDLv1.0.html or
189  * glassfish/bootstrap/legal/CDDLv1.0.txt.
190  * See the License for the specific language governing
191  * permissions and limitations under the License.
192  *
193  * When distributing Covered Code, include this CDDL
194  * Header Notice in each file and include the License file
195  * at glassfish/bootstrap/legal/CDDLv1.0.txt.
196  * If applicable, add the following below the CDDL Header,
197  * with the fields enclosed by brackets [] replaced by
198  * you own identifying information:
199  * "Portions Copyrighted [year] [name of copyright owner]"
200  *
201  * Copyright 2006 Sun Microsystems, Inc. All rights reserved.
202  */

203
Popular Tags