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 PortComponentType 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 PORT_COMPONENT_NAME = "PortComponentName"; static public final String WSDL_PORT = "WsdlPort"; static public final String SERVICE_ENDPOINT_INTERFACE = "ServiceEndpointInterface"; static public final String SERVICE_IMPL_BEAN = "ServiceImplBean"; static public final String HANDLER = "Handler"; 41 public PortComponentType() { 42 this(Common.USE_DEFAULT_VALUES); 43 } 44 45 public PortComponentType(int options) 46 { 47 super(comparators, new org.netbeans.modules.schema2beans.Version(1, 2, 0)); 48 this.createProperty("description", DESCRIPTION, 51 Common.TYPE_0_1 | Common.TYPE_STRING | Common.TYPE_KEY, 52 java.lang.String .class); 53 this.createAttribute(DESCRIPTION, "id", "Id", 54 AttrProp.CDATA | AttrProp.IMPLIED, 55 null, null); 56 this.createAttribute(DESCRIPTION, "xml:lang", "XmlLang", 57 AttrProp.CDATA | AttrProp.IMPLIED, 58 null, null); 59 this.createProperty("display-name", DISPLAY_NAME, 61 Common.TYPE_0_1 | Common.TYPE_STRING | Common.TYPE_KEY, 62 java.lang.String .class); 63 this.createAttribute(DISPLAY_NAME, "id", "Id", 64 AttrProp.CDATA | AttrProp.IMPLIED, 65 null, null); 66 this.createAttribute(DISPLAY_NAME, "xml:lang", "XmlLang", 67 AttrProp.CDATA | AttrProp.IMPLIED, 68 null, null); 69 this.createProperty("icon", ICON, 71 Common.TYPE_0_1 | Common.TYPE_BEAN | Common.TYPE_KEY, 72 IconType.class); 73 this.createAttribute(ICON, "xml:lang", "XmlLang", 74 AttrProp.CDATA | AttrProp.IMPLIED, 75 null, null); 76 this.createAttribute(ICON, "id", "Id", 77 AttrProp.CDATA | AttrProp.IMPLIED, 78 null, null); 79 this.createProperty("port-component-name", PORT_COMPONENT_NAME, 81 Common.TYPE_1 | Common.TYPE_STRING | Common.TYPE_KEY, 82 java.lang.String .class); 83 this.createAttribute(PORT_COMPONENT_NAME, "id", "Id", 84 AttrProp.CDATA | AttrProp.IMPLIED, 85 null, null); 86 this.createProperty("wsdl-port", WSDL_PORT, 88 Common.TYPE_1 | Common.TYPE_STRING | Common.TYPE_KEY, 89 javax.xml.namespace.QName .class); 90 this.createAttribute(WSDL_PORT, "id", "Id", 91 AttrProp.CDATA | AttrProp.IMPLIED, 92 null, null); 93 this.createProperty("service-endpoint-interface", SERVICE_ENDPOINT_INTERFACE, 95 Common.TYPE_1 | Common.TYPE_STRING | Common.TYPE_KEY, 96 java.lang.String .class); 97 this.createProperty("service-impl-bean", SERVICE_IMPL_BEAN, 99 Common.TYPE_1 | Common.TYPE_BEAN | Common.TYPE_KEY, 100 ServiceImplBeanType.class); 101 this.createAttribute(SERVICE_IMPL_BEAN, "id", "Id", 102 AttrProp.CDATA | AttrProp.IMPLIED, 103 null, null); 104 this.createProperty("handler", HANDLER, 106 Common.TYPE_0_N | Common.TYPE_BEAN | Common.TYPE_KEY, 107 PortComponentHandlerType.class); 108 this.createAttribute(HANDLER, "id", "Id", 109 AttrProp.CDATA | AttrProp.IMPLIED, 110 null, null); 111 this.initialize(options); 112 } 113 114 void initialize(int options) 116 { 117 118 } 119 120 public void setDescription(java.lang.String value) { 122 this.setValue(DESCRIPTION, value); 123 } 124 125 public java.lang.String getDescription() { 127 return (java.lang.String )this.getValue(DESCRIPTION); 128 } 129 130 public void setDisplayName(java.lang.String value) { 132 this.setValue(DISPLAY_NAME, value); 133 } 134 135 public java.lang.String getDisplayName() { 137 return (java.lang.String )this.getValue(DISPLAY_NAME); 138 } 139 140 public void setIcon(IconType value) { 142 this.setValue(ICON, value); 143 } 144 145 public IconType getIcon() { 147 return (IconType)this.getValue(ICON); 148 } 149 150 public void setPortComponentName(java.lang.String value) { 152 this.setValue(PORT_COMPONENT_NAME, value); 153 } 154 155 public java.lang.String getPortComponentName() { 157 return (java.lang.String )this.getValue(PORT_COMPONENT_NAME); 158 } 159 160 public void setWsdlPort(javax.xml.namespace.QName value) { 162 this.setValue(WSDL_PORT, value); 163 } 164 165 public javax.xml.namespace.QName getWsdlPort() { 167 return (javax.xml.namespace.QName )this.getValue(WSDL_PORT); 168 } 169 170 public void setServiceEndpointInterface(java.lang.String value) { 172 this.setValue(SERVICE_ENDPOINT_INTERFACE, value); 173 } 174 175 public java.lang.String getServiceEndpointInterface() { 177 return (java.lang.String )this.getValue(SERVICE_ENDPOINT_INTERFACE); 178 } 179 180 public void setServiceImplBean(ServiceImplBeanType value) { 182 this.setValue(SERVICE_IMPL_BEAN, value); 183 } 184 185 public ServiceImplBeanType getServiceImplBean() { 187 return (ServiceImplBeanType)this.getValue(SERVICE_IMPL_BEAN); 188 } 189 190 public void setHandler(int index, PortComponentHandlerType value) { 192 this.setValue(HANDLER, index, value); 193 } 194 195 public PortComponentHandlerType getHandler(int index) { 197 return (PortComponentHandlerType)this.getValue(HANDLER, index); 198 } 199 200 public void setHandler(PortComponentHandlerType[] value) { 202 this.setValue(HANDLER, value); 203 } 204 205 public PortComponentHandlerType[] getHandler() { 207 return (PortComponentHandlerType[])this.getValues(HANDLER); 208 } 209 210 public int sizeHandler() { 212 return this.size(HANDLER); 213 } 214 215 public int addHandler(com.sun.enterprise.tools.common.dd.webservice.PortComponentHandlerType value) { 217 return this.addValue(HANDLER, value); 218 } 219 220 public int removeHandler(com.sun.enterprise.tools.common.dd.webservice.PortComponentHandlerType value) { 225 return this.removeValue(HANDLER, value); 226 } 227 228 public static void addComparator(org.netbeans.modules.schema2beans.BeanComparator c) { 230 comparators.add(c); 231 } 232 233 public static void removeComparator(org.netbeans.modules.schema2beans.BeanComparator c) { 235 comparators.remove(c); 236 } 237 public void validate() throws org.netbeans.modules.schema2beans.ValidateException { 238 } 239 240 public void dump(StringBuffer str, String indent){ 242 String s; 243 Object o; 244 org.netbeans.modules.schema2beans.BaseBean n; 245 str.append(indent); 246 str.append("Description"); str.append(indent+"\t"); str.append("<"); s = this.getDescription(); 250 str.append((s==null?"null":s.trim())); str.append(">\n"); this.dumpAttributes(DESCRIPTION, 0, str, indent); 253 254 str.append(indent); 255 str.append("DisplayName"); str.append(indent+"\t"); str.append("<"); s = this.getDisplayName(); 259 str.append((s==null?"null":s.trim())); str.append(">\n"); this.dumpAttributes(DISPLAY_NAME, 0, str, indent); 262 263 str.append(indent); 264 str.append("Icon"); n = (org.netbeans.modules.schema2beans.BaseBean) this.getIcon(); 266 if (n != null) 267 n.dump(str, indent + "\t"); else 269 str.append(indent+"\tnull"); this.dumpAttributes(ICON, 0, str, indent); 271 272 str.append(indent); 273 str.append("PortComponentName"); str.append(indent+"\t"); str.append("<"); s = this.getPortComponentName(); 277 str.append((s==null?"null":s.trim())); str.append(">\n"); this.dumpAttributes(PORT_COMPONENT_NAME, 0, str, indent); 280 281 str.append(indent); 282 str.append("WsdlPort"); str.append(indent+"\t"); str.append("<"); o = this.getWsdlPort(); 286 str.append((o==null?"null":o.toString().trim())); str.append(">\n"); this.dumpAttributes(WSDL_PORT, 0, str, indent); 289 290 str.append(indent); 291 str.append("ServiceEndpointInterface"); str.append(indent+"\t"); str.append("<"); s = this.getServiceEndpointInterface(); 295 str.append((s==null?"null":s.trim())); str.append(">\n"); this.dumpAttributes(SERVICE_ENDPOINT_INTERFACE, 0, str, indent); 298 299 str.append(indent); 300 str.append("ServiceImplBean"); n = (org.netbeans.modules.schema2beans.BaseBean) this.getServiceImplBean(); 302 if (n != null) 303 n.dump(str, indent + "\t"); else 305 str.append(indent+"\tnull"); this.dumpAttributes(SERVICE_IMPL_BEAN, 0, str, indent); 307 308 str.append(indent); 309 str.append("Handler["+this.sizeHandler()+"]"); for(int i=0; i<this.sizeHandler(); i++) 311 { 312 str.append(indent+"\t"); 313 str.append("#"+i+":"); 314 n = (org.netbeans.modules.schema2beans.BaseBean) this.getHandler(i); 315 if (n != null) 316 n.dump(str, indent + "\t"); else 318 str.append(indent+"\tnull"); this.dumpAttributes(HANDLER, i, str, indent); 320 } 321 322 } 323 public String dumpBeanNode(){ 324 StringBuffer str = new StringBuffer (); 325 str.append("PortComponentType\n"); this.dump(str, "\n "); return str.toString(); 328 }} 329 330 332 333 355 | Popular Tags |