1 23 24 34 35 package com.sun.enterprise.tools.common.dd; 36 37 import org.w3c.dom.*; 38 import org.netbeans.modules.schema2beans.*; 39 import java.beans.*; 40 import java.util.*; 41 42 44 public class WebserviceEndpoint extends com.sun.enterprise.tools.common.dd.SunBaseBean 45 { 46 47 static Vector comparators = new Vector(); 48 49 static public final String PORT_COMPONENT_NAME = "PortComponentName"; static public final String ENDPOINT_ADDRESS_URI = "EndpointAddressUri"; static public final String LOGIN_CONFIG = "LoginConfig"; static public final String MESSAGE_SECURITY_BINDING = "MessageSecurityBinding"; static public final String TRANSPORT_GUARANTEE = "TransportGuarantee"; static public final String SERVICE_QNAME = "ServiceQname"; static public final String TIE_CLASS = "TieClass"; static public final String SERVLET_IMPL_CLASS = "ServletImplClass"; 58 public WebserviceEndpoint() { 59 this(Common.USE_DEFAULT_VALUES); 60 } 61 62 public WebserviceEndpoint(int options) 63 { 64 super(comparators, new org.netbeans.modules.schema2beans.Version(1, 2, 0)); 65 this.createProperty("port-component-name", PORT_COMPONENT_NAME, 68 Common.TYPE_1 | Common.TYPE_STRING | Common.TYPE_KEY, 69 String .class); 70 this.createProperty("endpoint-address-uri", ENDPOINT_ADDRESS_URI, 72 Common.TYPE_0_1 | Common.TYPE_STRING | Common.TYPE_KEY, 73 String .class); 74 this.createProperty("login-config", LOGIN_CONFIG, 76 Common.TYPE_0_1 | Common.TYPE_BEAN | Common.TYPE_KEY, 77 LoginConfig.class); 78 this.createProperty("message-security-binding", MESSAGE_SECURITY_BINDING, Common.SEQUENCE_OR | 80 Common.TYPE_1 | Common.TYPE_BEAN | Common.TYPE_KEY, 81 MessageSecurityBinding.class); 82 this.createProperty("transport-guarantee", TRANSPORT_GUARANTEE, 84 Common.TYPE_0_1 | Common.TYPE_STRING | Common.TYPE_KEY, 85 String .class); 86 this.createProperty("service-qname", SERVICE_QNAME, 88 Common.TYPE_0_1 | Common.TYPE_BEAN | Common.TYPE_KEY, 89 ServiceQname.class); 90 this.createProperty("tie-class", TIE_CLASS, 92 Common.TYPE_0_1 | Common.TYPE_STRING | Common.TYPE_KEY, 93 String .class); 94 this.createProperty("servlet-impl-class", SERVLET_IMPL_CLASS, 96 Common.TYPE_0_1 | Common.TYPE_STRING | Common.TYPE_KEY, 97 String .class); 98 this.initialize(options); 99 } 100 101 void initialize(int options) 103 { 104 105 } 106 107 public void setPortComponentName(String value) { 109 this.setValue(PORT_COMPONENT_NAME, value); 110 } 111 112 public String getPortComponentName() { 114 return (String )this.getValue(PORT_COMPONENT_NAME); 115 } 116 117 public void setEndpointAddressUri(String value) { 119 this.setValue(ENDPOINT_ADDRESS_URI, value); 120 } 121 122 public String getEndpointAddressUri() { 124 return (String )this.getValue(ENDPOINT_ADDRESS_URI); 125 } 126 127 public void setLoginConfig(LoginConfig value) { 129 this.setValue(LOGIN_CONFIG, value); 130 if (value != null) { 131 setMessageSecurityBinding(null); 133 } 134 } 135 136 public void setMessageSecurityBinding(MessageSecurityBinding value) { 138 this.setValue(MESSAGE_SECURITY_BINDING, value); 139 if (value != null) { 140 setLoginConfig(null); 142 } 143 } 144 145 public LoginConfig getLoginConfig() { 147 return (LoginConfig)this.getValue(LOGIN_CONFIG); 148 } 149 150 public MessageSecurityBinding getMessageSecurityBinding() { 152 return (MessageSecurityBinding)this.getValue(MESSAGE_SECURITY_BINDING); 153 } 154 155 public void setTransportGuarantee(String value) { 157 this.setValue(TRANSPORT_GUARANTEE, value); 158 } 159 160 public String getTransportGuarantee() { 162 return (String )this.getValue(TRANSPORT_GUARANTEE); 163 } 164 165 public void setServiceQname(ServiceQname value) { 167 this.setValue(SERVICE_QNAME, value); 168 } 169 170 public ServiceQname getServiceQname() { 172 return (ServiceQname)this.getValue(SERVICE_QNAME); 173 } 174 175 public void setTieClass(String value) { 177 this.setValue(TIE_CLASS, value); 178 } 179 180 public String getTieClass() { 182 return (String )this.getValue(TIE_CLASS); 183 } 184 185 public void setServletImplClass(String value) { 187 this.setValue(SERVLET_IMPL_CLASS, value); 188 } 189 190 public String getServletImplClass() { 192 return (String )this.getValue(SERVLET_IMPL_CLASS); 193 } 194 195 public static void addComparator(org.netbeans.modules.schema2beans.BeanComparator c) { 197 comparators.add(c); 198 } 199 200 public static void removeComparator(org.netbeans.modules.schema2beans.BeanComparator c) { 202 comparators.remove(c); 203 } 204 public void validate() throws org.netbeans.modules.schema2beans.ValidateException { 205 boolean restrictionFailure = false; 206 if (getPortComponentName() == null) { 208 throw new org.netbeans.modules.schema2beans.ValidateException("getPortComponentName() == null", "portComponentName", this); } 210 if (getEndpointAddressUri() != null) { 212 } 213 if (getLoginConfig() != null) { 215 getLoginConfig().validate(); 216 } 217 if (getTransportGuarantee() != null) { 219 } 220 if (getServiceQname() != null) { 222 getServiceQname().validate(); 223 } 224 if (getTieClass() != null) { 226 } 227 if (getServletImplClass() != null) { 229 } 230 } 231 232 public void dump(StringBuffer str, String indent){ 234 String s; 235 Object o; 236 org.netbeans.modules.schema2beans.BaseBean n; 237 str.append(indent); 238 str.append("PortComponentName"); str.append(indent+"\t"); str.append("<"); s = this.getPortComponentName(); 242 str.append((s==null?"null":s.trim())); str.append(">\n"); this.dumpAttributes(PORT_COMPONENT_NAME, 0, str, indent); 245 246 str.append(indent); 247 str.append("EndpointAddressUri"); str.append(indent+"\t"); str.append("<"); s = this.getEndpointAddressUri(); 251 str.append((s==null?"null":s.trim())); str.append(">\n"); this.dumpAttributes(ENDPOINT_ADDRESS_URI, 0, str, indent); 254 255 str.append(indent); 256 str.append("LoginConfig"); n = (org.netbeans.modules.schema2beans.BaseBean) this.getLoginConfig(); 258 if (n != null) 259 n.dump(str, indent + "\t"); else 261 str.append(indent+"\tnull"); this.dumpAttributes(LOGIN_CONFIG, 0, str, indent); 263 264 str.append(indent); 265 str.append("MessageSecurityBinding"); n = (org.netbeans.modules.schema2beans.BaseBean) this.getMessageSecurityBinding(); 267 if (n != null) 268 n.dump(str, indent + "\t"); else 270 str.append(indent+"\tnull"); this.dumpAttributes(MESSAGE_SECURITY_BINDING, 0, str, indent); 272 273 str.append(indent); 274 str.append("TransportGuarantee"); str.append(indent+"\t"); str.append("<"); s = this.getTransportGuarantee(); 278 str.append((s==null?"null":s.trim())); str.append(">\n"); this.dumpAttributes(TRANSPORT_GUARANTEE, 0, str, indent); 281 282 str.append(indent); 283 str.append("ServiceQname"); n = (org.netbeans.modules.schema2beans.BaseBean) this.getServiceQname(); 285 if (n != null) 286 n.dump(str, indent + "\t"); else 288 str.append(indent+"\tnull"); this.dumpAttributes(SERVICE_QNAME, 0, str, indent); 290 291 str.append(indent); 292 str.append("TieClass"); str.append(indent+"\t"); str.append("<"); s = this.getTieClass(); 296 str.append((s==null?"null":s.trim())); str.append(">\n"); this.dumpAttributes(TIE_CLASS, 0, str, indent); 299 300 str.append(indent); 301 str.append("ServletImplClass"); str.append(indent+"\t"); str.append("<"); s = this.getServletImplClass(); 305 str.append((s==null?"null":s.trim())); str.append(">\n"); this.dumpAttributes(SERVLET_IMPL_CLASS, 0, str, indent); 308 309 } 310 public String dumpBeanNode(){ 311 StringBuffer str = new StringBuffer (); 312 str.append("WebserviceEndpoint\n"); this.dump(str, "\n "); return str.toString(); 315 }} 316 317 319 320 593 | Popular Tags |