1 6 7 package com.sun.enterprise.tools.common.dd.webapp; 8 9 import org.w3c.dom.*; 10 import org.netbeans.modules.schema2beans.*; 11 import java.beans.*; 12 import java.util.*; 13 14 16 public class ClassLoader extends com.sun.enterprise.tools.common.dd.SunBaseBean 17 { 18 19 static Vector comparators = new Vector(); 20 21 static public final String EXTRACLASSPATH = "ExtraClassPath"; static public final String DELEGATE = "Delegate"; static public final String DYNAMICRELOADINTERVAL = "DynamicReloadInterval"; static public final String PROPERTY = "WebProperty"; 26 public ClassLoader() { 27 this(Common.USE_DEFAULT_VALUES); 28 } 29 30 public ClassLoader(int options) 31 { 32 super(comparators, new org.netbeans.modules.schema2beans.Version(1, 2, 0)); 33 this.createProperty("property", PROPERTY, 36 Common.TYPE_0_N | Common.TYPE_BEAN | Common.TYPE_KEY, 37 WebProperty.class); 38 this.createAttribute(PROPERTY, "name", "Name", 39 AttrProp.CDATA | AttrProp.REQUIRED, 40 null, null); 41 this.createAttribute(PROPERTY, "value", "Value", 42 AttrProp.CDATA | AttrProp.REQUIRED, 43 null, null); 44 this.initialize(options); 45 } 46 47 void initialize(int options) 49 { 50 51 } 52 53 public void setExtraClassPath(java.lang.String value) { 55 setAttributeValue(EXTRACLASSPATH, value); 56 } 57 58 public java.lang.String getExtraClassPath() { 60 return getAttributeValue(EXTRACLASSPATH); 61 } 62 63 public void setDelegate(java.lang.String value) { 65 setAttributeValue(DELEGATE, value); 66 } 67 68 public java.lang.String getDelegate() { 70 return getAttributeValue(DELEGATE); 71 } 72 73 public void setDynamicReloadInterval(java.lang.String value) { 75 setAttributeValue(DYNAMICRELOADINTERVAL, value); 76 } 77 78 public java.lang.String getDynamicReloadInterval() { 80 return getAttributeValue(DYNAMICRELOADINTERVAL); 81 } 82 83 public void setWebProperty(int index, WebProperty value) { 85 this.setValue(PROPERTY, index, value); 86 } 87 88 public WebProperty getWebProperty(int index) { 90 return (WebProperty)this.getValue(PROPERTY, index); 91 } 92 93 public void setWebProperty(WebProperty[] value) { 95 this.setValue(PROPERTY, value); 96 } 97 98 public WebProperty[] getWebProperty() { 100 return (WebProperty[])this.getValues(PROPERTY); 101 } 102 103 public int sizeWebProperty() { 105 return this.size(PROPERTY); 106 } 107 108 public int addWebProperty(com.sun.enterprise.tools.common.dd.webapp.WebProperty value) { 110 return this.addValue(PROPERTY, value); 111 } 112 113 public int removeWebProperty(com.sun.enterprise.tools.common.dd.webapp.WebProperty value) { 118 return this.removeValue(PROPERTY, value); 119 } 120 121 public static void addComparator(org.netbeans.modules.schema2beans.BeanComparator c) { 123 comparators.add(c); 124 } 125 126 public static void removeComparator(org.netbeans.modules.schema2beans.BeanComparator c) { 128 comparators.remove(c); 129 } 130 public void validate() throws org.netbeans.modules.schema2beans.ValidateException { 131 boolean restrictionFailure = false; 132 if (getExtraClassPath() != null) { 134 } 135 if (getDelegate() == null) { 137 throw new org.netbeans.modules.schema2beans.ValidateException("getDelegate() == null", "delegate", this); } 139 if (getDynamicReloadInterval() != null) { 141 } 142 for (int _index = 0; _index < sizeWebProperty(); ++_index) { 144 com.sun.enterprise.tools.common.dd.webapp.WebProperty element = getWebProperty(_index); 145 if (element != null) { 146 element.validate(); 147 } 148 } 149 } 150 151 public void dump(StringBuffer str, String indent){ 153 String s; 154 Object o; 155 org.netbeans.modules.schema2beans.BaseBean n; 156 str.append(indent); 157 str.append("WebProperty["+this.sizeWebProperty()+"]"); for(int i=0; i<this.sizeWebProperty(); i++) 159 { 160 str.append(indent+"\t"); 161 str.append("#"+i+":"); 162 n = (org.netbeans.modules.schema2beans.BaseBean) this.getWebProperty(i); 163 if (n != null) 164 n.dump(str, indent + "\t"); else 166 str.append(indent+"\tnull"); this.dumpAttributes(PROPERTY, i, str, indent); 168 } 169 170 } 171 public String dumpBeanNode(){ 172 StringBuffer str = new StringBuffer (); 173 str.append("ClassLoader\n"); this.dump(str, "\n "); return str.toString(); 176 }} 177 178 180 181 203 | Popular Tags |