KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > com > sun > enterprise > config > serverbeans > Domain


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  * This generated bean class Domain matches the DTD element domain
26  *
27  */

28
29 package com.sun.enterprise.config.serverbeans;
30
31 import org.w3c.dom.*;
32 import org.netbeans.modules.schema2beans.*;
33 import java.beans.*;
34 import java.util.*;
35 import java.io.*;
36 import java.io.Serializable JavaDoc;
37 import com.sun.enterprise.config.ConfigBean;
38 import com.sun.enterprise.config.ConfigException;
39 import com.sun.enterprise.config.StaleWriteConfigException;
40 import com.sun.enterprise.util.i18n.StringManager;
41
42 // BEGIN_NOI18N
43

44 public class Domain extends ConfigBean implements Serializable JavaDoc
45 {
46
47     static Vector comparators = new Vector();
48     private static final org.netbeans.modules.schema2beans.Version runtimeVersion = new org.netbeans.modules.schema2beans.Version(4, 2, 0);
49
50     static public final String JavaDoc APPLICATIONS = "Applications";
51     static public final String JavaDoc RESOURCES = "Resources";
52     static public final String JavaDoc CONFIGS = "Configs";
53     static public final String JavaDoc SERVERS = "Servers";
54     static public final String JavaDoc CLUSTERS = "Clusters";
55     static public final String JavaDoc NODE_AGENTS = "NodeAgents";
56     static public final String JavaDoc LB_CONFIGS = "LbConfigs";
57     static public final String JavaDoc LOAD_BALANCERS = "LoadBalancers";
58     static public final String JavaDoc SYSTEM_PROPERTY = "SystemProperty";
59     static public final String JavaDoc ELEMENT_PROPERTY = "ElementProperty";
60
61     public Domain() {
62         this(null, Common.USE_DEFAULT_VALUES);
63     }
64
65     public Domain(org.w3c.dom.Node JavaDoc doc, int options) {
66         this(Common.NO_DEFAULT_VALUES);
67         try {
68             initFromNode(doc, options);
69         }
70         catch (Schema2BeansException e) {
71             throw new RuntimeException JavaDoc(e);
72         }
73     }
74     protected void initFromNode(org.w3c.dom.Node JavaDoc doc, int options) throws Schema2BeansException
75     {
76         if (doc == null)
77         {
78             doc = GraphManager.createRootElementNode("domain"); // NOI18N
79
if (doc == null)
80                 throw new Schema2BeansException(Common.getMessage(
81                     "CantCreateDOMRoot_msg", "domain"));
82         }
83         Node n = GraphManager.getElementNode("domain", doc); // NOI18N
84
if (n == null)
85             throw new Schema2BeansException(Common.getMessage(
86                 "DocRootNotInDOMGraph_msg", "domain", doc.getFirstChild().getNodeName()));
87
88         this.graphManager.setXmlDocument(doc);
89
90         // Entry point of the createBeans() recursive calls
91
this.createBean(n, this.graphManager());
92         this.initialize(options);
93     }
94     public Domain(int options)
95     {
96         super(comparators, runtimeVersion);
97         initOptions(options);
98     }
99     protected void initOptions(int options)
100     {
101         // The graph manager is allocated in the bean root
102
this.graphManager = new GraphManager(this);
103         this.createRoot("domain", "Domain", // NOI18N
104
Common.TYPE_1 | Common.TYPE_BEAN, Domain.class);
105
106         // Properties (see root bean comments for the bean graph)
107
initPropertyTables(10);
108         this.createProperty("applications", APPLICATIONS,
109             Common.TYPE_0_1 | Common.TYPE_BEAN | Common.TYPE_KEY,
110             Applications.class);
111         this.createProperty("resources", RESOURCES,
112             Common.TYPE_0_1 | Common.TYPE_BEAN | Common.TYPE_KEY,
113             Resources.class);
114         this.createProperty("configs", CONFIGS,
115             Common.TYPE_1 | Common.TYPE_BEAN | Common.TYPE_KEY,
116             Configs.class);
117         this.createProperty("servers", SERVERS,
118             Common.TYPE_1 | Common.TYPE_BEAN | Common.TYPE_KEY,
119             Servers.class);
120         this.createProperty("clusters", CLUSTERS,
121             Common.TYPE_0_1 | Common.TYPE_BEAN | Common.TYPE_KEY,
122             Clusters.class);
123         this.createProperty("node-agents", NODE_AGENTS,
124             Common.TYPE_0_1 | Common.TYPE_BEAN | Common.TYPE_KEY,
125             NodeAgents.class);
126         this.createProperty("lb-configs", LB_CONFIGS,
127             Common.TYPE_0_1 | Common.TYPE_BEAN | Common.TYPE_KEY,
128             LbConfigs.class);
129         this.createProperty("load-balancers", LOAD_BALANCERS,
130             Common.TYPE_0_1 | Common.TYPE_BEAN | Common.TYPE_KEY,
131             LoadBalancers.class);
132         this.createProperty("system-property", SYSTEM_PROPERTY,
133             Common.TYPE_0_N | Common.TYPE_BEAN | Common.TYPE_KEY,
134             SystemProperty.class);
135         this.createAttribute(SYSTEM_PROPERTY, "name", "Name",
136                         AttrProp.CDATA | AttrProp.REQUIRED,
137                         null, null);
138         this.createAttribute(SYSTEM_PROPERTY, "value", "Value",
139                         AttrProp.CDATA | AttrProp.REQUIRED,
140                         null, null);
141         this.createProperty("property", ELEMENT_PROPERTY,
142             Common.TYPE_0_N | Common.TYPE_BEAN | Common.TYPE_KEY,
143             ElementProperty.class);
144         this.createAttribute(ELEMENT_PROPERTY, "name", "Name",
145                         AttrProp.CDATA | AttrProp.REQUIRED,
146                         null, null);
147         this.createAttribute(ELEMENT_PROPERTY, "value", "Value",
148                         AttrProp.CDATA | AttrProp.REQUIRED,
149                         null, null);
150         this.createAttribute("application-root", "ApplicationRoot",
151                         AttrProp.CDATA | AttrProp.IMPLIED,
152                         null, null);
153         this.createAttribute("log-root", "LogRoot",
154                         AttrProp.CDATA | AttrProp.IMPLIED,
155                         null, null);
156         this.createAttribute("locale", "Locale",
157                         AttrProp.CDATA | AttrProp.IMPLIED,
158                         null, null);
159         this.initialize(options);
160     }
161
162     // Setting the default values of the properties
163
void initialize(int options) {
164
165     }
166
167     // This attribute is optional
168
public void setApplications(Applications value) {
169         this.setValue(APPLICATIONS, value);
170     }
171
172     // Get Method
173
public Applications getApplications() {
174         return (Applications)this.getValue(APPLICATIONS);
175     }
176
177     // This attribute is optional
178
public void setResources(Resources value) {
179         this.setValue(RESOURCES, value);
180     }
181
182     // Get Method
183
public Resources getResources() {
184         return (Resources)this.getValue(RESOURCES);
185     }
186
187     // This attribute is mandatory
188
public void setConfigs(Configs value) {
189         this.setValue(CONFIGS, value);
190     }
191
192     // Get Method
193
public Configs getConfigs() {
194         return (Configs)this.getValue(CONFIGS);
195     }
196
197     // This attribute is mandatory
198
public void setServers(Servers value) {
199         this.setValue(SERVERS, value);
200     }
201
202     // Get Method
203
public Servers getServers() {
204         return (Servers)this.getValue(SERVERS);
205     }
206
207     // This attribute is optional
208
public void setClusters(Clusters value) {
209         this.setValue(CLUSTERS, value);
210     }
211
212     // Get Method
213
public Clusters getClusters() {
214         return (Clusters)this.getValue(CLUSTERS);
215     }
216
217     // This attribute is optional
218
public void setNodeAgents(NodeAgents value) {
219         this.setValue(NODE_AGENTS, value);
220     }
221
222     // Get Method
223
public NodeAgents getNodeAgents() {
224         return (NodeAgents)this.getValue(NODE_AGENTS);
225     }
226
227     // This attribute is optional
228
public void setLbConfigs(LbConfigs value) {
229         this.setValue(LB_CONFIGS, value);
230     }
231
232     // Get Method
233
public LbConfigs getLbConfigs() {
234         return (LbConfigs)this.getValue(LB_CONFIGS);
235     }
236
237     // This attribute is optional
238
public void setLoadBalancers(LoadBalancers value) {
239         this.setValue(LOAD_BALANCERS, value);
240     }
241
242     // Get Method
243
public LoadBalancers getLoadBalancers() {
244         return (LoadBalancers)this.getValue(LOAD_BALANCERS);
245     }
246
247     // This attribute is an array, possibly empty
248
public void setSystemProperty(int index, SystemProperty value) {
249         this.setValue(SYSTEM_PROPERTY, index, value);
250     }
251
252     // Get Method
253
public SystemProperty getSystemProperty(int index) {
254         return (SystemProperty)this.getValue(SYSTEM_PROPERTY, index);
255     }
256
257     // This attribute is an array, possibly empty
258
public void setSystemProperty(SystemProperty[] value) {
259         this.setValue(SYSTEM_PROPERTY, value);
260     }
261
262     // Getter Method
263
public SystemProperty[] getSystemProperty() {
264         return (SystemProperty[])this.getValues(SYSTEM_PROPERTY);
265     }
266
267     // Return the number of properties
268
public int sizeSystemProperty() {
269         return this.size(SYSTEM_PROPERTY);
270     }
271
272     // Add a new element returning its index in the list
273
public int addSystemProperty(SystemProperty value)
274             throws ConfigException{
275         return addSystemProperty(value, true);
276     }
277
278     // Add a new element returning its index in the list with a boolean flag
279
public int addSystemProperty(SystemProperty value, boolean overwrite)
280             throws ConfigException{
281         SystemProperty old = getSystemPropertyByName(value.getName());
282         if(old != null) {
283             throw new ConfigException(StringManager.getManager(Domain.class).getString("cannotAddDuplicate", "SystemProperty"));
284         }
285         return this.addValue(SYSTEM_PROPERTY, value, overwrite);
286     }
287
288     //
289
// Remove an element using its reference
290
// Returns the index the element had in the list
291
//
292
public int removeSystemProperty(SystemProperty value){
293         return this.removeValue(SYSTEM_PROPERTY, value);
294     }
295
296     //
297
// Remove an element using its reference
298
// Returns the index the element had in the list
299
// with boolean overwrite
300
//
301
public int removeSystemProperty(SystemProperty value, boolean overwrite)
302             throws StaleWriteConfigException{
303         return this.removeValue(SYSTEM_PROPERTY, value, overwrite);
304     }
305
306     public SystemProperty getSystemPropertyByName(String JavaDoc id) {
307      if (null != id) { id = id.trim(); }
308     SystemProperty[] o = getSystemProperty();
309      if (o == null) return null;
310
311      for (int i=0; i < o.length; i++) {
312          if(o[i].getAttributeValue(Common.convertName(ServerTags.NAME)).equals(id)) {
313              return o[i];
314          }
315      }
316
317         return null;
318         
319     }
320     // This attribute is an array, possibly empty
321
public void setElementProperty(int index, ElementProperty value) {
322         this.setValue(ELEMENT_PROPERTY, index, value);
323     }
324
325     // Get Method
326
public ElementProperty getElementProperty(int index) {
327         return (ElementProperty)this.getValue(ELEMENT_PROPERTY, index);
328     }
329
330     // This attribute is an array, possibly empty
331
public void setElementProperty(ElementProperty[] value) {
332         this.setValue(ELEMENT_PROPERTY, value);
333     }
334
335     // Getter Method
336
public ElementProperty[] getElementProperty() {
337         return (ElementProperty[])this.getValues(ELEMENT_PROPERTY);
338     }
339
340     // Return the number of properties
341
public int sizeElementProperty() {
342         return this.size(ELEMENT_PROPERTY);
343     }
344
345     // Add a new element returning its index in the list
346
public int addElementProperty(ElementProperty value)
347             throws ConfigException{
348         return addElementProperty(value, true);
349     }
350
351     // Add a new element returning its index in the list with a boolean flag
352
public int addElementProperty(ElementProperty value, boolean overwrite)
353             throws ConfigException{
354         ElementProperty old = getElementPropertyByName(value.getName());
355         if(old != null) {
356             throw new ConfigException(StringManager.getManager(Domain.class).getString("cannotAddDuplicate", "ElementProperty"));
357         }
358         return this.addValue(ELEMENT_PROPERTY, value, overwrite);
359     }
360
361     //
362
// Remove an element using its reference
363
// Returns the index the element had in the list
364
//
365
public int removeElementProperty(ElementProperty value){
366         return this.removeValue(ELEMENT_PROPERTY, value);
367     }
368
369     //
370
// Remove an element using its reference
371
// Returns the index the element had in the list
372
// with boolean overwrite
373
//
374
public int removeElementProperty(ElementProperty value, boolean overwrite)
375             throws StaleWriteConfigException{
376         return this.removeValue(ELEMENT_PROPERTY, value, overwrite);
377     }
378
379     public ElementProperty getElementPropertyByName(String JavaDoc id) {
380      if (null != id) { id = id.trim(); }
381     ElementProperty[] o = getElementProperty();
382      if (o == null) return null;
383
384      for (int i=0; i < o.length; i++) {
385          if(o[i].getAttributeValue(Common.convertName(ServerTags.NAME)).equals(id)) {
386              return o[i];
387          }
388      }
389
390         return null;
391         
392     }
393     /**
394     * Getter for ApplicationRoot of the Element domain
395     * @return the ApplicationRoot of the Element domain
396     */

397     public String JavaDoc getApplicationRoot() {
398             return getAttributeValue(ServerTags.APPLICATION_ROOT);
399     }
400     /**
401     * Modify the ApplicationRoot of the Element domain
402     * @param v the new value
403     * @throws StaleWriteConfigException if overwrite is false and file changed on disk
404     */

405     public void setApplicationRoot(String JavaDoc v, boolean overwrite) throws StaleWriteConfigException {
406         setAttributeValue(ServerTags.APPLICATION_ROOT, v, overwrite);
407     }
408     /**
409     * Modify the ApplicationRoot of the Element domain
410     * @param v the new value
411     */

412     public void setApplicationRoot(String JavaDoc v) {
413         setAttributeValue(ServerTags.APPLICATION_ROOT, v);
414     }
415     /**
416     * Getter for LogRoot of the Element domain
417     * @return the LogRoot of the Element domain
418     */

419     public String JavaDoc getLogRoot() {
420             return getAttributeValue(ServerTags.LOG_ROOT);
421     }
422     /**
423     * Modify the LogRoot of the Element domain
424     * @param v the new value
425     * @throws StaleWriteConfigException if overwrite is false and file changed on disk
426     */

427     public void setLogRoot(String JavaDoc v, boolean overwrite) throws StaleWriteConfigException {
428         setAttributeValue(ServerTags.LOG_ROOT, v, overwrite);
429     }
430     /**
431     * Modify the LogRoot of the Element domain
432     * @param v the new value
433     */

434     public void setLogRoot(String JavaDoc v) {
435         setAttributeValue(ServerTags.LOG_ROOT, v);
436     }
437     /**
438     * Getter for Locale of the Element domain
439     * @return the Locale of the Element domain
440     */

441     public String JavaDoc getLocale() {
442             return getAttributeValue(ServerTags.LOCALE);
443     }
444     /**
445     * Modify the Locale of the Element domain
446     * @param v the new value
447     * @throws StaleWriteConfigException if overwrite is false and file changed on disk
448     */

449     public void setLocale(String JavaDoc v, boolean overwrite) throws StaleWriteConfigException {
450         setAttributeValue(ServerTags.LOCALE, v, overwrite);
451     }
452     /**
453     * Modify the Locale of the Element domain
454     * @param v the new value
455     */

456     public void setLocale(String JavaDoc v) {
457         setAttributeValue(ServerTags.LOCALE, v);
458     }
459     /**
460      * Create a new bean using it's default constructor.
461      * This does not add it to any bean graph.
462      */

463     public Applications newApplications() {
464         return new Applications();
465     }
466
467     /**
468      * Create a new bean using it's default constructor.
469      * This does not add it to any bean graph.
470      */

471     public Resources newResources() {
472         return new Resources();
473     }
474
475     /**
476      * Create a new bean using it's default constructor.
477      * This does not add it to any bean graph.
478      */

479     public Configs newConfigs() {
480         return new Configs();
481     }
482
483     /**
484      * Create a new bean using it's default constructor.
485      * This does not add it to any bean graph.
486      */

487     public Servers newServers() {
488         return new Servers();
489     }
490
491     /**
492      * Create a new bean using it's default constructor.
493      * This does not add it to any bean graph.
494      */

495     public Clusters newClusters() {
496         return new Clusters();
497     }
498
499     /**
500      * Create a new bean using it's default constructor.
501      * This does not add it to any bean graph.
502      */

503     public NodeAgents newNodeAgents() {
504         return new NodeAgents();
505     }
506
507     /**
508      * Create a new bean using it's default constructor.
509      * This does not add it to any bean graph.
510      */

511     public LbConfigs newLbConfigs() {
512         return new LbConfigs();
513     }
514
515     /**
516      * Create a new bean using it's default constructor.
517      * This does not add it to any bean graph.
518      */

519     public LoadBalancers newLoadBalancers() {
520         return new LoadBalancers();
521     }
522
523     /**
524      * Create a new bean using it's default constructor.
525      * This does not add it to any bean graph.
526      */

527     public SystemProperty newSystemProperty() {
528         return new SystemProperty();
529     }
530
531     /**
532      * Create a new bean using it's default constructor.
533      * This does not add it to any bean graph.
534      */

535     public ElementProperty newElementProperty() {
536         return new ElementProperty();
537     }
538
539     /**
540     * get the xpath representation for this element
541     * returns something like abc[@name='value'] or abc
542     * depending on the type of the bean
543     */

544     protected String JavaDoc getRelativeXPath() {
545         String JavaDoc ret = null;
546         ret = "domain";
547         return (null != ret ? ret.trim() : null);
548     }
549
550     /*
551     * generic method to get default value from dtd
552     */

553     public static String JavaDoc getDefaultAttributeValue(String JavaDoc attr) {
554         if(attr == null) return null;
555         attr = attr.trim();
556     return null;
557     }
558     //
559
public static void addComparator(org.netbeans.modules.schema2beans.BeanComparator c) {
560         comparators.add(c);
561     }
562
563     //
564
public static void removeComparator(org.netbeans.modules.schema2beans.BeanComparator c) {
565         comparators.remove(c);
566     }
567     //
568
// This method returns the root of the bean graph
569
// Each call creates a new bean graph from the specified DOM graph
570
//
571
public static Domain createGraph(org.w3c.dom.Node JavaDoc doc) {
572         return new Domain(doc, Common.NO_DEFAULT_VALUES);
573     }
574
575     public static Domain createGraph(java.io.File JavaDoc f) throws java.io.IOException JavaDoc {
576         java.io.InputStream JavaDoc in = new java.io.FileInputStream JavaDoc(f);
577         try {
578             return createGraph(in, false);
579         } finally {
580             in.close();
581         }
582     }
583
584     public static Domain createGraph(java.io.InputStream JavaDoc in) {
585         return createGraph(in, false);
586     }
587
588     public static Domain createGraph(java.io.InputStream JavaDoc in, boolean validate) {
589         try {
590             Document doc = GraphManager.createXmlDocument(in, validate);
591             return createGraph(doc);
592         }
593         catch (Exception JavaDoc t) {
594             throw new RuntimeException JavaDoc(Common.getMessage(
595                 "DOMGraphCreateFailed_msg",
596                 t));
597         }
598     }
599
600     //
601
// This method returns the root for a new empty bean graph
602
//
603
public static Domain createGraph() {
604         return new Domain();
605     }
606
607     public void validate() throws org.netbeans.modules.schema2beans.ValidateException {
608     }
609
610     // Special serializer: output XML as serialization
611
private void writeObject(java.io.ObjectOutputStream JavaDoc out) throws java.io.IOException JavaDoc{
612         ByteArrayOutputStream baos = new ByteArrayOutputStream();
613         write(baos);
614         String JavaDoc str = baos.toString();;
615         // System.out.println("str='"+str+"'");
616
out.writeUTF(str);
617     }
618     // Special deserializer: read XML as deserialization
619
private void readObject(java.io.ObjectInputStream JavaDoc in) throws java.io.IOException JavaDoc, ClassNotFoundException JavaDoc{
620         try{
621             init(comparators, runtimeVersion);
622             String JavaDoc strDocument = in.readUTF();
623             // System.out.println("strDocument='"+strDocument+"'");
624
ByteArrayInputStream bais = new ByteArrayInputStream(strDocument.getBytes());
625             Document doc = GraphManager.createXmlDocument(bais, false);
626             initOptions(Common.NO_DEFAULT_VALUES);
627             initFromNode(doc, Common.NO_DEFAULT_VALUES);
628         }
629         catch (Schema2BeansException e) {
630             throw new RuntimeException JavaDoc(e);
631         }
632     }
633
634     public void _setSchemaLocation(String JavaDoc location) {
635         if (beanProp().getAttrProp("xsi:schemaLocation", true) == null) {
636             createAttribute("xmlns:xsi", "xmlns:xsi", AttrProp.CDATA | AttrProp.IMPLIED, null, "http://www.w3.org/2001/XMLSchema-instance");
637             setAttributeValue("xmlns:xsi", "http://www.w3.org/2001/XMLSchema-instance");
638             createAttribute("xsi:schemaLocation", "xsi:schemaLocation", AttrProp.CDATA | AttrProp.IMPLIED, null, location);
639         }
640         setAttributeValue("xsi:schemaLocation", location);
641     }
642
643     public String JavaDoc _getSchemaLocation() {
644         if (beanProp().getAttrProp("xsi:schemaLocation", true) == null) {
645             createAttribute("xmlns:xsi", "xmlns:xsi", AttrProp.CDATA | AttrProp.IMPLIED, null, "http://www.w3.org/2001/XMLSchema-instance");
646             setAttributeValue("xmlns:xsi", "http://www.w3.org/2001/XMLSchema-instance");
647             createAttribute("xsi:schemaLocation", "xsi:schemaLocation", AttrProp.CDATA | AttrProp.IMPLIED, null, null);
648         }
649         return getAttributeValue("xsi:schemaLocation");
650     }
651
652     // Dump the content of this bean returning it as a String
653
public void dump(StringBuffer JavaDoc str, String JavaDoc indent){
654         String JavaDoc s;
655         Object JavaDoc o;
656         org.netbeans.modules.schema2beans.BaseBean n;
657         str.append(indent);
658         str.append("Applications"); // NOI18N
659
n = (org.netbeans.modules.schema2beans.BaseBean) this.getApplications();
660         if (n != null)
661             n.dump(str, indent + "\t"); // NOI18N
662
else
663             str.append(indent+"\tnull"); // NOI18N
664
this.dumpAttributes(APPLICATIONS, 0, str, indent);
665
666         str.append(indent);
667         str.append("Resources"); // NOI18N
668
n = (org.netbeans.modules.schema2beans.BaseBean) this.getResources();
669         if (n != null)
670             n.dump(str, indent + "\t"); // NOI18N
671
else
672             str.append(indent+"\tnull"); // NOI18N
673
this.dumpAttributes(RESOURCES, 0, str, indent);
674
675         str.append(indent);
676         str.append("Configs"); // NOI18N
677
n = (org.netbeans.modules.schema2beans.BaseBean) this.getConfigs();
678         if (n != null)
679             n.dump(str, indent + "\t"); // NOI18N
680
else
681             str.append(indent+"\tnull"); // NOI18N
682
this.dumpAttributes(CONFIGS, 0, str, indent);
683
684         str.append(indent);
685         str.append("Servers"); // NOI18N
686
n = (org.netbeans.modules.schema2beans.BaseBean) this.getServers();
687         if (n != null)
688             n.dump(str, indent + "\t"); // NOI18N
689
else
690             str.append(indent+"\tnull"); // NOI18N
691
this.dumpAttributes(SERVERS, 0, str, indent);
692
693         str.append(indent);
694         str.append("Clusters"); // NOI18N
695
n = (org.netbeans.modules.schema2beans.BaseBean) this.getClusters();
696         if (n != null)
697             n.dump(str, indent + "\t"); // NOI18N
698
else
699             str.append(indent+"\tnull"); // NOI18N
700
this.dumpAttributes(CLUSTERS, 0, str, indent);
701
702         str.append(indent);
703         str.append("NodeAgents"); // NOI18N
704
n = (org.netbeans.modules.schema2beans.BaseBean) this.getNodeAgents();
705         if (n != null)
706             n.dump(str, indent + "\t"); // NOI18N
707
else
708             str.append(indent+"\tnull"); // NOI18N
709
this.dumpAttributes(NODE_AGENTS, 0, str, indent);
710
711         str.append(indent);
712         str.append("LbConfigs"); // NOI18N
713
n = (org.netbeans.modules.schema2beans.BaseBean) this.getLbConfigs();
714         if (n != null)
715             n.dump(str, indent + "\t"); // NOI18N
716
else
717             str.append(indent+"\tnull"); // NOI18N
718
this.dumpAttributes(LB_CONFIGS, 0, str, indent);
719
720         str.append(indent);
721         str.append("LoadBalancers"); // NOI18N
722
n = (org.netbeans.modules.schema2beans.BaseBean) this.getLoadBalancers();
723         if (n != null)
724             n.dump(str, indent + "\t"); // NOI18N
725
else
726             str.append(indent+"\tnull"); // NOI18N
727
this.dumpAttributes(LOAD_BALANCERS, 0, str, indent);
728
729         str.append(indent);
730         str.append("SystemProperty["+this.sizeSystemProperty()+"]"); // NOI18N
731
for(int i=0; i<this.sizeSystemProperty(); i++)
732         {
733             str.append(indent+"\t");
734             str.append("#"+i+":");
735             n = (org.netbeans.modules.schema2beans.BaseBean) this.getSystemProperty(i);
736             if (n != null)
737                 n.dump(str, indent + "\t"); // NOI18N
738
else
739                 str.append(indent+"\tnull"); // NOI18N
740
this.dumpAttributes(SYSTEM_PROPERTY, i, str, indent);
741         }
742
743         str.append(indent);
744         str.append("ElementProperty["+this.sizeElementProperty()+"]"); // NOI18N
745
for(int i=0; i<this.sizeElementProperty(); i++)
746         {
747             str.append(indent+"\t");
748             str.append("#"+i+":");
749             n = (org.netbeans.modules.schema2beans.BaseBean) this.getElementProperty(i);
750             if (n != null)
751                 n.dump(str, indent + "\t"); // NOI18N
752
else
753                 str.append(indent+"\tnull"); // NOI18N
754
this.dumpAttributes(ELEMENT_PROPERTY, i, str, indent);
755         }
756
757     }
758     public String JavaDoc dumpBeanNode(){
759         StringBuffer JavaDoc str = new StringBuffer JavaDoc();
760         str.append("Domain\n"); // NOI18N
761
this.dump(str, "\n "); // NOI18N
762
return str.toString();
763     }}
764
765 // END_NOI18N
766

767
Popular Tags