KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > netbeans > modules > j2ee > sun > share > configbean > customizers > data > PropertyList


1 /*
2  * The contents of this file are subject to the terms of the Common Development
3  * and Distribution License (the License). You may not use this file except in
4  * compliance with the License.
5  *
6  * You can obtain a copy of the License at http://www.netbeans.org/cddl.html
7  * or http://www.netbeans.org/cddl.txt.
8  *
9  * When distributing Covered Code, include this CDDL Header Notice in each file
10  * and include the License file at http://www.netbeans.org/cddl.txt.
11  * If applicable, add the following below the CDDL Header, with the fields
12  * enclosed by brackets [] replaced by your own identifying information:
13  * "Portions Copyrighted [year] [name of copyright owner]"
14  *
15  * The Original Software is NetBeans. The Initial Developer of the Original
16  * Software is Sun Microsystems, Inc. Portions Copyright 1997-2006 Sun
17  * Microsystems, Inc. All Rights Reserved.
18  */

19 /**
20  * This generated bean class PropertyList
21  * matches the schema element 'property-list'.
22  * The root bean class is DynamicProperties
23  *
24  * Generated on Wed Sep 29 16:29:53 PDT 2004
25  * @Generated
26  */

27
28 package org.netbeans.modules.j2ee.sun.share.configbean.customizers.data;
29
30 public class PropertyList {
31     public static final String JavaDoc EDITABLE = "Editable"; // NOI18N
32
public static final String JavaDoc DESCRIPTION = "Description"; // NOI18N
33
public static final String JavaDoc BUNDLEPATH = "BundlePath"; // NOI18N
34
public static final String JavaDoc PROPERTY_NAME = "PropertyName"; // NOI18N
35
public static final String JavaDoc PROPERTY_PARAM = "PropertyParam"; // NOI18N
36
public static final String JavaDoc HELP_ID = "HelpId"; // NOI18N
37

38     private java.lang.String JavaDoc _Editable = "false";
39     private java.lang.String JavaDoc _Description = "true";
40     private java.lang.String JavaDoc _BundlePath;
41     private String JavaDoc _PropertyName;
42     private java.util.List JavaDoc _PropertyParam = new java.util.ArrayList JavaDoc(); // List<PropertyParam>
43
private String JavaDoc _HelpId;
44
45     /**
46      * Normal starting point constructor.
47      */

48     public PropertyList() {
49         _PropertyName = "";
50     }
51
52     /**
53      * Required parameters constructor
54      */

55     public PropertyList(java.lang.String JavaDoc editable, java.lang.String JavaDoc description, String JavaDoc propertyName, org.netbeans.modules.j2ee.sun.share.configbean.customizers.data.PropertyParam[] propertyParam) {
56         _Editable = editable;
57         _Description = description;
58         _PropertyName = propertyName;
59         if (propertyParam!= null) {
60             ((java.util.ArrayList JavaDoc) _PropertyParam).ensureCapacity(propertyParam.length);
61             for (int i = 0; i < propertyParam.length; ++i) {
62                 _PropertyParam.add(propertyParam[i]);
63             }
64         }
65     }
66
67     /**
68      * Deep copy
69      */

70     public PropertyList(org.netbeans.modules.j2ee.sun.share.configbean.customizers.data.PropertyList source) {
71         this(source, false);
72     }
73
74     /**
75      * Deep copy
76      * @param justData just copy the XML relevant data
77      */

78     public PropertyList(org.netbeans.modules.j2ee.sun.share.configbean.customizers.data.PropertyList source, boolean justData) {
79         _Editable = source._Editable;
80         _Description = source._Description;
81         _BundlePath = source._BundlePath;
82         _PropertyName = source._PropertyName;
83         for (java.util.Iterator JavaDoc it = source._PropertyParam.iterator();
84             it.hasNext(); ) {
85             org.netbeans.modules.j2ee.sun.share.configbean.customizers.data.PropertyParam srcElement = (org.netbeans.modules.j2ee.sun.share.configbean.customizers.data.PropertyParam)it.next();
86             _PropertyParam.add((srcElement == null) ? null : newPropertyParam(srcElement, justData));
87         }
88         _HelpId = source._HelpId;
89     }
90
91     // This attribute is mandatory
92
public void setEditable(java.lang.String JavaDoc value) {
93         _Editable = value;
94     }
95
96     public java.lang.String JavaDoc getEditable() {
97         return _Editable;
98     }
99
100     // This attribute is mandatory
101
public void setDescription(java.lang.String JavaDoc value) {
102         _Description = value;
103     }
104
105     public java.lang.String JavaDoc getDescription() {
106         return _Description;
107     }
108
109     // This attribute is optional
110
public void setBundlePath(java.lang.String JavaDoc value) {
111         _BundlePath = value;
112     }
113
114     public java.lang.String JavaDoc getBundlePath() {
115         return _BundlePath;
116     }
117
118     // This attribute is mandatory
119
public void setPropertyName(String JavaDoc value) {
120         _PropertyName = value;
121     }
122
123     public String JavaDoc getPropertyName() {
124         return _PropertyName;
125     }
126
127     // This attribute is an array containing at least one element
128
public void setPropertyParam(org.netbeans.modules.j2ee.sun.share.configbean.customizers.data.PropertyParam[] value) {
129         if (value == null)
130             value = new PropertyParam[0];
131         _PropertyParam.clear();
132         ((java.util.ArrayList JavaDoc) _PropertyParam).ensureCapacity(value.length);
133         for (int i = 0; i < value.length; ++i) {
134             _PropertyParam.add(value[i]);
135         }
136     }
137
138     public void setPropertyParam(int index, org.netbeans.modules.j2ee.sun.share.configbean.customizers.data.PropertyParam value) {
139         _PropertyParam.set(index, value);
140     }
141
142     public org.netbeans.modules.j2ee.sun.share.configbean.customizers.data.PropertyParam[] getPropertyParam() {
143         PropertyParam[] arr = new PropertyParam[_PropertyParam.size()];
144         return (PropertyParam[]) _PropertyParam.toArray(arr);
145     }
146
147     public java.util.List JavaDoc fetchPropertyParamList() {
148         return _PropertyParam;
149     }
150     public org.netbeans.modules.j2ee.sun.share.configbean.customizers.data.PropertyParam getPropertyParam(int index) {
151         return (PropertyParam)_PropertyParam.get(index);
152     }
153
154     // Return the number of propertyParam
155
public int sizePropertyParam() {
156         return _PropertyParam.size();
157     }
158
159     public int addPropertyParam(org.netbeans.modules.j2ee.sun.share.configbean.customizers.data.PropertyParam value) {
160         _PropertyParam.add(value);
161         int positionOfNewItem = _PropertyParam.size()-1;
162         return positionOfNewItem;
163     }
164
165     /**
166      * Search from the end looking for @param value, and then remove it.
167      */

168     public int removePropertyParam(org.netbeans.modules.j2ee.sun.share.configbean.customizers.data.PropertyParam value) {
169         int pos = _PropertyParam.indexOf(value);
170         if (pos >= 0) {
171             _PropertyParam.remove(pos);
172         }
173         return pos;
174     }
175
176     // This attribute is optional
177
public void setHelpId(String JavaDoc value) {
178         _HelpId = value;
179     }
180
181     public String JavaDoc getHelpId() {
182         return _HelpId;
183     }
184
185     /**
186      * Create a new bean using it's default constructor.
187      * This does not add it to any bean graph.
188      */

189     public org.netbeans.modules.j2ee.sun.share.configbean.customizers.data.PropertyParam newPropertyParam() {
190         return new org.netbeans.modules.j2ee.sun.share.configbean.customizers.data.PropertyParam();
191     }
192
193     /**
194      * Create a new bean, copying from another one.
195      * This does not add it to any bean graph.
196      */

197     public org.netbeans.modules.j2ee.sun.share.configbean.customizers.data.PropertyParam newPropertyParam(PropertyParam source, boolean justData) {
198         return new org.netbeans.modules.j2ee.sun.share.configbean.customizers.data.PropertyParam(source, justData);
199     }
200
201     public void writeNode(java.io.Writer JavaDoc out) throws java.io.IOException JavaDoc {
202         String JavaDoc myName;
203         myName = "property-list";
204         writeNode(out, myName, ""); // NOI18N
205
}
206
207     public void writeNode(java.io.Writer JavaDoc out, String JavaDoc nodeName, String JavaDoc indent) throws java.io.IOException JavaDoc {
208         writeNode(out, nodeName, null, indent, new java.util.HashMap JavaDoc());
209     }
210
211     /**
212      * It's not recommended to call this method directly.
213      */

214     public void writeNode(java.io.Writer JavaDoc out, String JavaDoc nodeName, String JavaDoc namespace, String JavaDoc indent, java.util.Map JavaDoc namespaceMap) throws java.io.IOException JavaDoc {
215         out.write(indent);
216         out.write("<");
217         if (namespace != null) {
218             out.write((String JavaDoc)namespaceMap.get(namespace));
219             out.write(":");
220         }
221         out.write(nodeName);
222         // editable is an attribute with namespace null
223
if (_Editable != null) {
224             out.write(" editable='");
225             org.netbeans.modules.j2ee.sun.share.configbean.customizers.data.DynamicProperties.writeXML(out, _Editable, true);
226             out.write("'"); // NOI18N
227
}
228         // description is an attribute with namespace null
229
if (_Description != null) {
230             out.write(" description='");
231             org.netbeans.modules.j2ee.sun.share.configbean.customizers.data.DynamicProperties.writeXML(out, _Description, true);
232             out.write("'"); // NOI18N
233
}
234         // bundle-path is an attribute with namespace null
235
if (_BundlePath != null) {
236             out.write(" bundle-path='");
237             org.netbeans.modules.j2ee.sun.share.configbean.customizers.data.DynamicProperties.writeXML(out, _BundlePath, true);
238             out.write("'"); // NOI18N
239
}
240         out.write(">\n");
241         String JavaDoc nextIndent = indent + " ";
242         if (_PropertyName != null) {
243             out.write(nextIndent);
244             out.write("<property-name"); // NOI18N
245
out.write(">"); // NOI18N
246
org.netbeans.modules.j2ee.sun.share.configbean.customizers.data.DynamicProperties.writeXML(out, _PropertyName, false);
247             out.write("</property-name>\n"); // NOI18N
248
}
249         for (java.util.Iterator JavaDoc it = _PropertyParam.iterator();
250             it.hasNext(); ) {
251             org.netbeans.modules.j2ee.sun.share.configbean.customizers.data.PropertyParam element = (org.netbeans.modules.j2ee.sun.share.configbean.customizers.data.PropertyParam)it.next();
252             if (element != null) {
253                 element.writeNode(out, "property-param", null, nextIndent, namespaceMap);
254             }
255         }
256         if (_HelpId != null) {
257             out.write(nextIndent);
258             out.write("<help-id"); // NOI18N
259
out.write(">"); // NOI18N
260
org.netbeans.modules.j2ee.sun.share.configbean.customizers.data.DynamicProperties.writeXML(out, _HelpId, false);
261             out.write("</help-id>\n"); // NOI18N
262
}
263         out.write(indent);
264         out.write("</");
265         if (namespace != null) {
266             out.write((String JavaDoc)namespaceMap.get(namespace));
267             out.write(":");
268         }
269         out.write(nodeName);
270         out.write(">\n");
271     }
272
273     public void readNode(org.w3c.dom.Node JavaDoc node) {
274         readNode(node, new java.util.HashMap JavaDoc());
275     }
276
277     public void readNode(org.w3c.dom.Node JavaDoc node, java.util.Map JavaDoc namespacePrefixes) {
278         if (node.hasAttributes()) {
279             org.w3c.dom.NamedNodeMap JavaDoc attrs = node.getAttributes();
280             org.w3c.dom.Attr JavaDoc attr;
281             java.lang.String JavaDoc attrValue;
282             boolean firstNamespaceDef = true;
283             for (int attrNum = 0; attrNum < attrs.getLength(); ++attrNum) {
284                 attr = (org.w3c.dom.Attr JavaDoc) attrs.item(attrNum);
285                 String JavaDoc attrName = attr.getName();
286                 if (attrName.startsWith("xmlns:")) {
287                     if (firstNamespaceDef) {
288                         firstNamespaceDef = false;
289                         // Dup prefix map, so as to not write over previous values, and to make it easy to clear out our entries.
290
namespacePrefixes = new java.util.HashMap JavaDoc(namespacePrefixes);
291                     }
292                     String JavaDoc attrNSPrefix = attrName.substring(6, attrName.length());
293                     namespacePrefixes.put(attrNSPrefix, attr.getValue());
294                 }
295             }
296             attr = (org.w3c.dom.Attr JavaDoc) attrs.getNamedItem("editable");
297             if (attr != null) {
298                 attrValue = attr.getValue();
299                 _Editable = attrValue;
300             }
301             attr = (org.w3c.dom.Attr JavaDoc) attrs.getNamedItem("description");
302             if (attr != null) {
303                 attrValue = attr.getValue();
304                 _Description = attrValue;
305             }
306             attr = (org.w3c.dom.Attr JavaDoc) attrs.getNamedItem("bundle-path");
307             if (attr != null) {
308                 attrValue = attr.getValue();
309                 _BundlePath = attrValue;
310             }
311         }
312         org.w3c.dom.NodeList JavaDoc children = node.getChildNodes();
313         for (int i = 0, size = children.getLength(); i < size; ++i) {
314             org.w3c.dom.Node JavaDoc childNode = children.item(i);
315             String JavaDoc childNodeName = (childNode.getLocalName() == null ? childNode.getNodeName().intern() : childNode.getLocalName().intern());
316             String JavaDoc childNodeValue = "";
317             if (childNode.getFirstChild() != null) {
318                 childNodeValue = childNode.getFirstChild().getNodeValue();
319             }
320             if (childNodeName == "property-name") {
321                 _PropertyName = childNodeValue;
322             }
323             else if (childNodeName == "property-param") {
324                 PropertyParam aPropertyParam = newPropertyParam();
325                 aPropertyParam.readNode(childNode, namespacePrefixes);
326                 _PropertyParam.add(aPropertyParam);
327             }
328             else if (childNodeName == "help-id") {
329                 _HelpId = childNodeValue;
330             }
331             else {
332                 // Found extra unrecognized childNode
333
}
334         }
335     }
336
337     public void changePropertyByName(String JavaDoc name, Object JavaDoc value) {
338         if (name == null) return;
339         name = name.intern();
340         if (name == "editable")
341             setEditable((java.lang.String JavaDoc)value);
342         else if (name == "description")
343             setDescription((java.lang.String JavaDoc)value);
344         else if (name == "bundlePath")
345             setBundlePath((java.lang.String JavaDoc)value);
346         else if (name == "propertyName")
347             setPropertyName((String JavaDoc)value);
348         else if (name == "propertyParam")
349             addPropertyParam((PropertyParam)value);
350         else if (name == "propertyParam[]")
351             setPropertyParam((PropertyParam[]) value);
352         else if (name == "helpId")
353             setHelpId((String JavaDoc)value);
354         else
355             throw new IllegalArgumentException JavaDoc(name+" is not a valid property name for PropertyList");
356     }
357
358     public Object JavaDoc fetchPropertyByName(String JavaDoc name) {
359         if (name == "editable")
360             return getEditable();
361         if (name == "description")
362             return getDescription();
363         if (name == "bundlePath")
364             return getBundlePath();
365         if (name == "propertyName")
366             return getPropertyName();
367         if (name == "propertyParam[]")
368             return getPropertyParam();
369         if (name == "helpId")
370             return getHelpId();
371         throw new IllegalArgumentException JavaDoc(name+" is not a valid property name for PropertyList");
372     }
373
374     public String JavaDoc nameSelf() {
375         return "PropertyList";
376     }
377
378     public String JavaDoc nameChild(Object JavaDoc childObj) {
379         return nameChild(childObj, false, false);
380     }
381
382     /**
383      * @param childObj The child object to search for
384      * @param returnSchemaName Whether or not the schema name should be returned or the property name
385      * @return null if not found
386      */

387     public String JavaDoc nameChild(Object JavaDoc childObj, boolean returnConstName, boolean returnSchemaName) {
388         return nameChild(childObj, returnConstName, returnSchemaName, false);
389     }
390
391     /**
392      * @param childObj The child object to search for
393      * @param returnSchemaName Whether or not the schema name should be returned or the property name
394      * @return null if not found
395      */

396     public String JavaDoc nameChild(Object JavaDoc childObj, boolean returnConstName, boolean returnSchemaName, boolean returnXPathName) {
397         if (childObj instanceof java.lang.String JavaDoc) {
398             java.lang.String JavaDoc child = (java.lang.String JavaDoc) childObj;
399             if (child == _Editable) {
400                 if (returnConstName) {
401                     return EDITABLE;
402                 } else if (returnSchemaName) {
403                     return "editable";
404                 } else if (returnXPathName) {
405                     return "@editable";
406                 } else {
407                     return "Editable";
408                 }
409             }
410             if (child == _Description) {
411                 if (returnConstName) {
412                     return DESCRIPTION;
413                 } else if (returnSchemaName) {
414                     return "description";
415                 } else if (returnXPathName) {
416                     return "@description";
417                 } else {
418                     return "Description";
419                 }
420             }
421             if (child == _BundlePath) {
422                 if (returnConstName) {
423                     return BUNDLEPATH;
424                 } else if (returnSchemaName) {
425                     return "bundle-path";
426                 } else if (returnXPathName) {
427                     return "@bundle-path";
428                 } else {
429                     return "BundlePath";
430                 }
431             }
432             if (child == _PropertyName) {
433                 if (returnConstName) {
434                     return PROPERTY_NAME;
435                 } else if (returnSchemaName) {
436                     return "property-name";
437                 } else if (returnXPathName) {
438                     return "property-name";
439                 } else {
440                     return "PropertyName";
441                 }
442             }
443             if (child == _HelpId) {
444                 if (returnConstName) {
445                     return HELP_ID;
446                 } else if (returnSchemaName) {
447                     return "help-id";
448                 } else if (returnXPathName) {
449                     return "help-id";
450                 } else {
451                     return "HelpId";
452                 }
453             }
454         }
455         if (childObj instanceof PropertyParam) {
456             PropertyParam child = (PropertyParam) childObj;
457             int index = 0;
458             for (java.util.Iterator JavaDoc it = _PropertyParam.iterator();
459                 it.hasNext(); ) {
460                 org.netbeans.modules.j2ee.sun.share.configbean.customizers.data.PropertyParam element = (org.netbeans.modules.j2ee.sun.share.configbean.customizers.data.PropertyParam)it.next();
461                 if (child == element) {
462                     if (returnConstName) {
463                         return PROPERTY_PARAM;
464                     } else if (returnSchemaName) {
465                         return "property-param";
466                     } else if (returnXPathName) {
467                         return "property-param[position()="+index+"]";
468                     } else {
469                         return "PropertyParam."+Integer.toHexString(index);
470                     }
471                 }
472                 ++index;
473             }
474         }
475         return null;
476     }
477
478     /**
479      * Return an array of all of the properties that are beans and are set.
480      */

481     public java.lang.Object JavaDoc[] childBeans(boolean recursive) {
482         java.util.List JavaDoc children = new java.util.LinkedList JavaDoc();
483         childBeans(recursive, children);
484         java.lang.Object JavaDoc[] result = new java.lang.Object JavaDoc[children.size()];
485         return (java.lang.Object JavaDoc[]) children.toArray(result);
486     }
487
488     /**
489      * Put all child beans into the beans list.
490      */

491     public void childBeans(boolean recursive, java.util.List JavaDoc beans) {
492         for (java.util.Iterator JavaDoc it = _PropertyParam.iterator();
493             it.hasNext(); ) {
494             org.netbeans.modules.j2ee.sun.share.configbean.customizers.data.PropertyParam element = (org.netbeans.modules.j2ee.sun.share.configbean.customizers.data.PropertyParam)it.next();
495             if (element != null) {
496                 if (recursive) {
497                     element.childBeans(true, beans);
498                 }
499                 beans.add(element);
500             }
501         }
502     }
503
504     public boolean equals(Object JavaDoc o) {
505         return o instanceof org.netbeans.modules.j2ee.sun.share.configbean.customizers.data.PropertyList && equals((org.netbeans.modules.j2ee.sun.share.configbean.customizers.data.PropertyList) o);
506     }
507
508     public boolean equals(org.netbeans.modules.j2ee.sun.share.configbean.customizers.data.PropertyList inst) {
509         if (inst == this) {
510             return true;
511         }
512         if (inst == null) {
513             return false;
514         }
515         if (!(_Editable == null ? inst._Editable == null : _Editable.equals(inst._Editable))) {
516             return false;
517         }
518         if (!(_Description == null ? inst._Description == null : _Description.equals(inst._Description))) {
519             return false;
520         }
521         if (!(_BundlePath == null ? inst._BundlePath == null : _BundlePath.equals(inst._BundlePath))) {
522             return false;
523         }
524         if (!(_PropertyName == null ? inst._PropertyName == null : _PropertyName.equals(inst._PropertyName))) {
525             return false;
526         }
527         if (sizePropertyParam() != inst.sizePropertyParam())
528             return false;
529         // Compare every element.
530
for (java.util.Iterator JavaDoc it = _PropertyParam.iterator(), it2 = inst._PropertyParam.iterator();
531             it.hasNext() && it2.hasNext(); ) {
532             org.netbeans.modules.j2ee.sun.share.configbean.customizers.data.PropertyParam element = (org.netbeans.modules.j2ee.sun.share.configbean.customizers.data.PropertyParam)it.next();
533             org.netbeans.modules.j2ee.sun.share.configbean.customizers.data.PropertyParam element2 = (org.netbeans.modules.j2ee.sun.share.configbean.customizers.data.PropertyParam)it2.next();
534             if (!(element == null ? element2 == null : element.equals(element2))) {
535                 return false;
536             }
537         }
538         if (!(_HelpId == null ? inst._HelpId == null : _HelpId.equals(inst._HelpId))) {
539             return false;
540         }
541         return true;
542     }
543
544     public int hashCode() {
545         int result = 17;
546         result = 37*result + (_Editable == null ? 0 : _Editable.hashCode());
547         result = 37*result + (_Description == null ? 0 : _Description.hashCode());
548         result = 37*result + (_BundlePath == null ? 0 : _BundlePath.hashCode());
549         result = 37*result + (_PropertyName == null ? 0 : _PropertyName.hashCode());
550         result = 37*result + (_PropertyParam == null ? 0 : _PropertyParam.hashCode());
551         result = 37*result + (_HelpId == null ? 0 : _HelpId.hashCode());
552         return result;
553     }
554
555 }
556
557
558 /*
559         The following schema file has been used for generation:
560
561 <?xml version="1.0" encoding="UTF-8"?>
562
563 <!--
564     Document : dynamic-properties.dtd
565     Created on : January 28, 2004, 8:48 PM
566     Author : Peter Williams
567     Description:
568         Purpose of the document follows.
569         
570     DTD for definition of properties, their editors and validators to allow for
571     name/value pair property editing to be handled nicely in the plugin.
572 -->
573
574 <!-- The file is a list of property lists -->
575 <!ELEMENT dynamic-properties (property-list*, validator*)>
576
577 <!-- Each property list can be fixed or editable and has a name -->
578 <!ELEMENT property-list (property-name, property-param+, help-id?)>
579 <!ATTLIST property-list editable CDATA "false"
580                         description CDATA "true"
581                         bundle-path CDATA #IMPLIED>
582
583 <!ELEMENT property-name (#PCDATA)>
584
585 <!--
586     Each element in a property list has a name. It may also have a type, a
587     validator, and possibly a min and/or max if the type is 'number'. Lastly,
588     it could have a helpId
589 -->
590 <!ELEMENT property-param (param-name, param-type, param-label?, param-validator?, default-value?,
591                           help-id?, param-description?)>
592
593 <!ELEMENT param-name (#PCDATA)>
594
595 <!--
596     There are four allowed types: boolean, text, number, and list. The editable
597     attribute is ignored for all types except the list type.
598     
599     For boolean properties, default value should be string using the boolean
600       'ENTITY' definitions in the sun-xxx dtd's, preferably true/false.
601     For text properties, you should provide a validator (or none to allow
602       arbitrary text) and a default value if desired.
603     For number properties, the number is assumed to be a signed long integer.
604       Use the min & max params to specify a range if required.
605     For list properties, use as many param-value entries as necessary to represent
606       the list. If the list is editable, set the editable attribute on the type.
607       One exception here is if the list is the list of charsets or locales, use
608       param-locale or param-charset to specify this. These lists are provided by
609       the Locale and Charset classes in the JVM.
610
611     (I'm not actually defining ENTITY's here because Schema2Beans does not support them.)
612 -->
613 <!ELEMENT param-type ((param-value* | param-locale | param-charset), param-min?, param-max?)>
614 <!ATTLIST param-type type CDATA "text"
615                      editable CDATA "false"
616                      required CDATA "true">
617
618 <!ELEMENT param-value (#PCDATA)>
619 <!ELEMENT param-locale EMPTY>
620 <!ELEMENT param-charset EMPTY>
621 <!ELEMENT param-min (#PCDATA)>
622 <!ELEMENT param-max (#PCDATA)>
623
624 <!--
625     The text label (actually, will become bundle string id) to be used for the
626     value field instead of the word 'Value'
627 -->
628 <!ELEMENT param-label (#PCDATA)>
629
630 <!--
631     Validators are used to ensure the text in a text field matches a specific
632     pattern. The following validators are supported: (Can I support java
633     regular expression patterns here? It would make it lots easier!!!)
634     
635         directory: A directory path specification
636         javaid: A legal java identifier (allows java keywords though)
637         url: A URL string
638         domain: A domain. This is probably similar to javaid + represents a server domain
639         package: A legal java package name, e.g. javaid's separated by periods.
640         memorysize: A number followed by kb or mb (case insensitive)
641         classid: A windows classid (GUID)
642 -->
643 <!ELEMENT param-validator (#PCDATA)>
644
645 <!--
646     String that will become the default value for the property. If the property
647     value must fit a specific pattern, the default-value must qualify.
648 -->
649 <!ELEMENT default-value (#PCDATA)>
650
651 <!--
652     The help id for this field (or panel if specified at the property level,
653     which is likely what we'll do.
654 -->
655 <!ELEMENT help-id (#PCDATA)>
656
657
658 <!--
659     ID of string in bundle (see property-list attributes) to use for default
660     description.
661 -->
662 <!ELEMENT param-description (#PCDATA)>
663
664 <!-- !PW this would be used by property-param once it's done
665
666     Version of the appserver this property-param belongs to. Not present means
667     the property is applicable to all versions.
668     
669     Allowable Strings: major[.minor][pe|se|ee]
670         Major version is require.
671         Minor is optional (not present matches all)
672         Type is optional (not present matches all)
673         
674     For range attribute, valid values are:
675         ending, only, starting
676 <!ELEMENT appserver-version (#PCDATA)>
677 <!ATTLIST appserver-version range CDATA #IMPLIED>
678 -->
679
680 <!--
681     Validator definition. These are referred to by name from the <param-validator>
682     entry in <property-param>, above.
683 -->
684 <!ELEMENT validator (validator-name, validator-pattern)>
685
686 <!ELEMENT validator-name (#PCDATA)>
687
688 <!ELEMENT validator-pattern (#PCDATA)>
689
690
691
692 */

693
694
Popular Tags