KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > com > sun > enterprise > tools > common > dd > PortInfo


1 /*
2  * The contents of this file are subject to the terms
3  * of the Common Development and Distribution License
4  * (the License). You may not use this file except in
5  * compliance with the License.
6  *
7  * You can obtain a copy of the license at
8  * https://glassfish.dev.java.net/public/CDDLv1.0.html or
9  * glassfish/bootstrap/legal/CDDLv1.0.txt.
10  * See the License for the specific language governing
11  * permissions and limitations under the License.
12  *
13  * When distributing Covered Code, include this CDDL
14  * Header Notice in each file and include the License file
15  * at glassfish/bootstrap/legal/CDDLv1.0.txt.
16  * If applicable, add the following below the CDDL Header,
17  * with the fields enclosed by brackets [] replaced by
18  * you own identifying information:
19  * "Portions Copyrighted [year] [name of copyright owner]"
20  *
21  * Copyright 2006 Sun Microsystems, Inc. All rights reserved.
22  */

23
24 /**
25  * This generated bean class PortInfo matches the schema element port-info
26  *
27  * Generated on Wed Aug 13 12:12:27 PDT 2003
28  */

29
30 package com.sun.enterprise.tools.common.dd;
31
32 import org.w3c.dom.*;
33 import org.netbeans.modules.schema2beans.*;
34 import java.beans.*;
35 import java.util.*;
36
37 // BEGIN_NOI18N
38

