1 19 20 32 33 34 package org.netbeans.modules.web.monitor.data; 35 36 import org.w3c.dom.*; 37 import org.netbeans.modules.schema2beans.*; 38 import java.beans.*; 39 import java.util.*; 40 41 public class SessionOut extends BaseBean { 42 43 static Vector comparators = new Vector(); 44 45 static public final String PARAM = "Param"; 47 public SessionOut() { 48 this(Common.USE_DEFAULT_VALUES); 49 } 50 51 public SessionOut(int options) { 52 super(SessionOut.comparators, new org.netbeans.modules.schema2beans.Version(1, 0, 6)); 53 this.createProperty("Param", PARAM, Common.TYPE_0_N | Common.TYPE_BEAN | Common.TYPE_KEY, 56 Param.class); 57 this.createAttribute(PARAM, "name", "Name", AttrProp.CDATA | AttrProp.REQUIRED, 59 null, null); 60 this.createAttribute(PARAM, "value", "Value", AttrProp.CDATA | AttrProp.IMPLIED, 62 null, null); 63 this.initialize(options); 64 } 65 66 void initialize(int options) { 68 69 } 70 71 public void setParam(int index, Param value) { 73 this.setValue(PARAM, index, value); 74 } 75 76 public Param getParam(int index) { 78 return (Param)this.getValue(PARAM, index); 79 } 80 81 public void setParam(Param[] value) { 83 this.setValue(PARAM, value); 84 } 85 86 public Param[] getParam() { 88 return (Param[])this.getValues(PARAM); 89 } 90 91 public int sizeParam() { 93 return this.size(PARAM); 94 } 95 96 public int addParam(Param value) { 98 return this.addValue(PARAM, value); 99 } 100 101 public int removeParam(Param value) { 106 return this.removeValue(PARAM, value); 107 } 108 109 public boolean verify() { 111 return true; 112 } 113 114 static public void addComparator(BeanComparator c) { 116 SessionOut.comparators.add(c); 117 } 118 119 static public void removeComparator(BeanComparator c) { 121 SessionOut.comparators.remove(c); 122 } 123 public void addPropertyChangeListener(PropertyChangeListener l) { 125 BeanProp p = this.beanProp(); 126 if (p != null) 127 p.addPCListener(l); 128 } 129 130 public void removePropertyChangeListener(PropertyChangeListener l) { 132 BeanProp p = this.beanProp(); 133 if (p != null) 134 p.removePCListener(l); 135 } 136 137 public void addPropertyChangeListener(String n, 139 PropertyChangeListener l) { 140 BeanProp p = this.beanProp(n); 141 if (p != null) 142 p.addPCListener(l); 143 } 144 145 public void removePropertyChangeListener(String n, 147 PropertyChangeListener l) { 148 BeanProp p = this.beanProp(n); 149 if (p != null) 150 p.removePCListener(l); 151 } 152 153 public void dump(StringBuffer str, String indent) { 155 String s; 156 BaseBean n; 157 str.append(indent); 158 str.append("Param["+this.sizeParam()+"]"); for(int i=0; i<this.sizeParam(); i++) 160 { 161 str.append(indent+"\t"); str.append("#"+i+":"); n = this.getParam(i); 164 if (n != null) 165 n.dump(str, indent + "\t"); else 167 str.append(indent+"\tnull"); this.dumpAttributes(PARAM, i, str, indent); 169 } 170 171 } 172 173 public String dumpBeanNode() { 174 StringBuffer str = new StringBuffer (); 175 str.append("SessionOut\n"); this.dump(str, "\n "); return str.toString(); 178 } 179 } 180 | Popular Tags |