KickJava   Java API By Example, From Geeks To Geeks.

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


1 /**
2  * This generated bean class SunWebApp matches the schema element sun-web-app
3  *
4  * Generated on Mon May 24 12:22:25 PDT 2004
5  *
6  * This class matches the root element of the DTD,
7  * and is the root of the following bean graph:
8  *
9  * sun-web-app : SunWebApp
10  * [attr: error-url CDATA ]
11  * context-root : String?
12  * security-role-mapping : SecurityRoleMapping[0,n]
13  * role-name : String
14  * (
15  * | principal-name : String
16  * | group-name : String
17  * )[1,n]
18  * servlet : Servlet[0,n]
19  * servlet-name : String
20  * principal-name : String?
21  * webservice-endpoint : WebserviceEndpoint[0,n]
22  * port-component-name : String
23  * endpoint-address-uri : String?
24  * login-config : LoginConfig?
25  * auth-method : String
26  * transport-guarantee : String?
27  * service-qname : ServiceQname?
28  * namespaceURI : String
29  * localpart : String
30  * tie-class : String?
31  * servlet-impl-class : String?
32  * idempotent-url-pattern : Boolean[0,n]
33  * [attr: url-pattern CDATA #REQUIRED ]
34  * [attr: num-of-retries CDATA -1]
35  * EMPTY : String
36  * session-config : SessionConfig?
37  * session-manager : SessionManager?
38  * [attr: persistence-type CDATA memory]
39  * manager-properties : ManagerProperties?
40  * property : WebProperty[0,n]
41  * [attr: name CDATA #REQUIRED ]
42  * [attr: value CDATA #REQUIRED ]
43  * description : String?
44  * store-properties : StoreProperties?
45  * property : WebProperty[0,n]
46  * [attr: name CDATA #REQUIRED ]
47  * [attr: value CDATA #REQUIRED ]
48  * description : String?
49  * session-properties : SessionProperties?
50  * property : WebProperty[0,n]
51  * [attr: name CDATA #REQUIRED ]
52  * [attr: value CDATA #REQUIRED ]
53  * description : String?
54  * cookie-properties : CookieProperties?
55  * property : WebProperty[0,n]
56  * [attr: name CDATA #REQUIRED ]
57  * [attr: value CDATA #REQUIRED ]
58  * description : String?
59  * ejb-ref : EjbRef[0,n]
60  * ejb-ref-name : String
61  * jndi-name : String
62  * resource-ref : ResourceRef[0,n]
63  * res-ref-name : String
64  * jndi-name : String
65  * default-resource-principal : DefaultResourcePrincipal?
66  * name : String
67  * password : String
68  * resource-env-ref : ResourceEnvRef[0,n]
69  * resource-env-ref-name : String
70  * jndi-name : String
71  * service-ref : ServiceRef[0,n]
72  * service-ref-name : String
73  * port-info : PortInfo[0,n]
74  * service-endpoint-interface : String?
75  * wsdl-port : WsdlPort?
76  * namespaceURI : String
77  * localpart : String
78  * stub-property : StubProperty[0,n]
79  * name : String
80  * value : String
81  * call-property : CallProperty[0,n]
82  * name : String
83  * value : String
84  * call-property : CallProperty[0,n]
85  * name : String
86  * value : String
87  * wsdl-override : String?
88  * service-impl-class : String?
89  * service-qname : ServiceQname?
90  * namespaceURI : String
91  * localpart : String
92  * cache : Cache?
93  * [attr: max-entries CDATA 4096]
94  * [attr: timeout-in-seconds CDATA 30]
95  * [attr: enabled CDATA true]
96  * cache-helper : CacheHelper[0,n]
97  * [attr: name CDATA #REQUIRED ]
98  * [attr: class-name CDATA #REQUIRED ]
99  * property : WebProperty[0,n]
100  * [attr: name CDATA #REQUIRED ]
101  * [attr: value CDATA #REQUIRED ]
102  * description : String?
103  * default-helper : DefaultHelper?
104  * property : WebProperty[0,n]
105  * [attr: name CDATA #REQUIRED ]
106  * [attr: value CDATA #REQUIRED ]
107  * description : String?
108  * property : WebProperty[0,n]
109  * [attr: name CDATA #REQUIRED ]
110  * [attr: value CDATA #REQUIRED ]
111  * description : String?
112  * cache-mapping : CacheMapping[0,n]
113  * | servlet-name : String
114  * | url-pattern : String
115  * | cache-helper-ref : String
116  * | dispatcher : String[0,n]
117  * | timeout : String?
118  * | [attr: name CDATA #IMPLIED ]
119  * | [attr: scope CDATA request.attribute]
120  * | refresh-field : Boolean?
121  * | [attr: name CDATA #REQUIRED ]
122  * | [attr: scope CDATA request.parameter]
123  * | EMPTY : String
124  * | http-method : String[0,n]
125  * | key-field : Boolean[0,n]
126  * | [attr: name CDATA #REQUIRED ]
127  * | [attr: scope CDATA request.parameter]
128  * | EMPTY : String
129  * | constraint-field : ConstraintField[0,n]
130  * | [attr: name CDATA #REQUIRED ]
131  * | [attr: scope CDATA request.parameter]
132  * | [attr: cache-on-match CDATA true]
133  * | [attr: cache-on-match-failure CDATA false]
134  * | constraint-field-value : String[0,n]
135  * | [attr: match-expr CDATA equals]
136  * | [attr: cache-on-match CDATA true]
137  * | [attr: cache-on-match-failure CDATA false]
138  * class-loader : ClassLoader?
139  * [attr: extra-class-path CDATA #IMPLIED ]
140  * [attr: delegate CDATA true]
141  * [attr: dynamic-reload-interval CDATA #IMPLIED ]
142  * property : WebProperty[0,n]
143  * [attr: name CDATA #REQUIRED ]
144  * [attr: value CDATA #REQUIRED ]
145  * description : String?
146  * jsp-config : JspConfig?
147  * property : WebProperty[0,n]
148  * [attr: name CDATA #REQUIRED ]
149  * [attr: value CDATA #REQUIRED ]
150  * description : String?
151  * locale-charset-info : LocaleCharsetInfo?
152  * [attr: default-locale CDATA #IMPLIED ]
153  * locale-charset-map : LocaleCharsetMap[1,n]
154  * [attr: locale CDATA #REQUIRED ]
155  * [attr: agent CDATA #IMPLIED ]
156  * [attr: charset CDATA #REQUIRED ]
157  * description : String?
158  * parameter-encoding : Boolean?
159  * [attr: form-hint-field CDATA #IMPLIED ]
160  * [attr: default-charset CDATA #IMPLIED ]
161  * EMPTY : String
162  * parameter-encoding : Boolean?
163  * [attr: form-hint-field CDATA #IMPLIED ]
164  * [attr: default-charset CDATA #IMPLIED ]
165  * EMPTY : String
166  * property : WebProperty[0,n]
167  * [attr: name CDATA #REQUIRED ]
168  * [attr: value CDATA #REQUIRED ]
169  * description : String?
170  * message-destination : MessageDestination[0,n]
171  * message-destination-name : String
172  * jndi-name : String
173  * webservice-description : WebserviceDescription[0,n]
174  * webservice-description-name : String
175  * wsdl-publish-location : String?
176  *
177  */

