1 19 20 32 33 package org.netbeans.modules.web.monitor.data; 34 35 import org.w3c.dom.*; 36 import org.netbeans.modules.schema2beans.*; 37 import java.beans.*; 38 import java.util.*; 39 40 public class SessionIn extends BaseBean { 41 42 static Vector comparators = new Vector(); 43 44 static public final String PARAM = "Param"; 46 public SessionIn() { 47 this(Common.USE_DEFAULT_VALUES); 48 } 49 50 public SessionIn(int options) { 51 super(SessionIn.comparators, new org.netbeans.modules.schema2beans.Version(1, 0, 6)); 52 this.createProperty("Param", PARAM, Common.TYPE_0_N | Common.TYPE_BEAN | Common.TYPE_KEY, 55 Param.class); 56 this.createAttribute(PARAM, "name", "Name", AttrProp.CDATA | AttrProp.REQUIRED, 58 null, null); 59 this.createAttribute(PARAM, "value", "Value", AttrProp.CDATA | AttrProp.IMPLIED, 61 null, null); 62 this.initialize(options); 63 } 64 65 void initialize(int options) { 67 } 68 69 public void setParam(int index, Param value) { 71 this.setValue(PARAM, index, value); 72 } 73 74 public Param getParam(int index) { 76 return (Param)this.getValue(PARAM, index); 77 } 78 79 public void setParam(Param[] value) { 81 this.setValue(PARAM, value); 82 } 83 84 public Param[] getParam() { 86 return (Param[])this.getValues(PARAM); 87 } 88 89 public int sizeParam() { 91 return this.size(PARAM); 92 } 93 94 public int addParam(Param value) { 96 return this.addValue(PARAM, value); 97 } 98 99 public int removeParam(Param value) { 104 return this.removeValue(PARAM, value); 105 } 106 107 public boolean verify() { 109 return true; 110 } 111 112 static public void addComparator(BeanComparator c) { 114 SessionIn.comparators.add(c); 115 } 116 117 static public void removeComparator(BeanComparator c) { 119 SessionIn.comparators.remove(c); 120 } 121 public void addPropertyChangeListener(PropertyChangeListener l) { 123 BeanProp p = this.beanProp(); 124 if (p != null) 125 p.addPCListener(l); 126 } 127 128 public void removePropertyChangeListener(PropertyChangeListener l) { 130 BeanProp p = this.beanProp(); 131 if (p != null) 132 p.removePCListener(l); 133 } 134 135 public void addPropertyChangeListener(String n, PropertyChangeListener l) { 137 BeanProp p = this.beanProp(n); 138 if (p != null) 139 p.addPCListener(l); 140 } 141 142 public void removePropertyChangeListener(String n, 144 PropertyChangeListener l) { 145 BeanProp p = this.beanProp(n); 146 if (p != null) 147 p.removePCListener(l); 148 } 149 150 public void dump(StringBuffer str, String indent) { 152 String s; 153 BaseBean n; 154 str.append(indent); 155 str.append("Param["+this.sizeParam()+"]"); for(int i=0; i<this.sizeParam(); i++) 157 { 158 str.append(indent+"\t"); str.append("#"+i+":"); n = this.getParam(i); 161 if (n != null) 162 n.dump(str, indent + "\t"); else 164 str.append(indent+"\tnull"); this.dumpAttributes(PARAM, i, str, indent); 166 } 167 168 } 169 170 public String dumpBeanNode() { 171 StringBuffer str = new StringBuffer (); 172 str.append("SessionIn\n"); this.dump(str, "\n "); return str.toString(); 175 } 176 } 177 178 | Popular Tags |