39 public class PortInfo extends com.sun.enterprise.tools.common.dd.SunBaseBean
40 {
41
42     static Vector comparators = new Vector();
43
44     static public final String JavaDoc SERVICE_ENDPOINT_INTERFACE = "ServiceEndpointInterface"; // NOI18N
45
static public final String JavaDoc WSDL_PORT = "WsdlPort"; // NOI18N
46
static public final String JavaDoc STUB_PROPERTY = "StubProperty"; // NOI18N
47
static public final String JavaDoc CALL_PROPERTY = "CallProperty"; // NOI18N
48

49     public PortInfo() {
50         this(Common.USE_DEFAULT_VALUES);
51     }
52
53     public PortInfo(int options)
54     {
55         super(comparators, new org.netbeans.modules.schema2beans.Version(1, 2, 0));
56         // Properties (see root bean comments for the bean graph)
57
this.createProperty("service-endpoint-interface", // NOI18N
58
SERVICE_ENDPOINT_INTERFACE,
59             Common.TYPE_0_1 | Common.TYPE_STRING | Common.TYPE_KEY,
60             String JavaDoc.class);
61         this.createProperty("wsdl-port", // NOI18N
62
WSDL_PORT,
63             Common.TYPE_0_1 | Common.TYPE_BEAN | Common.TYPE_KEY,
64             WsdlPort.class);
65         this.createProperty("stub-property", // NOI18N
66
STUB_PROPERTY,
67             Common.TYPE_0_N | Common.TYPE_BEAN | Common.TYPE_KEY,
68             StubProperty.class);
69         this.createProperty("call-property", // NOI18N
70
CALL_PROPERTY,
71             Common.TYPE_0_N | Common.TYPE_BEAN | Common.TYPE_KEY,
72             CallProperty.class);
73         this.initialize(options);
74     }
75
76     // Setting the default values of the properties
77
void initialize(int options)
78     {
79     
80     }
81
82     // This attribute is optional
83
public void setServiceEndpointInterface(String JavaDoc value) {
84         this.setValue(SERVICE_ENDPOINT_INTERFACE, value);
85     }
86
87     //
88
public String JavaDoc getServiceEndpointInterface() {
89         return (String JavaDoc)this.getValue(SERVICE_ENDPOINT_INTERFACE);
90     }
91
92     // This attribute is optional
93
public void setWsdlPort(WsdlPort value) {
94         this.setValue(WSDL_PORT, value);
95     }
96
97     //
98
public WsdlPort getWsdlPort() {
99         return (WsdlPort)this.getValue(WSDL_PORT);
100     }
101
102     // This attribute is an array, possibly empty
103
public void setStubProperty(int index, StubProperty value) {
104         this.setValue(STUB_PROPERTY, index, value);
105     }
106
107     //
108
public StubProperty getStubProperty(int index) {
109         return (StubProperty)this.getValue(STUB_PROPERTY, index);
110     }
111
112     // This attribute is an array, possibly empty
113
public void setStubProperty(StubProperty[] value) {
114         this.setValue(STUB_PROPERTY, value);
115     }
116
117     //
118
public StubProperty[] getStubProperty() {
119         return (StubProperty[])this.getValues(STUB_PROPERTY);
120     }
121
122     // Return the number of properties
123
public int sizeStubProperty() {
124         return this.size(STUB_PROPERTY);
125     }
126
127     // Add a new element returning its index in the list
128
public int addStubProperty(com.sun.enterprise.tools.common.dd.StubProperty value) {
129         return this.addValue(STUB_PROPERTY, value);
130     }
131
132     //
133
// Remove an element using its reference
134
// Returns the index the element had in the list
135
//
136
public int removeStubProperty(com.sun.enterprise.tools.common.dd.StubProperty value) {
137         return this.removeValue(STUB_PROPERTY, value);
138     }
139
140     // This attribute is an array, possibly empty
141
public void setCallProperty(int index, CallProperty value) {
142         this.setValue(CALL_PROPERTY, index, value);
143     }
144
145     //
146
public CallProperty getCallProperty(int index) {
147         return (CallProperty)this.getValue(CALL_PROPERTY, index);
148     }
149
150     // This attribute is an array, possibly empty
151
public void setCallProperty(CallProperty[] value) {
152         this.setValue(CALL_PROPERTY, value);
153     }
154
155     //
156
public CallProperty[] getCallProperty() {
157         return (CallProperty[])this.getValues(CALL_PROPERTY);
158     }
159
160     // Return the number of properties
161
public int sizeCallProperty() {
162         return this.size(CALL_PROPERTY);
163     }
164
165     // Add a new element returning its index in the list
166
public int addCallProperty(com.sun.enterprise.tools.common.dd.CallProperty value) {
167         return this.addValue(CALL_PROPERTY, value);
168     }
169
170     //
171
// Remove an element using its reference
172
// Returns the index the element had in the list
173
//
174
public int removeCallProperty(com.sun.enterprise.tools.common.dd.CallProperty value) {
175         return this.removeValue(CALL_PROPERTY, value);
176     }
177
178     //
179
public static void addComparator(org.netbeans.modules.schema2beans.BeanComparator c) {
180         comparators.add(c);
181     }
182
183     //
184
public static void removeComparator(org.netbeans.modules.schema2beans.BeanComparator c) {
185         comparators.remove(c);
186     }
187     public void validate() throws org.netbeans.modules.schema2beans.ValidateException {
188         boolean restrictionFailure = false;
189         // Validating property serviceEndpointInterface
190
if (getServiceEndpointInterface() != null) {
191         }
192         // Validating property wsdlPort
193
if (getWsdlPort() != null) {
194             getWsdlPort().validate();
195         }
196         // Validating property stubProperty
197
for (int _index = 0; _index < sizeStubProperty(); ++_index) {
198             com.sun.enterprise.tools.common.dd.StubProperty element = getStubProperty(_index);
199             if (element != null) {
200                 element.validate();
201             }
202         }
203         // Validating property callProperty
204
for (int _index = 0; _index < sizeCallProperty(); ++_index) {
205             com.sun.enterprise.tools.common.dd.CallProperty element = getCallProperty(_index);
206             if (element != null) {
207                 element.validate();
208             }
209         }
210     }
211
212     // Dump the content of this bean returning it as a String
213
public void dump(StringBuffer JavaDoc str, String JavaDoc indent){
214         String JavaDoc s;
215         Object JavaDoc o;
216         org.netbeans.modules.schema2beans.BaseBean n;
217         str.append(indent);
218         str.append("ServiceEndpointInterface"); // NOI18N
219
str.append(indent+"\t"); // NOI18N
220
str.append("<"); // NOI18N
221
s = this.getServiceEndpointInterface();
222         str.append((s==null?"null":s.trim())); // NOI18N
223
str.append(">\n"); // NOI18N
224
this.dumpAttributes(SERVICE_ENDPOINT_INTERFACE, 0, str, indent);
225
226         str.append(indent);
227         str.append("WsdlPort"); // NOI18N
228
n = (org.netbeans.modules.schema2beans.BaseBean) this.getWsdlPort();
229         if (n != null)
230             n.dump(str, indent + "\t"); // NOI18N
231
else
232             str.append(indent+"\tnull"); // NOI18N
233
this.dumpAttributes(WSDL_PORT, 0, str, indent);
234
235         str.append(indent);
236         str.append("StubProperty["+this.sizeStubProperty()+"]"); // NOI18N
237
for(int i=0; i<this.sizeStubProperty(); i++)
238         {
239             str.append(indent+"\t");
240             str.append("#"+i+":");
241             n = (org.netbeans.modules.schema2beans.BaseBean) this.getStubProperty(i);
242             if (n != null)
243                 n.dump(str, indent + "\t"); // NOI18N
244
else
245                 str.append(indent+"\tnull"); // NOI18N
246
this.dumpAttributes(STUB_PROPERTY, i, str, indent);
247         }
248
249         str.append(indent);
250         str.append("CallProperty["+this.sizeCallProperty()+"]"); // NOI18N
251
for(int i=0; i<this.sizeCallProperty(); i++)
252         {
253             str.append(indent+"\t");
254             str.append("#"+i+":");
255             n = (org.netbeans.modules.schema2beans.BaseBean) this.getCallProperty(i);
256             if (n != null)
257                 n.dump(str, indent + "\t"); // NOI18N
258
else
259                 str.append(indent+"\tnull"); // NOI18N
260
this.dumpAttributes(CALL_PROPERTY, i, str, indent);
261         }
262
263     }
264     public String JavaDoc dumpBeanNode(){
265         StringBuffer JavaDoc str = new StringBuffer JavaDoc();
266         str.append("PortInfo\n"); // NOI18N
267
this.dump(str, "\n "); // NOI18N
268
return str.toString();
269     }}
270
271 // END_NOI18N
272

