1 23 24 29 30 package com.sun.enterprise.tools.common.dd.webapp; 31 32 import org.w3c.dom.*; 33 import org.netbeans.modules.schema2beans.*; 34 import java.beans.*; 35 import java.util.*; 36 37 39 public class WebProperty extends com.sun.enterprise.tools.common.dd.SunBaseBean 40 { 41 42 static Vector comparators = new Vector(); 43 44 static public final String NAME = "Name"; static public final String VALUE = "Value"; static public final String DESCRIPTION = "Description"; 48 public WebProperty() { 49 this(Common.USE_DEFAULT_VALUES); 50 } 51 52 public WebProperty(int options) 53 { 54 super(comparators, new org.netbeans.modules.schema2beans.Version(1, 2, 0)); 55 this.createProperty("description", DESCRIPTION, 58 Common.TYPE_0_1 | Common.TYPE_STRING | Common.TYPE_KEY, 59 String .class); 60 this.initialize(options); 61 } 62 63 void initialize(int options) 65 { 66 67 } 68 69 public void setName(java.lang.String value) { 71 setAttributeValue(NAME, value); 72 } 73 74 public java.lang.String getName() { 76 return getAttributeValue(NAME); 77 } 78 79 public void setValue(java.lang.String value) { 81 setAttributeValue(VALUE, value); 82 } 83 84 public java.lang.String getValue() { 86 return getAttributeValue(VALUE); 87 } 88 89 public void setDescription(String value) { 91 this.setValue(DESCRIPTION, value); 92 } 93 94 public String getDescription() { 96 return (String )this.getValue(DESCRIPTION); 97 } 98 99 public static void addComparator(org.netbeans.modules.schema2beans.BeanComparator c) { 101 comparators.add(c); 102 } 103 104 public static void removeComparator(org.netbeans.modules.schema2beans.BeanComparator c) { 106 comparators.remove(c); 107 } 108 public void validate() throws org.netbeans.modules.schema2beans.ValidateException { 109 boolean restrictionFailure = false; 110 if (getName() == null) { 112 throw new org.netbeans.modules.schema2beans.ValidateException("getName() == null", "name", this); } 114 if (getValue() == null) { 116 throw new org.netbeans.modules.schema2beans.ValidateException("getValue() == null", "value", this); } 118 if (getDescription() != null) { 120 } 121 } 122 123 public void dump(StringBuffer str, String indent){ 125 String s; 126 Object o; 127 org.netbeans.modules.schema2beans.BaseBean n; 128 str.append(indent); 129 str.append("Description"); str.append(indent+"\t"); str.append("<"); s = this.getDescription(); 133 str.append((s==null?"null":s.trim())); str.append(">\n"); this.dumpAttributes(DESCRIPTION, 0, str, indent); 136 137 } 138 public String dumpBeanNode(){ 139 StringBuffer str = new StringBuffer (); 140 str.append("WebProperty\n"); this.dump(str, "\n "); return str.toString(); 143 }} 144 145 147 148 615 | Popular Tags |