1 17 18 package com.sun.enterprise.tools.common.dd.webservice; 19 20 import org.w3c.dom.*; 21 import org.netbeans.modules.schema2beans.*; 22 import java.beans.*; 23 import java.util.*; 24 25 27 public class ServiceRefHandlerType extends org.netbeans.modules.schema2beans.BaseBean 28 { 29 30 static Vector comparators = new Vector(); 31 32 static public final String DESCRIPTION = "Description"; static public final String DISPLAY_NAME = "DisplayName"; static public final String ICON = "Icon"; static public final String HANDLER_NAME = "HandlerName"; static public final String HANDLER_CLASS = "HandlerClass"; static public final String INIT_PARAM = "InitParam"; static public final String SOAP_HEADER = "SoapHeader"; static public final String SOAP_ROLE = "SoapRole"; static public final String PORT_NAME = "PortName"; 42 public ServiceRefHandlerType() { 43 this(Common.USE_DEFAULT_VALUES); 44 } 45 46 public ServiceRefHandlerType(int options) 47 { 48 super(comparators, new org.netbeans.modules.schema2beans.Version(1, 2, 0)); 49 this.createProperty("description", DESCRIPTION, 52 Common.TYPE_0_N | Common.TYPE_STRING | Common.TYPE_KEY, 53 java.lang.String .class); 54 this.createAttribute(DESCRIPTION, "id", "Id", 55 AttrProp.CDATA | AttrProp.IMPLIED, 56 null, null); 57 this.createAttribute(DESCRIPTION, "xml:lang", "XmlLang", 58 AttrProp.CDATA | AttrProp.IMPLIED, 59 null, null); 60 this.createProperty("display-name", DISPLAY_NAME, 62 Common.TYPE_0_N | Common.TYPE_STRING | Common.TYPE_KEY, 63 java.lang.String .class); 64 this.createAttribute(DISPLAY_NAME, "id", "Id", 65 AttrProp.CDATA | AttrProp.IMPLIED, 66 null, null); 67 this.createAttribute(DISPLAY_NAME, "xml:lang", "XmlLang", 68 AttrProp.CDATA | AttrProp.IMPLIED, 69 null, null); 70 this.createProperty("icon", ICON, 72 Common.TYPE_0_N | Common.TYPE_BEAN | Common.TYPE_KEY, 73 IconType.class); 74 this.createAttribute(ICON, "xml:lang", "XmlLang", 75 AttrProp.CDATA | AttrProp.IMPLIED, 76 null, null); 77 this.createAttribute(ICON, "id", "Id", 78 AttrProp.CDATA | AttrProp.IMPLIED, 79 null, null); 80 this.createProperty("handler-name", HANDLER_NAME, 82 Common.TYPE_1 | Common.TYPE_STRING | Common.TYPE_KEY, 83 java.lang.String .class); 84 this.createAttribute(HANDLER_NAME, "id", "Id", 85 AttrProp.CDATA | AttrProp.IMPLIED, 86 null, null); 87 this.createProperty("handler-class", HANDLER_CLASS, 89 Common.TYPE_1 | Common.TYPE_STRING | Common.TYPE_KEY, 90 java.lang.String .class); 91 this.createProperty("init-param", INIT_PARAM, 93 Common.TYPE_0_N | Common.TYPE_BEAN | Common.TYPE_KEY, 94 ParamValueType.class); 95 this.createAttribute(INIT_PARAM, "id", "Id", 96 AttrProp.CDATA | AttrProp.IMPLIED, 97 null, null); 98 this.createProperty("soap-header", SOAP_HEADER, 100 Common.TYPE_0_N | Common.TYPE_STRING | Common.TYPE_KEY, 101 javax.xml.namespace.QName .class); 102 this.createAttribute(SOAP_HEADER, "id", "Id", 103 AttrProp.CDATA | AttrProp.IMPLIED, 104 null, null); 105 this.createProperty("soap-role", SOAP_ROLE, 107 Common.TYPE_0_N | Common.TYPE_STRING | Common.TYPE_KEY, 108 java.lang.String .class); 109 this.createAttribute(SOAP_ROLE, "id", "Id", 110 AttrProp.CDATA | AttrProp.IMPLIED, 111 null, null); 112 this.createProperty("port-name", PORT_NAME, 114 Common.TYPE_0_N | Common.TYPE_STRING | Common.TYPE_KEY, 115 java.lang.String .class); 116 this.createAttribute(PORT_NAME, "id", "Id", 117 AttrProp.CDATA | AttrProp.IMPLIED, 118 null, null); 119 this.initialize(options); 120 } 121 122 void initialize(int options) 124 { 125 126 } 127 128 public void setDescription(int index, java.lang.String value) { 130 this.setValue(DESCRIPTION, index, value); 131 } 132 133 public java.lang.String getDescription(int index) { 135 return (java.lang.String )this.getValue(DESCRIPTION, index); 136 } 137 138 public void setDescription(java.lang.String [] value) { 140 this.setValue(DESCRIPTION, value); 141 } 142 143 public java.lang.String [] getDescription() { 145 return (java.lang.String [])this.getValues(DESCRIPTION); 146 } 147 148 public int sizeDescription() { 150 return this.size(DESCRIPTION); 151 } 152 153 public int addDescription(java.lang.String value) { 155 return this.addValue(DESCRIPTION, value); 156 } 157 158 public int removeDescription(java.lang.String value) { 163 return this.removeValue(DESCRIPTION, value); 164 } 165 166 public void setDisplayName(int index, java.lang.String value) { 168 this.setValue(DISPLAY_NAME, index, value); 169 } 170 171 public java.lang.String getDisplayName(int index) { 173 return (java.lang.String )this.getValue(DISPLAY_NAME, index); 174 } 175 176 public void setDisplayName(java.lang.String [] value) { 178 this.setValue(DISPLAY_NAME, value); 179 } 180 181 public java.lang.String [] getDisplayName() { 183 return (java.lang.String [])this.getValues(DISPLAY_NAME); 184 } 185 186 public int sizeDisplayName() { 188 return this.size(DISPLAY_NAME); 189 } 190 191 public int addDisplayName(java.lang.String value) { 193 return this.addValue(DISPLAY_NAME, value); 194 } 195 196 public int removeDisplayName(java.lang.String value) { 201 return this.removeValue(DISPLAY_NAME, value); 202 } 203 204 public void setIcon(int index, IconType value) { 206 this.setValue(ICON, index, value); 207 } 208 209 public IconType getIcon(int index) { 211 return (IconType)this.getValue(ICON, index); 212 } 213 214 public void setIcon(IconType[] value) { 216 this.setValue(ICON, value); 217 } 218 219 public IconType[] getIcon() { 221 return (IconType[])this.getValues(ICON); 222 } 223 224 public int sizeIcon() { 226 return this.size(ICON); 227 } 228 229 public int addIcon(com.sun.enterprise.tools.common.dd.webservice.IconType value) { 231 return this.addValue(ICON, value); 232 } 233 234 public int removeIcon(com.sun.enterprise.tools.common.dd.webservice.IconType value) { 239 return this.removeValue(ICON, value); 240 } 241 242 public void setHandlerName(java.lang.String value) { 244 this.setValue(HANDLER_NAME, value); 245 } 246 247 public java.lang.String getHandlerName() { 249 return (java.lang.String )this.getValue(HANDLER_NAME); 250 } 251 252 public void setHandlerClass(java.lang.String value) { 254 this.setValue(HANDLER_CLASS, value); 255 } 256 257 public java.lang.String getHandlerClass() { 259 return (java.lang.String )this.getValue(HANDLER_CLASS); 260 } 261 262 public void setInitParam(int index, ParamValueType value) { 264 this.setValue(INIT_PARAM, index, value); 265 } 266 267 public ParamValueType getInitParam(int index) { 269 return (ParamValueType)this.getValue(INIT_PARAM, index); 270 } 271 272 public void setInitParam(ParamValueType[] value) { 274 this.setValue(INIT_PARAM, value); 275 } 276 277 public ParamValueType[] getInitParam() { 279 return (ParamValueType[])this.getValues(INIT_PARAM); 280 } 281 282 public int sizeInitParam() { 284 return this.size(INIT_PARAM); 285 } 286 287 public int addInitParam(com.sun.enterprise.tools.common.dd.webservice.ParamValueType value) { 289 return this.addValue(INIT_PARAM, value); 290 } 291 292 public int removeInitParam(com.sun.enterprise.tools.common.dd.webservice.ParamValueType value) { 297 return this.removeValue(INIT_PARAM, value); 298 } 299 300 public void setSoapHeader(int index, javax.xml.namespace.QName value) { 302 this.setValue(SOAP_HEADER, index, value); 303 } 304 305 public javax.xml.namespace.QName getSoapHeader(int index) { 307 return (javax.xml.namespace.QName )this.getValue(SOAP_HEADER, index); 308 } 309 310 public void setSoapHeader(javax.xml.namespace.QName [] value) { 312 this.setValue(SOAP_HEADER, value); 313 } 314 315 public javax.xml.namespace.QName [] getSoapHeader() { 317 return (javax.xml.namespace.QName [])this.getValues(SOAP_HEADER); 318 } 319 320 public int sizeSoapHeader() { 322 return this.size(SOAP_HEADER); 323 } 324 325 public int addSoapHeader(javax.xml.namespace.QName value) { 327 return this.addValue(SOAP_HEADER, value); 328 } 329 330 public int removeSoapHeader(javax.xml.namespace.QName value) { 335 return this.removeValue(SOAP_HEADER, value); 336 } 337 338 public void setSoapRole(int index, java.lang.String value) { 340 this.setValue(SOAP_ROLE, index, value); 341 } 342 343 public java.lang.String getSoapRole(int index) { 345 return (java.lang.String )this.getValue(SOAP_ROLE, index); 346 } 347 348 public void setSoapRole(java.lang.String [] value) { 350 this.setValue(SOAP_ROLE, value); 351 } 352 353 public java.lang.String [] getSoapRole() { 355 return (java.lang.String [])this.getValues(SOAP_ROLE); 356 } 357 358 public int sizeSoapRole() { 360 return this.size(SOAP_ROLE); 361 } 362 363 public int addSoapRole(java.lang.String value) { 365 return this.addValue(SOAP_ROLE, value); 366 } 367 368 public int removeSoapRole(java.lang.String value) { 373 return this.removeValue(SOAP_ROLE, value); 374 } 375 376 public void setPortName(int index, java.lang.String value) { 378 this.setValue(PORT_NAME, index, value); 379 } 380 381 public java.lang.String getPortName(int index) { 383 return (java.lang.String )this.getValue(PORT_NAME, index); 384 } 385 386 public void setPortName(java.lang.String [] value) { 388 this.setValue(PORT_NAME, value); 389 } 390 391 public java.lang.String [] getPortName() { 393 return (java.lang.String [])this.getValues(PORT_NAME); 394 } 395 396 public int sizePortName() { 398 return this.size(PORT_NAME); 399 } 400 401 public int addPortName(java.lang.String value) { 403 return this.addValue(PORT_NAME, value); 404 } 405 406 public int removePortName(java.lang.String value) { 411 return this.removeValue(PORT_NAME, value); 412 } 413 414 public static void addComparator(org.netbeans.modules.schema2beans.BeanComparator c) { 416 comparators.add(c); 417 } 418 419 public static void removeComparator(org.netbeans.modules.schema2beans.BeanComparator c) { 421 comparators.remove(c); 422 } 423 public void validate() throws org.netbeans.modules.schema2beans.ValidateException { 424 } 425 426 public void dump(StringBuffer str, String indent){ 428 String s; 429 Object o; 430 org.netbeans.modules.schema2beans.BaseBean n; 431 str.append(indent); 432 str.append("Description["+this.sizeDescription()+"]"); for(int i=0; i<this.sizeDescription(); i++) 434 { 435 str.append(indent+"\t"); 436 str.append("#"+i+":"); 437 str.append(indent+"\t"); str.append("<"); s = this.getDescription(i); 440 str.append((s==null?"null":s.trim())); str.append(">\n"); this.dumpAttributes(DESCRIPTION, i, str, indent); 443 } 444 445 str.append(indent); 446 str.append("DisplayName["+this.sizeDisplayName()+"]"); for(int i=0; i<this.sizeDisplayName(); i++) 448 { 449 str.append(indent+"\t"); 450 str.append("#"+i+":"); 451 str.append(indent+"\t"); str.append("<"); s = this.getDisplayName(i); 454 str.append((s==null?"null":s.trim())); str.append(">\n"); this.dumpAttributes(DISPLAY_NAME, i, str, indent); 457 } 458 459 str.append(indent); 460 str.append("Icon["+this.sizeIcon()+"]"); for(int i=0; i<this.sizeIcon(); i++) 462 { 463 str.append(indent+"\t"); 464 str.append("#"+i+":"); 465 n = (org.netbeans.modules.schema2beans.BaseBean) this.getIcon(i); 466 if (n != null) 467 n.dump(str, indent + "\t"); else 469 str.append(indent+"\tnull"); this.dumpAttributes(ICON, i, str, indent); 471 } 472 473 str.append(indent); 474 str.append("HandlerName"); str.append(indent+"\t"); str.append("<"); s = this.getHandlerName(); 478 str.append((s==null?"null":s.trim())); str.append(">\n"); this.dumpAttributes(HANDLER_NAME, 0, str, indent); 481 482 str.append(indent); 483 str.append("HandlerClass"); str.append(indent+"\t"); str.append("<"); s = this.getHandlerClass(); 487 str.append((s==null?"null":s.trim())); str.append(">\n"); this.dumpAttributes(HANDLER_CLASS, 0, str, indent); 490 491 str.append(indent); 492 str.append("InitParam["+this.sizeInitParam()+"]"); for(int i=0; i<this.sizeInitParam(); i++) 494 { 495 str.append(indent+"\t"); 496 str.append("#"+i+":"); 497 n = (org.netbeans.modules.schema2beans.BaseBean) this.getInitParam(i); 498 if (n != null) 499 n.dump(str, indent + "\t"); else 501 str.append(indent+"\tnull"); this.dumpAttributes(INIT_PARAM, i, str, indent); 503 } 504 505 str.append(indent); 506 str.append("SoapHeader["+this.sizeSoapHeader()+"]"); for(int i=0; i<this.sizeSoapHeader(); i++) 508 { 509 str.append(indent+"\t"); 510 str.append("#"+i+":"); 511 str.append(indent+"\t"); str.append("<"); o = this.getSoapHeader(i); 514 str.append((o==null?"null":o.toString().trim())); str.append(">\n"); this.dumpAttributes(SOAP_HEADER, i, str, indent); 517 } 518 519 str.append(indent); 520 str.append("SoapRole["+this.sizeSoapRole()+"]"); for(int i=0; i<this.sizeSoapRole(); i++) 522 { 523 str.append(indent+"\t"); 524 str.append("#"+i+":"); 525 str.append(indent+"\t"); str.append("<"); s = this.getSoapRole(i); 528 str.append((s==null?"null":s.trim())); str.append(">\n"); this.dumpAttributes(SOAP_ROLE, i, str, indent); 531 } 532 533 str.append(indent); 534 str.append("PortName["+this.sizePortName()+"]"); for(int i=0; i<this.sizePortName(); i++) 536 { 537 str.append(indent+"\t"); 538 str.append("#"+i+":"); 539 str.append(indent+"\t"); str.append("<"); s = this.getPortName(i); 542 str.append((s==null?"null":s.trim())); str.append(">\n"); this.dumpAttributes(PORT_NAME, i, str, indent); 545 } 546 547 } 548 public String dumpBeanNode(){ 549 StringBuffer str = new StringBuffer (); 550 str.append("ServiceRefHandlerType\n"); this.dump(str, "\n "); return str.toString(); 553 }} 554 555 557 558 580 | Popular Tags |