KickJava   Java API By Example, From Geeks To Geeks.

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


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 StubProperty matches the schema element stub-property
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 StubProperty extends com.sun.enterprise.tools.common.dd.SunBaseBean
40 {
41
42     static Vector comparators = new Vector();
43
44     static public final String JavaDoc NAME = "Name"; // NOI18N
45
static public final String JavaDoc VALUE = "Value"; // NOI18N
46

47     public StubProperty() {
48         this(Common.USE_DEFAULT_VALUES);
49     }
50
51     public StubProperty(int options)
52     {
53         super(comparators, new org.netbeans.modules.schema2beans.Version(1, 2, 0));
54         // Properties (see root bean comments for the bean graph)
55
this.createProperty("name", // NOI18N
56
NAME,
57             Common.TYPE_1 | Common.TYPE_STRING | Common.TYPE_KEY,
58             String JavaDoc.class);
59         this.createProperty("value", // NOI18N
60
VALUE,
61             Common.TYPE_1 | Common.TYPE_STRING | Common.TYPE_KEY,
62             String JavaDoc.class);
63         this.initialize(options);
64     }
65
66     // Setting the default values of the properties
67
void initialize(int options)
68     {
69         
70     }
71
72     // This attribute is mandatory
73
public void setName(String JavaDoc value) {
74         this.setValue(NAME, value);
75     }
76
77     //
78
public String JavaDoc getName() {
79         return (String JavaDoc)this.getValue(NAME);
80     }
81
82     // This attribute is mandatory
83
public void setValue(String JavaDoc value) {
84         this.setValue(VALUE, value);
85     }
86
87     //
88
public String JavaDoc getValue() {
89         return (String JavaDoc)this.getValue(VALUE);
90     }
91
92     //
93
public static void addComparator(org.netbeans.modules.schema2beans.BeanComparator c) {
94         comparators.add(c);
95     }
96
97     //
98
public static void removeComparator(org.netbeans.modules.schema2beans.BeanComparator c) {
99         comparators.remove(c);
100     }
101     public void validate() throws org.netbeans.modules.schema2beans.ValidateException {
102         boolean restrictionFailure = false;
103         // Validating property name
104
if (getName() == null) {
105             throw new org.netbeans.modules.schema2beans.ValidateException("getName() == null", "name", this); // NOI18N
106
}
107         // Validating property value
108
if (getValue() == null) {
109             throw new org.netbeans.modules.schema2beans.ValidateException("getValue() == null", "value", this); // NOI18N
110
}
111     }
112
113     // Dump the content of this bean returning it as a String
114
public void dump(StringBuffer JavaDoc str, String JavaDoc indent){
115         String JavaDoc s;
116         Object JavaDoc o;
117         org.netbeans.modules.schema2beans.BaseBean n;
118         str.append(indent);
119         str.append("Name"); // NOI18N
120
str.append(indent+"\t"); // NOI18N
121
str.append("<"); // NOI18N
122
s = this.getName();
123         str.append((s==null?"null":s.trim())); // NOI18N
124
str.append(">\n"); // NOI18N
125
this.dumpAttributes(NAME, 0, str, indent);
126
127         str.append(indent);
128         str.append("Value"); // NOI18N
129
str.append(indent+"\t"); // NOI18N
130
str.append("<"); // NOI18N
131
s = this.getValue();
132         str.append((s==null?"null":s.trim())); // NOI18N
133
str.append(">\n"); // NOI18N
134
this.dumpAttributes(VALUE, 0, str, indent);
135
136     }
137     public String JavaDoc dumpBeanNode(){
138         StringBuffer JavaDoc str = new StringBuffer JavaDoc();
139         str.append("StubProperty\n"); // NOI18N
140
this.dump(str, "\n "); // NOI18N
141
return str.toString();
142     }}
143
144 // END_NOI18N
145