273
274 /*
275         The following schema file has been used for generation:
276
277 <!--
278 This is the root element which binds an ejb reference to a jndi name.
279 -->
280 <!ELEMENT ejb-ref (ejb-ref-name, jndi-name)>
281
282 <!--
283 This node holds all the runtime bindings of a resource env reference.
284 -->
285 <!ELEMENT resource-env-ref ( resource-env-ref-name, jndi-name )>
286
287 <!--
288 This node holds all the runtime bindings of a resource reference.
289 -->
290 <!ELEMENT resource-ref (res-ref-name, jndi-name, default-resource-principal?)>
291
292 <!ELEMENT default-resource-principal (name, password)>
293
294 <!ELEMENT security-role-mapping (role-name, (principal-name | group-name)+)>
295
296 <!--
297 Information about a web service endpoint.
298 -->
299 <!ELEMENT webservice-endpoint ( port-component-name, endpoint-address-uri?, login-config?, transport-guarantee?, service-qname?, tie-class?, servlet-impl-class? )>
300
301 <!--
302 Optional authentication configuration for an EJB web service endpoint.
303 Not needed for servet web service endpoints. Their security configuration
304 is contained in the standard web application descriptor.
305 -->
306 <!ELEMENT login-config ( auth-method )>
307
308 <!--
309 The service-qname element declares the specific WSDL service
310 element that is being refered to. It is not set by the deployer.
311 It is derived during deployment.
312 -->
313 <!ELEMENT service-qname (namespaceURI, localpart)>
314
315 <!--
316 Runtime information about a web service.
317 wsdl-publish-location is optionally used to specify
318 where the final wsdl and any dependent files should be stored. This location
319 resides on the file system from which deployment is initiated.
320 -->
321 <!ELEMENT webservice-description ( webservice-description-name, wsdl-publish-location? )>
322
323 <!--
324 Runtime settings for a web service reference. In the simplest case,
325 there is no runtime information required for a service ref. Runtime info
326 is only needed in the following cases :
327  * to define the port that should be used to resolve a container-managed port
328  * to define default Stub/Call property settings for Stub objects
329  * to define the URL of a final WSDL document to be used instead of
330 the one packaged with a service-ref
331 -->
332 <!ELEMENT service-ref ( service-ref-name, port-info*, call-property*, wsdl-override?, service-impl-class?, service-qname? )>
333
334 <!--
335 Information for a port within a service-reference.
336
337 Either service-endpoint-interface or wsdl-port or both
338 (service-endpoint-interface and wsdl-port) should be specified.
339
340 If both are specified, wsdl-port represents the
341 port the container should choose for container-managed port selection.
342
343 The same wsdl-port value must not appear in
344 more than one port-info entry within the same service-ref.
345
346 If a particular service-endpoint-interface is using container-managed port
347 selection, it must not appear in more than one port-info entry
348 within the same service-ref.
349 -->
350 <!ELEMENT port-info ( service-endpoint-interface?, wsdl-port?, stub-property*, call-property* )>
351
352 <!--
353 Port used in port-info.
354 -->
355 <!ELEMENT wsdl-port ( namespaceURI, localpart )>
356
357 <!--
358 JAXRPC property values that should be set on a stub before it's returned to
359 to the web service client. The property names can be any properties supported
360 by the JAXRPC Stub implementation. See javadoc for javax.xml.rpc.Stub
361 -->
362 <!ELEMENT stub-property ( name, value )>
363
364 <!--
365 JAXRPC property values that should be set on a Call object before it's
366 returned to the web service client. The property names can be any
367 properties supported by the JAXRPC Call implementation. See javadoc
368 for javax.xml.rpc.Call
369 -->
370 <!ELEMENT call-property ( name, value )>
371
372 <!--
373 This info is used only by studio plug-in;it is NOT the part of the orgianl DTD.
374 Used by plugin to store parameters needed to execute an Application client.
375 -->
376 <!ELEMENT plugin-data ( auto-generate-sql?, client-jar-path?, client-args? )>
377 <!ELEMENT auto-generate-sql (#PCDATA)>
378 <!ELEMENT client-jar-path (#PCDATA)>
379 <!ELEMENT client-args (#PCDATA)>
380
381 <!--
382 The ejb ref name locates the name of the ejb reference in the application.
383 -->
384 <!ELEMENT ejb-ref-name (#PCDATA)>
385
386 <!--
387 The text in this node is a jndi name.
388 -->
389 <!ELEMENT jndi-name (#PCDATA)>
390
391 <!--
392 The name of a resource env reference.
393 -->
394 <!ELEMENT resource-env-ref-name (#PCDATA)>
395
396 <!--
397 The name of a resource reference.
398 -->
399 <!ELEMENT res-ref-name (#PCDATA)>
400
401 <!--
402 This text nodes holds a name string.
403 -->
404 <!ELEMENT name (#PCDATA)>
405
406 <!--
407 This element holds password text.
408 -->
409 <!ELEMENT password (#PCDATA)>
410
411 <!ELEMENT role-name (#PCDATA)>
412
413 <!ELEMENT principal-name (#PCDATA)>
414
415 <!ELEMENT group-name (#PCDATA)>
416
417 <!--
418 Unique name of a port component within a module
419 -->
420 <!ELEMENT port-component-name ( #PCDATA )>
421
422 <!--
423 Relative path combined with web server root to form fully qualified
424 endpoint address for a web service endpoint. For servlet endpoints, this
425 value is relative to the servlet's web application context root. In
426 all cases, this value must be a fixed pattern(i.e. no "*" allowed).
427 If the web service endpoint is a servlet that only implements a single
428 endpoint has only one url-pattern, it is not necessary to set
429 this value since the container can derive it from web.xml.
430 -->
431 <!ELEMENT endpoint-address-uri ( #PCDATA )>
432
433 <!--
434 The namespaceURI element indicates a URI.
435 -->
436 <!ELEMENT namespaceURI (#PCDATA)>
437
438 <!--
439 The localpart element indicates the local part of a QNAME.
440 -->
441 <!ELEMENT localpart (#PCDATA)>
442
443 <!--
444 auth-method element describes the authentication method. The only supported value
445 is USERNAME_PASSWORD
446 -->
447 <!ELEMENT auth-method ( #PCDATA )>
448
449 <!--
450 Specifies that the communication between client and server should
451 be NONE, INTEGRAL, or CONFIDENTIAL. NONE means that the application
452 does not require any transport guarantees. A value of INTEGRAL means
453 that the application requires that the data sent between the client
454 and server be sent in such a way that it can't be changed in transit.
455 CONFIDENTIAL means that the application requires that the data be
456 transmitted in a fashion that prevents other entities from observing
457 the contents of the transmission. In most cases, the presence of the
458 INTEGRAL or CONFIDENTIAL flag will indicate that the use of SSL is
459 required.
460 -->
461 <!ELEMENT transport-guarantee ( #PCDATA )>
462
463 <!--
464 The name of tie implementation class for a port-component. This is
465 not specified by the deployer. It is derived during deployment.
466 -->
467 <!ELEMENT tie-class (#PCDATA)>
468
469 <!--
470 Name of application-written servlet impl class contained in deployed war.
471 This is not set by the deployer. It is derived by the container
472 during deployment.
473 -->
474 <!ELEMENT servlet-impl-class (#PCDATA)>
475
476 <!--
477 Unique name of a webservice within a module
478 -->
479 <!ELEMENT webservice-description-name ( #PCDATA )>
480
481 <!--
482 file: URL of a directory to which a web-service-description's wsdl should be
483 published during deployment. Any required files will be published to this
484 directory, preserving their location relative to the module-specific
485 wsdl directory(META-INF/wsdl or WEB-INF/wsdl).
486
487 Example :
488
489   For an ejb.jar whose webservices.xml wsdl-file element contains
490     META-INF/wsdl/a/Foo.wsdl
491
492   <wsdl-publish-location>file:/home/user1/publish
493   </wsdl-publish-location>
494
495   The final wsdl will be stored in /home/user1/publish/a/Foo.wsdl
496 -->
497 <!ELEMENT wsdl-publish-location ( #PCDATA )>
498
499 <!--
500 Coded name (relative to java:comp/env) for a service-reference
501 -->
502 <!ELEMENT service-ref-name ( #PCDATA )>
503
504 <!--
505 Fully qualified name of service endpoint interface
506 -->
507 <!ELEMENT service-endpoint-interface ( #PCDATA )>
508
509 <!--
510 This text nodes holds a value string.
511 -->
512 <!ELEMENT value (#PCDATA)>
513
514 <!--
515 This is a valid URL pointing to a final WSDL document. It is optional.
516 If specified, the WSDL document at this URL will be used during
517 deployment instead of the WSDL document associated with the
518 service-ref in the standard deployment descriptor.
519
520 Examples :
521
522   // available via HTTP
523   <wsdl-override>http://localhost:8000/myservice/myport?WSDL</wsdl-override>
524
525   // in a file
526   <wsdl-override>file:/home/user1/myfinalwsdl.wsdl</wsdl-override>
527 -->
528 <!ELEMENT wsdl-override ( #PCDATA )>
529
530 <!--
531 Name of generated service implementation class. This is not set by the
532 deployer. It is derived during deployment.
533 -->
534 <!ELEMENT service-impl-class ( #PCDATA )>
535
536 <!--
537 This node holds information about a logical message destination
538 -->
539 <!ELEMENT message-destination (message-destination-name, jndi-name)>
540
541 <!--
542 This node holds the name of a logical message destination
543 -->
544 <!ELEMENT message-destination-name (#PCDATA)>
545
546 */

547
Popular Tags