178
179 package com.sun.enterprise.tools.common.dd.webapp;
180
181 import org.w3c.dom.*;
182 import org.netbeans.modules.schema2beans.*;
183 import java.beans.*;
184 import java.util.*;
185 import java.io.*;
186 import com.sun.enterprise.tools.common.dd.EjbRef;
187 import com.sun.enterprise.tools.common.dd.ResourceEnvRef;
188 import com.sun.enterprise.tools.common.dd.ResourceRef;
189 import com.sun.enterprise.tools.common.dd.ServiceRef;
190 import com.sun.enterprise.tools.common.dd.SecurityRoleMapping;
191 import com.sun.enterprise.tools.common.dd.MessageDestination;
192 import com.sun.enterprise.tools.common.dd.WebserviceDescription;
193
194 // BEGIN_NOI18N
195

196 public class SunWebApp extends com.sun.enterprise.tools.common.dd.SunBaseBean
197 {
198
199     static Vector comparators = new Vector();
200
201     static public final String JavaDoc ERRORURL = "ErrorUrl"; // NOI18N
202
static public final String JavaDoc CONTEXT_ROOT = "ContextRoot"; // NOI18N
203
static public final String JavaDoc SECURITY_ROLE_MAPPING = "SecurityRoleMapping"; // NOI18N
204
static public final String JavaDoc SERVLET = "Servlet"; // NOI18N
205
static public final String JavaDoc IDEMPOTENT_URL_PATTERN = "IdempotentUrlPattern"; // NOI18N
206
static public final String JavaDoc IDEMPOTENTURLPATTERNURLPATTERN = "IdempotentUrlPatternUrlPattern"; // NOI18N
207
static public final String JavaDoc IDEMPOTENTURLPATTERNNUMOFRETRIES = "IdempotentUrlPatternNumOfRetries"; // NOI18N
208
static public final String JavaDoc SESSION_CONFIG = "SessionConfig"; // NOI18N
209
static public final String JavaDoc EJB_REF = "EjbRef"; // NOI18N
210
static public final String JavaDoc RESOURCE_REF = "ResourceRef"; // NOI18N
211
static public final String JavaDoc RESOURCE_ENV_REF = "ResourceEnvRef"; // NOI18N
212
static public final String JavaDoc SERVICE_REF = "ServiceRef"; // NOI18N
213
static public final String JavaDoc CACHE = "Cache"; // NOI18N
214
static public final String JavaDoc CLASS_LOADER = "ClassLoader"; // NOI18N
215
static public final String JavaDoc JSP_CONFIG = "JspConfig"; // NOI18N
216
static public final String JavaDoc LOCALE_CHARSET_INFO = "LocaleCharsetInfo"; // NOI18N
217
static public final String JavaDoc PARAMETER_ENCODING = "ParameterEncoding"; // NOI18N
218
static public final String JavaDoc PARAMETERENCODINGFORMHINTFIELD = "ParameterEncodingFormHintField"; // NOI18N
219
static public final String JavaDoc PARAMETERENCODINGDEFAULTCHARSET = "ParameterEncodingDefaultCharset"; // NOI18N
220
static public final String JavaDoc PROPERTY = "WebProperty"; // NOI18N
221
static public final String JavaDoc MESSAGE_DESTINATION = "MessageDestination"; // NOI18N
222
static public final String JavaDoc WEBSERVICE_DESCRIPTION = "WebserviceDescription"; // NOI18N
223

224     public SunWebApp() throws org.netbeans.modules.schema2beans.Schema2BeansException {
225         this(null, Common.USE_DEFAULT_VALUES);
226     }
227
228     public SunWebApp(org.w3c.dom.Node JavaDoc doc, int options) throws org.netbeans.modules.schema2beans.Schema2BeansException {
229         this(Common.NO_DEFAULT_VALUES);
230         initFromNode(doc, options);
231     }
232     protected void initFromNode(org.w3c.dom.Node JavaDoc doc, int options) throws Schema2BeansException
233     {
234         if (doc == null)
235         {
236             doc = GraphManager.createRootElementNode("sun-web-app"); // NOI18N
237
if (doc == null)
238                 throw new Schema2BeansException(Common.getMessage(
239                     "CantCreateDOMRoot_msg", "sun-web-app"));
240         }
241         Node n = GraphManager.getElementNode("sun-web-app", doc); // NOI18N
242
if (n == null)
243             throw new Schema2BeansException(Common.getMessage(
244                 "DocRootNotInDOMGraph_msg", "sun-web-app", doc.getFirstChild().getNodeName()));
245
246         this.graphManager.setXmlDocument(doc);
247
248         // Entry point of the createBeans() recursive calls
249
this.createBean(n, this.graphManager());
250         this.initialize(options);
251     }
252     public SunWebApp(int options)
253     {
254         super(comparators, new org.netbeans.modules.schema2beans.Version(1, 2, 0));
255         initOptions(options);
256     }
257     protected void initOptions(int options)
258     {
259         // The graph manager is allocated in the bean root
260
this.graphManager = new GraphManager(this);
261         this.createRoot("sun-web-app", "SunWebApp", // NOI18N
262
Common.TYPE_1 | Common.TYPE_BEAN, SunWebApp.class);
263
264         // Properties (see root bean comments for the bean graph)
265
this.createProperty("context-root", // NOI18N
266
CONTEXT_ROOT,
267             Common.TYPE_0_1 | Common.TYPE_STRING | Common.TYPE_KEY,
268             String JavaDoc.class);
269         this.createProperty("security-role-mapping", // NOI18N
270
SECURITY_ROLE_MAPPING,
271             Common.TYPE_0_N | Common.TYPE_BEAN | Common.TYPE_KEY,
272             SecurityRoleMapping.class);
273         this.createProperty("servlet", // NOI18N
274
SERVLET,
275             Common.TYPE_0_N | Common.TYPE_BEAN | Common.TYPE_KEY,
276             Servlet.class);
277         this.createProperty("idempotent-url-pattern", // NOI18N
278
IDEMPOTENT_URL_PATTERN,
279             Common.TYPE_0_N | Common.TYPE_BOOLEAN | Common.TYPE_KEY,
280             Boolean JavaDoc.class);
281         this.createAttribute(IDEMPOTENT_URL_PATTERN, "url-pattern", "UrlPattern",
282                         AttrProp.CDATA | AttrProp.REQUIRED,
283                         null, null);
284         this.createAttribute(IDEMPOTENT_URL_PATTERN, "num-of-retries", "NumOfRetries",
285                         AttrProp.CDATA,
286                         null, "-1");
287         this.createProperty("session-config", // NOI18N
288
SESSION_CONFIG,
289             Common.TYPE_0_1 | Common.TYPE_BEAN | Common.TYPE_KEY,
290             SessionConfig.class);
291         this.createProperty("ejb-ref", // NOI18N
292
EJB_REF,
293             Common.TYPE_0_N | Common.TYPE_BEAN | Common.TYPE_KEY,
294             EjbRef.class);
295         this.createProperty("resource-ref", // NOI18N
296
RESOURCE_REF,
297             Common.TYPE_0_N | Common.TYPE_BEAN | Common.TYPE_KEY,
298             ResourceRef.class);
299         this.createProperty("resource-env-ref", // NOI18N
300
RESOURCE_ENV_REF,
301             Common.TYPE_0_N | Common.TYPE_BEAN | Common.TYPE_KEY,
302             ResourceEnvRef.class);
303         this.createProperty("service-ref", // NOI18N
304
SERVICE_REF,
305             Common.TYPE_0_N | Common.TYPE_BEAN | Common.TYPE_KEY,
306             ServiceRef.class);
307         this.createProperty("cache", // NOI18N
308
CACHE,
309             Common.TYPE_0_1 | Common.TYPE_BEAN | Common.TYPE_KEY,
310             Cache.class);
311         this.createAttribute(CACHE, "max-entries", "MaxEntries",
312                         AttrProp.CDATA,
313                         null, "4096");
314         this.createAttribute(CACHE, "timeout-in-seconds", "TimeoutInSeconds",
315                         AttrProp.CDATA,
316                         null, "30");
317         this.createAttribute(CACHE, "enabled", "Enabled",
318                         AttrProp.CDATA,
319                         null, "true");
320         this.createProperty("class-loader", // NOI18N
321
CLASS_LOADER,
322             Common.TYPE_0_1 | Common.TYPE_BEAN | Common.TYPE_KEY,
323             ClassLoader JavaDoc.class);
324         this.createAttribute(CLASS_LOADER, "extra-class-path", "ExtraClassPath",
325                         AttrProp.CDATA | AttrProp.IMPLIED,
326                         null, null);
327         this.createAttribute(CLASS_LOADER, "delegate", "Delegate",
328                         AttrProp.CDATA,
329                         null, "true");
330         this.createAttribute(CLASS_LOADER, "dynamic-reload-interval", "DynamicReloadInterval",
331                         AttrProp.CDATA | AttrProp.IMPLIED,
332                         null, null);
333         this.createProperty("jsp-config", // NOI18N
334
JSP_CONFIG,
335             Common.TYPE_0_1 | Common.TYPE_BEAN | Common.TYPE_KEY,
336             JspConfig.class);
337         this.createProperty("locale-charset-info", // NOI18N
338
LOCALE_CHARSET_INFO,
339             Common.TYPE_0_1 | Common.TYPE_BEAN | Common.TYPE_KEY,
340             LocaleCharsetInfo.class);
341         this.createAttribute(LOCALE_CHARSET_INFO, "default-locale", "DefaultLocale",
342                         AttrProp.CDATA | AttrProp.IMPLIED,
343                         null, null);
344         this.createProperty("parameter-encoding", // NOI18N
345
PARAMETER_ENCODING,
346             Common.TYPE_0_1 | Common.TYPE_BOOLEAN | Common.TYPE_KEY,
347             Boolean JavaDoc.class);
348         this.createAttribute(PARAMETER_ENCODING, "form-hint-field", "FormHintField",
349                         AttrProp.CDATA | AttrProp.IMPLIED,
350                         null, null);
351         this.createAttribute(PARAMETER_ENCODING, "default-charset", "DefaultCharset",
352                         AttrProp.CDATA | AttrProp.IMPLIED,
353                         null, null);
354         this.createProperty("property", // NOI18N
355
PROPERTY,
356             Common.TYPE_0_N | Common.TYPE_BEAN | Common.TYPE_KEY,
357             WebProperty.class);
358         this.createAttribute(PROPERTY, "name", "Name",
359                         AttrProp.CDATA | AttrProp.REQUIRED,
360                         null, null);
361         this.createAttribute(PROPERTY, "value", "Value",
362                         AttrProp.CDATA | AttrProp.REQUIRED,
363                         null, null);
364         this.createProperty("message-destination", // NOI18N
365
MESSAGE_DESTINATION,
366             Common.TYPE_0_N | Common.TYPE_BEAN | Common.TYPE_KEY,
367             MessageDestination.class);
368         this.createProperty("webservice-description", // NOI18N
369
WEBSERVICE_DESCRIPTION,
370             Common.TYPE_0_N | Common.TYPE_BEAN | Common.TYPE_KEY,
371             WebserviceDescription.class);
372         this.createAttribute("error-url", "ErrorUrl",
373                         AttrProp.CDATA,
374                         null, "");
375         this.initialize(options);
376     }
377
378     // Setting the default values of the properties
379
void initialize(int options)
380     {
381             
382     }
383
384     // This attribute is mandatory
385
public void setErrorUrl(java.lang.String JavaDoc value) {
386         setAttributeValue(ERRORURL, value);
387     }
388
389     //
390
public java.lang.String JavaDoc getErrorUrl() {
391         return getAttributeValue(ERRORURL);
392     }
393
394     // This attribute is optional
395
public void setContextRoot(String JavaDoc value) {
396         this.setValue(CONTEXT_ROOT, value);
397     }
398
399     //
400
public String JavaDoc getContextRoot() {
401         return (String JavaDoc)this.getValue(CONTEXT_ROOT);
402     }
403
404     // This attribute is an array, possibly empty
405
public void setSecurityRoleMapping(int index, SecurityRoleMapping value) {
406         this.setValue(SECURITY_ROLE_MAPPING, index, value);
407     }
408
409     //
410
public SecurityRoleMapping getSecurityRoleMapping(int index) {
411         return (SecurityRoleMapping)this.getValue(SECURITY_ROLE_MAPPING, index);
412     }
413
414     // This attribute is an array, possibly empty
415
public void setSecurityRoleMapping(SecurityRoleMapping[] value) {
416         this.setValue(SECURITY_ROLE_MAPPING, value);
417     }
418
419     //
420
public SecurityRoleMapping[] getSecurityRoleMapping() {
421         return (SecurityRoleMapping[])this.getValues(SECURITY_ROLE_MAPPING);
422     }
423
424     // Return the number of properties
425
public int sizeSecurityRoleMapping() {
426         return this.size(SECURITY_ROLE_MAPPING);
427     }
428
429     // Add a new element returning its index in the list
430
public int addSecurityRoleMapping(SecurityRoleMapping value) {
431         return this.addValue(SECURITY_ROLE_MAPPING, value);
432     }
433
434     //
435
// Remove an element using its reference
436
// Returns the index the element had in the list
437
//
438
public int removeSecurityRoleMapping(SecurityRoleMapping value) {
439         return this.removeValue(SECURITY_ROLE_MAPPING, value);
440     }
441
442     // This attribute is an array, possibly empty
443
public void setServlet(int index, Servlet value) {
444         this.setValue(SERVLET, index, value);
445     }
446
447     //
448
public Servlet getServlet(int index) {
449         return (Servlet)this.getValue(SERVLET, index);
450     }
451
452     // This attribute is an array, possibly empty
453
public void setServlet(Servlet[] value) {
454         this.setValue(SERVLET, value);
455     }
456
457     //
458
public Servlet[] getServlet() {
459         return (Servlet[])this.getValues(SERVLET);
460     }
461
462     // Return the number of properties
463
public int sizeServlet() {
464         return this.size(SERVLET);
465     }
466
467     // Add a new element returning its index in the list
468
public int addServlet(com.sun.enterprise.tools.common.dd.webapp.Servlet value) {
469         return this.addValue(SERVLET, value);
470     }
471
472     //
473
// Remove an element using its reference
474
// Returns the index the element had in the list
475
//
476
public int removeServlet(com.sun.enterprise.tools.common.dd.webapp.Servlet value) {
477         return this.removeValue(SERVLET, value);
478     }
479
480     // This attribute is an array, possibly empty
481
public void setIdempotentUrlPattern(int index, boolean value) {
482         this.setValue(IDEMPOTENT_URL_PATTERN, index, (value ? java.lang.Boolean.TRUE : java.lang.Boolean.FALSE));
483     }
484
485     //
486
public boolean isIdempotentUrlPattern(int index) {
487         Boolean JavaDoc ret = (Boolean JavaDoc)this.getValue(IDEMPOTENT_URL_PATTERN, index);
488         if (ret == null)
489             ret = (Boolean JavaDoc)Common.defaultScalarValue(Common.TYPE_BOOLEAN);
490         return ((java.lang.Boolean JavaDoc)ret).booleanValue();
491     }
492
493     // This attribute is an array, possibly empty
494
public void setIdempotentUrlPattern(boolean[] value) {
495         Boolean JavaDoc[] values = null;
496         if (value != null)
497         {
498             values = new Boolean JavaDoc[value.length];
499             for (int i=0; i<value.length; i++)
500                 values[i] = new Boolean JavaDoc(value[i]);
501         }
502         this.setValue(IDEMPOTENT_URL_PATTERN, values);
503     }
504
505     //
506
public boolean[] getIdempotentUrlPattern() {
507         boolean[] ret = null;
508         Boolean JavaDoc[] values = (Boolean JavaDoc[])this.getValues(IDEMPOTENT_URL_PATTERN);
509         if (values != null)
510         {
511             ret = new boolean[values.length];
512             for (int i=0; i<values.length; i++)
513                 ret[i] = values[i].booleanValue();
514         }
515         return ret;
516     }
517
518     // Return the number of properties
519
public int sizeIdempotentUrlPattern() {
520         return this.size(IDEMPOTENT_URL_PATTERN);
521     }
522
523     // Add a new element returning its index in the list
524
public int addIdempotentUrlPattern(boolean value) {
525         return this.addValue(IDEMPOTENT_URL_PATTERN, (value ? java.lang.Boolean.TRUE : java.lang.Boolean.FALSE));
526     }
527
528     //
529
// Remove an element using its reference
530
// Returns the index the element had in the list
531
//
532
public int removeIdempotentUrlPattern(boolean value) {
533         return this.removeValue(IDEMPOTENT_URL_PATTERN, (value ? java.lang.Boolean.TRUE : java.lang.Boolean.FALSE));
534     }
535
536     //
537
// Remove an element using its index
538
//
539
public void removeIdempotentUrlPattern(int index) {
540         this.removeValue(IDEMPOTENT_URL_PATTERN, index);
541     }
542
543     // This attribute is an array, possibly empty
544
public void setIdempotentUrlPatternUrlPattern(int index, java.lang.String JavaDoc value) {
545         // Make sure we've got a place to put this attribute.
546
if (size(IDEMPOTENT_URL_PATTERN) == 0) {
547             addValue(IDEMPOTENT_URL_PATTERN, "");
548         }
549         setAttributeValue(IDEMPOTENT_URL_PATTERN, index, "UrlPattern", value);
550     }
551
552     //
553
public java.lang.String JavaDoc getIdempotentUrlPatternUrlPattern(int index) {
554         // If our element does not exist, then the attribute does not exist.
555
if (size(IDEMPOTENT_URL_PATTERN) == 0) {
556             return null;
557         } else {
558             return getAttributeValue(IDEMPOTENT_URL_PATTERN, index, "UrlPattern");
559         }
560     }
561
562     // This attribute is an array, possibly empty
563
public void setIdempotentUrlPatternNumOfRetries(int index, java.lang.String JavaDoc value) {
564         // Make sure we've got a place to put this attribute.
565
if (size(IDEMPOTENT_URL_PATTERN) == 0) {
566             addValue(IDEMPOTENT_URL_PATTERN, "");
567         }
568         setAttributeValue(IDEMPOTENT_URL_PATTERN, index, "NumOfRetries", value);
569     }
570
571     //
572
public java.lang.String JavaDoc getIdempotentUrlPatternNumOfRetries(int index) {
573         // If our element does not exist, then the attribute does not exist.
574
if (size(IDEMPOTENT_URL_PATTERN) == 0) {
575             return null;
576         } else {
577             return getAttributeValue(IDEMPOTENT_URL_PATTERN, index, "NumOfRetries");
578         }
579     }
580
581     // This attribute is optional
582
public void setSessionConfig(SessionConfig value) {
583         this.setValue(SESSION_CONFIG, value);
584     }
585
586     //
587
public SessionConfig getSessionConfig() {
588         return (SessionConfig)this.getValue(SESSION_CONFIG);
589     }
590
591     // This attribute is an array, possibly empty
592
public void setEjbRef(int index, EjbRef value) {
593         this.setValue(EJB_REF, index, value);
594     }
595
596     //
597
public EjbRef getEjbRef(int index) {
598         return (EjbRef)this.getValue(EJB_REF, index);
599     }
600
601     // This attribute is an array, possibly empty
602
public void setEjbRef(EjbRef[] value) {
603         this.setValue(EJB_REF, value);
604     }
605
606     //
607
public EjbRef[] getEjbRef() {
608         return (EjbRef[])this.getValues(EJB_REF);
609     }
610
611     // Return the number of properties
612
public int sizeEjbRef() {
613         return this.size(EJB_REF);
614     }
615
616     // Add a new element returning its index in the list
617
public int addEjbRef(EjbRef value) {
618         return this.addValue(EJB_REF, value);
619     }
620
621     //
622
// Remove an element using its reference
623
// Returns the index the element had in the list
624
//
625
public int removeEjbRef(EjbRef value) {
626         return this.removeValue(EJB_REF, value);
627     }
628
629     // This attribute is an array, possibly empty
630
public void setResourceRef(int index, ResourceRef value) {
631         this.setValue(RESOURCE_REF, index, value);
632     }
633
634     //
635
public ResourceRef getResourceRef(int index) {
636         return (ResourceRef)this.getValue(RESOURCE_REF, index);
637     }
638
639     // This attribute is an array, possibly empty
640
public void setResourceRef(ResourceRef[] value) {
641         this.setValue(RESOURCE_REF, value);
642     }
643
644     //
645
public ResourceRef[] getResourceRef() {
646         return (ResourceRef[])this.getValues(RESOURCE_REF);
647     }
648
649     // Return the number of properties
650
public int sizeResourceRef() {
651         return this.size(RESOURCE_REF);
652     }
653
654     // Add a new element returning its index in the list
655
public int addResourceRef(ResourceRef value) {
656         return this.addValue(RESOURCE_REF, value);
657     }
658
659     //
660
// Remove an element using its reference
661
// Returns the index the element had in the list
662
//
663
public int removeResourceRef(ResourceRef value) {
664         return this.removeValue(RESOURCE_REF, value);
665     }
666
667     // This attribute is an array, possibly empty
668
public void setResourceEnvRef(int index, ResourceEnvRef value) {
669         this.setValue(RESOURCE_ENV_REF, index, value);
670     }
671
672     //
673
public ResourceEnvRef getResourceEnvRef(int index) {
674         return (ResourceEnvRef)this.getValue(RESOURCE_ENV_REF, index);
675     }
676
677     // This attribute is an array, possibly empty
678
public void setResourceEnvRef(ResourceEnvRef[] value) {
679         this.setValue(RESOURCE_ENV_REF, value);
680     }
681
682     //
683
public ResourceEnvRef[] getResourceEnvRef() {
684         return (ResourceEnvRef[])this.getValues(RESOURCE_ENV_REF);
685     }
686
687     // Return the number of properties
688
public int sizeResourceEnvRef() {
689         return this.size(RESOURCE_ENV_REF);
690     }
691
692     // Add a new element returning its index in the list
693
public int addResourceEnvRef(ResourceEnvRef value) {
694         return this.addValue(RESOURCE_ENV_REF, value);
695     }
696
697     //
698
// Remove an element using its reference
699
// Returns the index the element had in the list
700
//
701
public int removeResourceEnvRef(ResourceEnvRef value) {
702         return this.removeValue(RESOURCE_ENV_REF, value);
703     }
704
705     // This attribute is an array, possibly empty
706
public void setServiceRef(int index, ServiceRef value) {
707         this.setValue(SERVICE_REF, index, value);
708     }
709
710     //
711
public ServiceRef getServiceRef(int index) {
712         return (ServiceRef)this.getValue(SERVICE_REF, index);
713     }
714
715     // This attribute is an array, possibly empty
716
public void setServiceRef(ServiceRef[] value) {
717         this.setValue(SERVICE_REF, value);
718     }
719
720     //
721
public ServiceRef[] getServiceRef() {
722         return (ServiceRef[])this.getValues(SERVICE_REF);
723     }
724
725     // Return the number of properties
726
public int sizeServiceRef() {
727         return this.size(SERVICE_REF);
728     }
729
730     // Add a new element returning its index in the list
731
public int addServiceRef(ServiceRef value) {
732         return this.addValue(SERVICE_REF, value);
733     }
734
735     //
736
// Remove an element using its reference
737
// Returns the index the element had in the list
738
//
739
public int removeServiceRef(ServiceRef value) {
740         return this.removeValue(SERVICE_REF, value);
741     }
742
743     // This attribute is optional
744
public void setCache(Cache value) {
745         this.setValue(CACHE, value);
746     }
747
748     //
749
public Cache getCache() {
750         return (Cache)this.getValue(CACHE);
751     }
752
753     // This attribute is optional
754
public void setClassLoader(ClassLoader JavaDoc value) {
755         this.setValue(CLASS_LOADER, value);
756     }
757
758     //
759
public ClassLoader JavaDoc getClassLoader() {
760         return (ClassLoader JavaDoc)this.getValue(CLASS_LOADER);
761     }
762
763     // This attribute is optional
764
public void setJspConfig(JspConfig value) {
765         this.setValue(JSP_CONFIG, value);
766     }
767
768     //
769
public JspConfig getJspConfig() {
770         return (JspConfig)this.getValue(JSP_CONFIG);
771     }
772
773     // This attribute is optional
774
public void setLocaleCharsetInfo(LocaleCharsetInfo value) {
775         this.setValue(LOCALE_CHARSET_INFO, value);
776     }
777
778     //
779
public LocaleCharsetInfo getLocaleCharsetInfo() {
780         return (LocaleCharsetInfo)this.getValue(LOCALE_CHARSET_INFO);
781     }
782
783     // This attribute is optional
784
public void setParameterEncoding(boolean value) {
785         this.setValue(PARAMETER_ENCODING, (value ? java.lang.Boolean.TRUE : java.lang.Boolean.FALSE));
786     }
787
788     //
789
public boolean isParameterEncoding() {
790         Boolean JavaDoc ret = (Boolean JavaDoc)this.getValue(PARAMETER_ENCODING);
791         if (ret == null)
792             ret = (Boolean JavaDoc)Common.defaultScalarValue(Common.TYPE_BOOLEAN);
793         return ((java.lang.Boolean JavaDoc)ret).booleanValue();
794     }
795
796     // This attribute is optional
797
public void setParameterEncodingFormHintField(java.lang.String JavaDoc value) {
798         // Make sure we've got a place to put this attribute.
799
if (size(PARAMETER_ENCODING) == 0) {
800             setValue(PARAMETER_ENCODING, "");
801         }
802         setAttributeValue(PARAMETER_ENCODING, "FormHintField", value);
803     }
804
805     //
806
public java.lang.String JavaDoc getParameterEncodingFormHintField() {
807         // If our element does not exist, then the attribute does not exist.
808
if (size(PARAMETER_ENCODING) == 0) {
809             return null;
810         } else {
811             return getAttributeValue(PARAMETER_ENCODING, "FormHintField");
812         }
813     }
814
815     // This attribute is optional
816
public void setParameterEncodingDefaultCharset(java.lang.String JavaDoc value) {
817         // Make sure we've got a place to put this attribute.
818
if (size(PARAMETER_ENCODING) == 0) {
819             setValue(PARAMETER_ENCODING, "");
820         }
821         setAttributeValue(PARAMETER_ENCODING, "DefaultCharset", value);
822     }
823
824     //
825
public java.lang.String JavaDoc getParameterEncodingDefaultCharset() {
826         // If our element does not exist, then the attribute does not exist.
827
if (size(PARAMETER_ENCODING) == 0) {
828             return null;
829         } else {
830             return getAttributeValue(PARAMETER_ENCODING, "DefaultCharset");
831         }
832     }
833
834     // This attribute is an array, possibly empty
835
public void setWebProperty(int index, WebProperty value) {
836         this.setValue(PROPERTY, index, value);
837     }
838
839     //
840
public WebProperty getWebProperty(int index) {
841         return (WebProperty)this.getValue(PROPERTY, index);
842     }
843
844     // This attribute is an array, possibly empty
845
public void setWebProperty(WebProperty[] value) {
846         this.setValue(PROPERTY, value);
847     }
848
849     //
850
public WebProperty[] getWebProperty() {
851         return (WebProperty[])this.getValues(PROPERTY);
852     }
853
854     // Return the number of properties
855
public int sizeWebProperty() {
856         return this.size(PROPERTY);
857     }
858
859     // Add a new element returning its index in the list
860
public int addWebProperty(com.sun.enterprise.tools.common.dd.webapp.WebProperty value) {
861         return this.addValue(PROPERTY, value);
862     }
863
864     //
865
// Remove an element using its reference
866
// Returns the index the element had in the list
867
//
868
public int removeWebProperty(com.sun.enterprise.tools.common.dd.webapp.WebProperty value) {
869         return this.removeValue(PROPERTY, value);
870     }
871
872     // This attribute is an array, possibly empty
873
public void setMessageDestination(int index, MessageDestination value) {
874         this.setValue(MESSAGE_DESTINATION, index, value);
875     }
876
877     //
878
public MessageDestination getMessageDestination(int index) {
879         return (MessageDestination)this.getValue(MESSAGE_DESTINATION, index);
880     }
881
882     // This attribute is an array, possibly empty
883
public void setMessageDestination(MessageDestination[] value) {
884         this.setValue(MESSAGE_DESTINATION, value);
885     }
886
887     //
888
public MessageDestination[] getMessageDestination() {
889         return (MessageDestination[])this.getValues(MESSAGE_DESTINATION);
890     }
891
892     // Return the number of properties
893
public int sizeMessageDestination() {
894         return this.size(MESSAGE_DESTINATION);
895     }
896
897     // Add a new element returning its index in the list
898
public int addMessageDestination(MessageDestination value) {
899         return this.addValue(MESSAGE_DESTINATION, value);
900     }
901
902     //
903
// Remove an element using its reference
904
// Returns the index the element had in the list
905
//
906
public int removeMessageDestination(MessageDestination value) {
907         return this.removeValue(MESSAGE_DESTINATION, value);
908     }
909
910     // This attribute is an array, possibly empty
911
public void setWebserviceDescription(int index, WebserviceDescription value) {
912         this.setValue(WEBSERVICE_DESCRIPTION, index, value);
913     }
914
915     //
916
public WebserviceDescription getWebserviceDescription(int index) {
917         return (WebserviceDescription)this.getValue(WEBSERVICE_DESCRIPTION, index);
918     }
919
920     // This attribute is an array, possibly empty
921
public void setWebserviceDescription(WebserviceDescription[] value) {
922         this.setValue(WEBSERVICE_DESCRIPTION, value);
923     }
924
925     //
926
public WebserviceDescription[] getWebserviceDescription() {
927         return (WebserviceDescription[])this.getValues(WEBSERVICE_DESCRIPTION);
928     }
929
930     // Return the number of properties
931
public int sizeWebserviceDescription() {
932         return this.size(WEBSERVICE_DESCRIPTION);
933     }
934
935     // Add a new element returning its index in the list
936
public int addWebserviceDescription(WebserviceDescription value) {
937         return this.addValue(WEBSERVICE_DESCRIPTION, value);
938     }
939
940     //
941
// Remove an element using its reference
942
// Returns the index the element had in the list
943
//
944
public int removeWebserviceDescription(WebserviceDescription value) {
945         return this.removeValue(WEBSERVICE_DESCRIPTION, value);
946     }
947
948     //
949
public static void addComparator(org.netbeans.modules.schema2beans.BeanComparator c) {
950         comparators.add(c);
951     }
952
953     //
954
public static void removeComparator(org.netbeans.modules.schema2beans.BeanComparator c) {
955         comparators.remove(c);
956     }
957     //
958
// This method returns the root of the bean graph
959
// Each call creates a new bean graph from the specified DOM graph
960
//
961
public static SunWebApp createGraph(org.w3c.dom.Node JavaDoc doc) throws org.netbeans.modules.schema2beans.Schema2BeansException {
962         return new SunWebApp(doc, Common.NO_DEFAULT_VALUES);
963     }
964
965     public static SunWebApp createGraph(java.io.InputStream JavaDoc in) throws org.netbeans.modules.schema2beans.Schema2BeansException {
966         return createGraph(in, false);
967     }
968
969     public static SunWebApp createGraph(java.io.InputStream JavaDoc in, boolean validate) throws org.netbeans.modules.schema2beans.Schema2BeansException {
970         Document doc = GraphManager.createXmlDocument(in, validate);
971         return createGraph(doc);
972     }
973
974     //
975
// This method returns the root for a new empty bean graph
976
//
977
public static SunWebApp createGraph() {
978         try {
979             return new SunWebApp();
980         }
981         catch (Schema2BeansException e) {
982             throw new RuntimeException JavaDoc(e.getMessage());
983         }
984     }
985
986     public void validate() throws org.netbeans.modules.schema2beans.ValidateException {
987         boolean restrictionFailure = false;
988         // Validating property errorUrl
989
if (getErrorUrl() == null) {
990             throw new org.netbeans.modules.schema2beans.ValidateException("getErrorUrl() == null", "errorUrl", this); // NOI18N
991
}
992         // Validating property contextRoot
993
if (getContextRoot() != null) {
994         }
995         // Validating property securityRoleMapping
996
for (int _index = 0; _index < sizeSecurityRoleMapping(); ++_index) {
997             SecurityRoleMapping element = getSecurityRoleMapping(_index);
998             if (element != null) {
999                 element.validate();
1000            }
1001        }
1002        // Validating property servlet
1003
for (int _index = 0; _index < sizeServlet(); ++_index) {
1004            com.sun.enterprise.tools.common.dd.webapp.Servlet element = getServlet(_index);
1005            if (element != null) {
1006                element.validate();
1007            }
1008        }
1009        // Validating property idempotentUrlPattern
1010
for (int _index = 0; _index < sizeIdempotentUrlPattern();
1011            ++_index) {
1012            boolean element = isIdempotentUrlPattern(_index);
1013        }
1014        // Validating property idempotentUrlPatternUrlPattern
1015
// Validating property idempotentUrlPatternNumOfRetries
1016
// Validating property sessionConfig
1017
if (getSessionConfig() != null) {
1018            getSessionConfig().validate();
1019        }
1020        // Validating property ejbRef
1021
for (int _index = 0; _index < sizeEjbRef(); ++_index) {
1022            EjbRef element = getEjbRef(_index);
1023            if (element != null) {
1024                element.validate();
1025            }
1026        }
1027        // Validating property resourceRef
1028
for (int _index = 0; _index < sizeResourceRef(); ++_index) {
1029            ResourceRef element = getResourceRef(_index);
1030            if (element != null) {
1031                element.validate();
1032            }
1033        }
1034        // Validating property resourceEnvRef
1035
for (int _index = 0; _index < sizeResourceEnvRef(); ++_index) {
1036            ResourceEnvRef element = getResourceEnvRef(_index);
1037            if (element != null) {
1038                element.validate();
1039            }
1040        }
1041        // Validating property serviceRef
1042
for (int _index = 0; _index < sizeServiceRef(); ++_index) {
1043            ServiceRef element = getServiceRef(_index);
1044            if (element != null) {
1045                element.validate();
1046            }
1047        }
1048        // Validating property cache
1049
if (getCache() != null) {
1050            getCache().validate();
1051        }
1052        // Validating property classLoader
1053
if (getClassLoader() != null) {
1054            getClassLoader().validate();
1055        }
1056        // Validating property jspConfig
1057
if (getJspConfig() != null) {
1058            getJspConfig().validate();
1059        }
1060        // Validating property localeCharsetInfo
1061
if (getLocaleCharsetInfo() != null) {
1062            getLocaleCharsetInfo().validate();
1063        }
1064        // Validating property parameterEncoding
1065
// Validating property parameterEncodingFormHintField
1066
if (getParameterEncodingFormHintField() != null) {
1067        }
1068        // Validating property parameterEncodingDefaultCharset
1069
if (getParameterEncodingDefaultCharset() != null) {
1070        }
1071        // Validating property webProperty
1072
for (int _index = 0; _index < sizeWebProperty(); ++_index) {
1073            com.sun.enterprise.tools.common.dd.webapp.WebProperty element = getWebProperty(_index);
1074            if (element != null) {
1075                element.validate();
1076            }
1077        }
1078        // Validating property messageDestination
1079
for (int _index = 0; _index < sizeMessageDestination(); ++_index) {
1080            MessageDestination element = getMessageDestination(_index);
1081            if (element != null) {
1082                element.validate();
1083            }
1084        }
1085        // Validating property webserviceDescription
1086
for (int _index = 0; _index < sizeWebserviceDescription();
1087            ++_index) {
1088            WebserviceDescription element = getWebserviceDescription(_index);
1089            if (element != null) {
1090                element.validate();
1091            }
1092        }
1093    }
1094
1095    // Special serializer: output XML as serialization
1096
private void writeObject(java.io.ObjectOutputStream JavaDoc out) throws java.io.IOException JavaDoc{
1097        ByteArrayOutputStream baos = new ByteArrayOutputStream();
1098        write(baos);
1099        String JavaDoc str = baos.toString();;
1100        // System.out.println("str='"+str+"'");
1101
out.writeUTF(str);
1102    }
1103    // Special deserializer: read XML as deserialization
1104
private void readObject(java.io.ObjectInputStream JavaDoc in) throws java.io.IOException JavaDoc, ClassNotFoundException JavaDoc{
1105        try{
1106            init(comparators, new org.netbeans.modules.schema2beans.Version(1, 2, 0));
1107            String JavaDoc strDocument = in.readUTF();
1108            // System.out.println("strDocument='"+strDocument+"'");
1109
ByteArrayInputStream bais = new ByteArrayInputStream(strDocument.getBytes());
1110            Document doc = GraphManager.createXmlDocument(bais, false);
1111            initOptions(Common.NO_DEFAULT_VALUES);
1112            initFromNode(doc, Common.NO_DEFAULT_VALUES);
1113        }
1114        catch (Schema2BeansException e) {
1115            e.printStackTrace();
1116            throw new RuntimeException JavaDoc(e.getMessage());
1117        }
1118    }
1119
1120    // Dump the content of this bean returning it as a String
1121
public void dump(StringBuffer JavaDoc str, String JavaDoc indent){
1122        String JavaDoc s;
1123        Object JavaDoc o;
1124        org.netbeans.modules.schema2beans.BaseBean n;
1125        str.append(indent);
1126        str.append("ContextRoot"); // NOI18N
1127
str.append(indent+"\t"); // NOI18N
1128
str.append("<"); // NOI18N
1129
s = this.getContextRoot();
1130        str.append((s==null?"null":s.trim())); // NOI18N
1131
str.append(">\n"); // NOI18N
1132
this.dumpAttributes(CONTEXT_ROOT, 0, str, indent);
1133
1134        str.append(indent);
1135        str.append("SecurityRoleMapping["+this.sizeSecurityRoleMapping()+"]"); // NOI18N
1136
for(int i=0; i<this.sizeSecurityRoleMapping(); i++)
1137        {
1138            str.append(indent+"\t");
1139            str.append("#"+i+":");
1140            n = (org.netbeans.modules.schema2beans.BaseBean) this.getSecurityRoleMapping(i);
1141            if (n != null)
1142                n.dump(str, indent + "\t"); // NOI18N
1143
else
1144                str.append(indent+"\tnull"); // NOI18N
1145
this.dumpAttributes(SECURITY_ROLE_MAPPING, i, str, indent);
1146        }
1147
1148        str.append(indent);
1149        str.append("Servlet["+this.sizeServlet()+"]"); // NOI18N
1150
for(int i=0; i<this.sizeServlet(); i++)
1151        {
1152            str.append(indent+"\t");
1153            str.append("#"+i+":");
1154            n = (org.netbeans.modules.schema2beans.BaseBean) this.getServlet(i);
1155            if (n != null)
1156                n.dump(str, indent + "\t"); // NOI18N
1157
else
1158                str.append(indent+"\tnull"); // NOI18N
1159
this.dumpAttributes(SERVLET, i, str, indent);
1160        }
1161
1162        str.append(indent);
1163        str.append("IdempotentUrlPattern["+this.sizeIdempotentUrlPattern()+"]"); // NOI18N
1164
for(int i=0; i<this.sizeIdempotentUrlPattern(); i++)
1165        {
1166            str.append(indent+"\t");
1167            str.append("#"+i+":");
1168            str.append(indent+"\t"); // NOI18N
1169
str.append((this.isIdempotentUrlPattern(i)?"true":"false"));
1170            this.dumpAttributes(IDEMPOTENT_URL_PATTERN, i, str, indent);
1171        }
1172
1173        str.append(indent);
1174        str.append("SessionConfig"); // NOI18N
1175
n = (org.netbeans.modules.schema2beans.BaseBean) this.getSessionConfig();
1176        if (n != null)
1177            n.dump(str, indent + "\t"); // NOI18N
1178
else
1179            str.append(indent+"\tnull"); // NOI18N
1180
this.dumpAttributes(SESSION_CONFIG, 0, str, indent);
1181
1182        str.append(indent);
1183        str.append("EjbRef["+this.sizeEjbRef()+"]"); // NOI18N
1184
for(int i=0; i<this.sizeEjbRef(); i++)
1185        {
1186            str.append(indent+"\t");
1187            str.append("#"+i+":");
1188            n = (org.netbeans.modules.schema2beans.BaseBean) this.getEjbRef(i);
1189            if (n != null)
1190                n.dump(str, indent + "\t"); // NOI18N
1191
else
1192                str.append(indent+"\tnull"); // NOI18N
1193
this.dumpAttributes(EJB_REF, i, str, indent);
1194        }
1195
1196        str.append(indent);
1197        str.append("ResourceRef["+this.sizeResourceRef()+"]"); // NOI18N
1198
for(int i=0; i<this.sizeResourceRef(); i++)
1199        {
1200            str.append(indent+"\t");
1201            str.append("#"+i+":");
1202            n = (org.netbeans.modules.schema2beans.BaseBean) this.getResourceRef(i);
1203            if (n != null)
1204                n.dump(str, indent + "\t"); // NOI18N
1205
else
1206                str.append(indent+"\tnull"); // NOI18N
1207
this.dumpAttributes(RESOURCE_REF, i, str, indent);
1208        }
1209
1210        str.append(indent);
1211        str.append("ResourceEnvRef["+this.sizeResourceEnvRef()+"]"); // NOI18N
1212
for(int i=0; i<this.sizeResourceEnvRef(); i++)
1213        {
1214            str.append(indent+"\t");
1215            str.append("#"+i+":");
1216            n = (org.netbeans.modules.schema2beans.BaseBean) this.getResourceEnvRef(i);
1217            if (n != null)
1218                n.dump(str, indent + "\t"); // NOI18N
1219
else
1220                str.append(indent+"\tnull"); // NOI18N
1221
this.dumpAttributes(RESOURCE_ENV_REF, i, str, indent);
1222        }
1223
1224        str.append(indent);
1225        str.append("ServiceRef["+this.sizeServiceRef()+"]"); // NOI18N
1226
for(int i=0; i<this.sizeServiceRef(); i++)
1227        {
1228            str.append(indent+"\t");
1229            str.append("#"+i+":");
1230            n = (org.netbeans.modules.schema2beans.BaseBean) this.getServiceRef(i);
1231            if (n != null)
1232                n.dump(str, indent + "\t"); // NOI18N
1233
else
1234                str.append(indent+"\tnull"); // NOI18N
1235
this.dumpAttributes(SERVICE_REF, i, str, indent);
1236        }
1237
1238        str.append(indent);
1239        str.append("Cache"); // NOI18N
1240
n = (org.netbeans.modules.schema2beans.BaseBean) this.getCache();
1241        if (n != null)
1242            n.dump(str, indent + "\t"); // NOI18N
1243
else
1244            str.append(indent+"\tnull"); // NOI18N
1245
this.dumpAttributes(CACHE, 0, str, indent);
1246
1247        str.append(indent);
1248        str.append("ClassLoader"); // NOI18N
1249
n = (org.netbeans.modules.schema2beans.BaseBean) this.getClassLoader();
1250        if (n != null)
1251            n.dump(str, indent + "\t"); // NOI18N
1252
else
1253            str.append(indent+"\tnull"); // NOI18N
1254
this.dumpAttributes(CLASS_LOADER, 0, str, indent);
1255
1256        str.append(indent);
1257        str.append("JspConfig"); // NOI18N
1258
n = (org.netbeans.modules.schema2beans.BaseBean) this.getJspConfig();
1259        if (n != null)
1260            n.dump(str, indent + "\t"); // NOI18N
1261
else
1262            str.append(indent+"\tnull"); // NOI18N
1263
this.dumpAttributes(JSP_CONFIG, 0, str, indent);
1264
1265        str.append(indent);
1266        str.append("LocaleCharsetInfo"); // NOI18N
1267
n = (org.netbeans.modules.schema2beans.BaseBean) this.getLocaleCharsetInfo();
1268        if (n != null)
1269            n.dump(str, indent + "\t"); // NOI18N
1270
else
1271            str.append(indent+"\tnull"); // NOI18N
1272
this.dumpAttributes(LOCALE_CHARSET_INFO, 0, str, indent);
1273
1274        str.append(indent);
1275        str.append("ParameterEncoding"); // NOI18N
1276
str.append(indent+"\t"); // NOI18N
1277
str.append((this.isParameterEncoding()?"true":"false"));
1278        this.dumpAttributes(PARAMETER_ENCODING, 0, str, indent);
1279
1280        str.append(indent);
1281        str.append("WebProperty["+this.sizeWebProperty()+"]"); // NOI18N
1282
for(int i=0; i<this.sizeWebProperty(); i++)
1283        {
1284            str.append(indent+"\t");
1285            str.append("#"+i+":");
1286            n = (org.netbeans.modules.schema2beans.BaseBean) this.getWebProperty(i);
1287            if (n != null)
1288                n.dump(str, indent + "\t"); // NOI18N
1289
else
1290                str.append(indent+"\tnull"); // NOI18N
1291
this.dumpAttributes(PROPERTY, i, str, indent);
1292        }
1293
1294        str.append(indent);
1295        str.append("MessageDestination["+this.sizeMessageDestination()+"]"); // NOI18N
1296
for(int i=0; i<this.sizeMessageDestination(); i++)
1297        {
1298            str.append(indent+"\t");
1299            str.append("#"+i+":");
1300            n = (org.netbeans.modules.schema2beans.BaseBean) this.getMessageDestination(i);
1301            if (n != null)
1302                n.dump(str, indent + "\t"); // NOI18N
1303
else
1304                str.append(indent+"\tnull"); // NOI18N
1305
this.dumpAttributes(MESSAGE_DESTINATION, i, str, indent);
1306        }
1307
1308        str.append(indent);
1309        str.append("WebserviceDescription["+this.sizeWebserviceDescription()+"]"); // NOI18N
1310
for(int i=0; i<this.sizeWebserviceDescription(); i++)
1311        {
1312            str.append(indent+"\t");
1313            str.append("#"+i+":");
1314            n = (org.netbeans.modules.schema2beans.BaseBean) this.getWebserviceDescription(i);
1315            if (n != null)
1316                n.dump(str, indent + "\t"); // NOI18N
1317
else
1318                str.append(indent+"\tnull"); // NOI18N
1319
this.dumpAttributes(WEBSERVICE_DESCRIPTION, i, str, indent);
1320        }
1321
1322    }
1323    public String JavaDoc dumpBeanNode(){
1324        StringBuffer JavaDoc str = new StringBuffer JavaDoc();
1325        str.append("SunWebApp\n"); // NOI18N
1326
this.dump(str, "\n "); // NOI18N
1327
return str.toString();
1328    }}
1329
1330// END_NOI18N
1331

1332
1333/*
1334 * The contents of this file are subject to the terms
1335 * of the Common Development and Distribution License
1336 * (the License). You may not use this file except in
1337 * compliance with the License.
1338 *
1339 * You can obtain a copy of the license at
1340 * https://glassfish.dev.java.net/public/CDDLv1.0.html or
1341 * glassfish/bootstrap/legal/CDDLv1.0.txt.
1342 * See the License for the specific language governing
1343 * permissions and limitations under the License.
1344 *
1345 * When distributing Covered Code, include this CDDL
1346 * Header Notice in each file and include the License file
1347 * at glassfish/bootstrap/legal/CDDLv1.0.txt.
1348 * If applicable, add the following below the CDDL Header,
1349 * with the fields enclosed by brackets [] replaced by
1350 * you own identifying information:
1351 * "Portions Copyrighted [year] [name of copyright owner]"
1352 *
1353 * Copyright 2006 Sun Microsystems, Inc. All rights reserved.
1354 */

1355
Popular Tags