146
147 /*
148         The following schema file has been used for generation:
149
150 <!--
151 This is the root element which binds an ejb reference to a jndi name.
152 -->
153 <!ELEMENT ejb-ref (ejb-ref-name, jndi-name)>
154
155 <!--
156 This node holds all the runtime bindings of a resource env reference.
157 -->
158 <!ELEMENT resource-env-ref ( resource-env-ref-name, jndi-name )>
159
160 <!--
161 This node holds all the runtime bindings of a resource reference.
162 -->
163 <!ELEMENT resource-ref (res-ref-name, jndi-name, default-resource-principal?)>
164
165 <!ELEMENT default-resource-principal (name, password)>
166
167 <!ELEMENT security-role-mapping (role-name, (principal-name | group-name)+)>
168
169 <!--
170 Information about a web service endpoint.
171 -->
172 <!ELEMENT webservice-endpoint ( port-component-name, endpoint-address-uri?, login-config?, transport-guarantee?, service-qname?, tie-class?, servlet-impl-class? )>
173
174 <!--
175 Optional authentication configuration for an EJB web service endpoint.
176 Not needed for servet web service endpoints. Their security configuration
177 is contained in the standard web application descriptor.
178 -->
179 <!ELEMENT login-config ( auth-method )>
180
181 <!--
182 The service-qname element declares the specific WSDL service
183 element that is being refered to. It is not set by the deployer.
184 It is derived during deployment.
185 -->
186 <!ELEMENT service-qname (namespaceURI, localpart)>
187
188 <!--
189 Runtime information about a web service.
190 wsdl-publish-location is optionally used to specify
191 where the final wsdl and any dependent files should be stored. This location
192 resides on the file system from which deployment is initiated.
193 -->
194 <!ELEMENT webservice-description ( webservice-description-name, wsdl-publish-location? )>
195
196 <!--
197 Runtime settings for a web service reference. In the simplest case,
198 there is no runtime information required for a service ref. Runtime info
199 is only needed in the following cases :
200  * to define the port that should be used to resolve a container-managed port
201  * to define default Stub/Call property settings for Stub objects
202  * to define the URL of a final WSDL document to be used instead of
203 the one packaged with a service-ref
204 -->
205 <!ELEMENT service-ref ( service-ref-name, port-info*, call-property*, wsdl-override?, service-impl-class?, service-qname? )>
206
207 <!--
208 Information for a port within a service-reference.
209
210 Either service-endpoint-interface or wsdl-port or both
211 (service-endpoint-interface and wsdl-port) should be specified.
212
213 If both are specified, wsdl-port represents the
214 port the container should choose for container-managed port selection.
215
216 The same wsdl-port value must not appear in
217 more than one port-info entry within the same service-ref.
218
219 If a particular service-endpoint-interface is using container-managed port
220 selection, it must not appear in more than one port-info entry
221 within the same service-ref.
222 -->
223 <!ELEMENT port-info ( service-endpoint-interface?, wsdl-port?, stub-property*, call-property* )>
224
225 <!--
226 Port used in port-info.
227 -->
228 <!ELEMENT wsdl-port ( namespaceURI, localpart )>
229
230 <!--
231 JAXRPC property values that should be set on a stub before it's returned to
232 to the web service client. The property names can be any properties supported
233 by the JAXRPC Stub implementation. See javadoc for javax.xml.rpc.Stub
234 -->
235 <!ELEMENT stub-property ( name, value )>
236
237 <!--
238 JAXRPC property values that should be set on a Call object before it's
239 returned to the web service client. The property names can be any
240 properties supported by the JAXRPC Call implementation. See javadoc
241 for javax.xml.rpc.Call
242 -->
243 <!ELEMENT call-property ( name, value )>
244
245 <!--
246 This info is used only by studio plug-in;it is NOT the part of the orgianl DTD.
247 Used by plugin to store parameters needed to execute an Application client.
248 -->
249 <!ELEMENT plugin-data ( auto-generate-sql?, client-jar-path?, client-args? )>
250 <!ELEMENT auto-generate-sql (#PCDATA)>
251 <!ELEMENT client-jar-path (#PCDATA)>
252 <!ELEMENT client-args (#PCDATA)>
253
254 <!--
255 The ejb ref name locates the name of the ejb reference in the application.
256 -->
257 <!ELEMENT ejb-ref-name (#PCDATA)>
258
259 <!--
260 The text in this node is a jndi name.
261 -->
262 <!ELEMENT jndi-name (#PCDATA)>
263
264 <!--
265 The name of a resource env reference.
266 -->
267 <!ELEMENT resource-env-ref-name (#PCDATA)>
268
269 <!--
270 The name of a resource reference.
271 -->
272 <!ELEMENT res-ref-name (#PCDATA)>
273
274 <!--
275 This text nodes holds a name string.
276 -->
277 <!ELEMENT name (#PCDATA)>
278
279 <!--
280 This element holds password text.
281 -->
282 <!ELEMENT password (#PCDATA)>
283
284 <!ELEMENT role-name (#PCDATA)>
285
286 <!ELEMENT principal-name (#PCDATA)>
287
288 <!ELEMENT group-name (#PCDATA)>
289
290 <!--
291 Unique name of a port component within a module
292 -->
293 <!ELEMENT port-component-name ( #PCDATA )>
294
295 <!--
296 Relative path combined with web server root to form fully qualified
297 endpoint address for a web service endpoint. For servlet endpoints, this
298 value is relative to the servlet's web application context root. In
299 all cases, this value must be a fixed pattern(i.e. no "*" allowed).
300 If the web service endpoint is a servlet that only implements a single
301 endpoint has only one url-pattern, it is not necessary to set
302 this value since the container can derive it from web.xml.
303 -->
304 <!ELEMENT endpoint-address-uri ( #PCDATA )>
305
306 <!--
307 The namespaceURI element indicates a URI.
308 -->
309 <!ELEMENT namespaceURI (#PCDATA)>
310
311 <!--
312 The localpart element indicates the local part of a QNAME.
313 -->
314 <!ELEMENT localpart (#PCDATA)>
315
316 <!--
317 auth-method element describes the authentication method. The only supported value
318 is USERNAME_PASSWORD
319 -->
320 <!ELEMENT auth-method ( #PCDATA )>
321
322 <!--
323 Specifies that the communication between client and server should
324 be NONE, INTEGRAL, or CONFIDENTIAL. NONE means that the application
325 does not require any transport guarantees. A value of INTEGRAL means
326 that the application requires that the data sent between the client
327 and server be sent in such a way that it can't be changed in transit.
328 CONFIDENTIAL means that the application requires that the data be
329 transmitted in a fashion that prevents other entities from observing
330 the contents of the transmission. In most cases, the presence of the
331 INTEGRAL or CONFIDENTIAL flag will indicate that the use of SSL is
332 required.
333 -->
334 <!ELEMENT transport-guarantee ( #PCDATA )>
335
336 <!--
337 The name of tie implementation class for a port-component. This is
338 not specified by the deployer. It is derived during deployment.
339 -->
340 <!ELEMENT tie-class (#PCDATA)>
341
342 <!--
343 Name of application-written servlet impl class contained in deployed war.
344 This is not set by the deployer. It is derived by the container
345 during deployment.
346 -->
347 <!ELEMENT servlet-impl-class (#PCDATA)>
348
349 <!--
350 Unique name of a webservice within a module
351 -->
352 <!ELEMENT webservice-description-name ( #PCDATA )>
353
354 <!--
355 file: URL of a directory to which a web-service-description's wsdl should be
356 published during deployment. Any required files will be published to this
357 directory, preserving their location relative to the module-specific
358 wsdl directory(META-INF/wsdl or WEB-INF/wsdl).
359
360 Example :
361
362   For an ejb.jar whose webservices.xml wsdl-file element contains
363     META-INF/wsdl/a/Foo.wsdl
364
365   <wsdl-publish-location>file:/home/user1/publish
366   </wsdl-publish-location>
367
368   The final wsdl will be stored in /home/user1/publish/a/Foo.wsdl
369 -->
370 <!ELEMENT wsdl-publish-location ( #PCDATA )>
371
372 <!--
373 Coded name (relative to java:comp/env) for a service-reference
374 -->
375 <!ELEMENT service-ref-name ( #PCDATA )>
376
377 <!--
378 Fully qualified name of service endpoint interface
379 -->
380 <!ELEMENT service-endpoint-interface ( #PCDATA )>
381
382 <!--
383 This text nodes holds a value string.
384 -->
385 <!ELEMENT value (#PCDATA)>
386
387 <!--
388 This is a valid URL pointing to a final WSDL document. It is optional.
389 If specified, the WSDL document at this URL will be used during
390 deployment instead of the WSDL document associated with the
391 service-ref in the standard deployment descriptor.
392
393 Examples :
394
395   // available via HTTP
396   <wsdl-override>http://localhost:8000/myservice/myport?WSDL</wsdl-override>
397
398   // in a file
399   <wsdl-override>file:/home/user1/myfinalwsdl.wsdl</wsdl-override>
400 -->
401 <!ELEMENT wsdl-override ( #PCDATA )>
402
403 <!--
404 Name of generated service implementation class. This is not set by the
405 deployer. It is derived during deployment.
406 -->
407 <!ELEMENT service-impl-class ( #PCDATA )>
408
409 <!--
410 This node holds information about a logical message destination
411 -->
412 <!ELEMENT message-destination (message-destination-name, jndi-name)>
413
414 <!--
415 This node holds the name of a logical message destination
416 -->
417 <!ELEMENT message-destination-name (#PCDATA)>
418
419 */

420
Popular Tags