KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > com > sun > enterprise > tools > common > dd > webservice > PortComponentType


1 /**
2  * This generated bean class PortComponentType matches the schema element port-componentType
3  *
4  * ===============================================================
5  *
6  *
7  * The port-component element associates a WSDL port with a web service
8  * interface and implementation. It defines the name of the port as a
9  * component, optional description, optional display name, optional iconic
10  * representations, WSDL port QName, Service Endpoint Interface, Service
11  * Implementation Bean.
12  *
13  *
14  * ===============================================================
15  * Generated on Fri Apr 22 15:42:50 PDT 2005
16  */

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 // BEGIN_NOI18N
26

27 public class PortComponentType extends org.netbeans.modules.schema2beans.BaseBean
28 {
29
30     static Vector comparators = new Vector();
31
32     static public final String JavaDoc DESCRIPTION = "Description"; // NOI18N
33
static public final String JavaDoc DISPLAY_NAME = "DisplayName"; // NOI18N
34
static public final String JavaDoc ICON = "Icon"; // NOI18N
35
static public final String JavaDoc PORT_COMPONENT_NAME = "PortComponentName"; // NOI18N
36
static public final String JavaDoc WSDL_PORT = "WsdlPort"; // NOI18N
37
static public final String JavaDoc SERVICE_ENDPOINT_INTERFACE = "ServiceEndpointInterface"; // NOI18N
38
static public final String JavaDoc SERVICE_IMPL_BEAN = "ServiceImplBean"; // NOI18N
39
static public final String JavaDoc HANDLER = "Handler"; // NOI18N
40

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         // Properties (see root bean comments for the bean graph)
49
this.createProperty("description", // NOI18N
50
DESCRIPTION,
51             Common.TYPE_0_1 | Common.TYPE_STRING | Common.TYPE_KEY,
52             java.lang.String JavaDoc.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", // NOI18N
60
DISPLAY_NAME,
61             Common.TYPE_0_1 | Common.TYPE_STRING | Common.TYPE_KEY,
62             java.lang.String JavaDoc.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", // NOI18N
70
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", // NOI18N
80
PORT_COMPONENT_NAME,
81             Common.TYPE_1 | Common.TYPE_STRING | Common.TYPE_KEY,
82             java.lang.String JavaDoc.class);
83         this.createAttribute(PORT_COMPONENT_NAME, "id", "Id",
84                         AttrProp.CDATA | AttrProp.IMPLIED,
85                         null, null);
86         this.createProperty("wsdl-port", // NOI18N
87
WSDL_PORT,
88             Common.TYPE_1 | Common.TYPE_STRING | Common.TYPE_KEY,
89             javax.xml.namespace.QName JavaDoc.class);
90         this.createAttribute(WSDL_PORT, "id", "Id",
91                         AttrProp.CDATA | AttrProp.IMPLIED,
92                         null, null);
93         this.createProperty("service-endpoint-interface", // NOI18N
94
SERVICE_ENDPOINT_INTERFACE,
95             Common.TYPE_1 | Common.TYPE_STRING | Common.TYPE_KEY,
96             java.lang.String JavaDoc.class);
97         this.createProperty("service-impl-bean", // NOI18N
98
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", // NOI18N
105
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     // Setting the default values of the properties
115
void initialize(int options)
116     {
117
118     }
119
120     // This attribute is optional
121
public void setDescription(java.lang.String JavaDoc value) {
122         this.setValue(DESCRIPTION, value);
123     }
124
125     //
126
public java.lang.String JavaDoc getDescription() {
127         return (java.lang.String JavaDoc)this.getValue(DESCRIPTION);
128     }
129
130     // This attribute is optional
131
public void setDisplayName(java.lang.String JavaDoc value) {
132         this.setValue(DISPLAY_NAME, value);
133     }
134
135     //
136
public java.lang.String JavaDoc getDisplayName() {
137         return (java.lang.String JavaDoc)this.getValue(DISPLAY_NAME);
138     }
139
140     // This attribute is optional
141
public void setIcon(IconType value) {
142         this.setValue(ICON, value);
143     }
144
145     //
146
public IconType getIcon() {
147         return (IconType)this.getValue(ICON);
148     }
149
150     // This attribute is mandatory
151
public void setPortComponentName(java.lang.String JavaDoc value) {
152         this.setValue(PORT_COMPONENT_NAME, value);
153     }
154
155     //
156
public java.lang.String JavaDoc getPortComponentName() {
157         return (java.lang.String JavaDoc)this.getValue(PORT_COMPONENT_NAME);
158     }
159
160     // This attribute is mandatory
161
public void setWsdlPort(javax.xml.namespace.QName JavaDoc value) {
162         this.setValue(WSDL_PORT, value);
163     }
164
165     //
166
public javax.xml.namespace.QName JavaDoc getWsdlPort() {
167         return (javax.xml.namespace.QName JavaDoc)this.getValue(WSDL_PORT);
168     }
169
170     // This attribute is mandatory
171
public void setServiceEndpointInterface(java.lang.String JavaDoc value) {
172         this.setValue(SERVICE_ENDPOINT_INTERFACE, value);
173     }
174
175     //
176
public java.lang.String JavaDoc getServiceEndpointInterface() {
177         return (java.lang.String JavaDoc)this.getValue(SERVICE_ENDPOINT_INTERFACE);
178     }
179
180     // This attribute is mandatory
181
public void setServiceImplBean(ServiceImplBeanType value) {
182         this.setValue(SERVICE_IMPL_BEAN, value);
183     }
184
185     //
186
public ServiceImplBeanType getServiceImplBean() {
187         return (ServiceImplBeanType)this.getValue(SERVICE_IMPL_BEAN);
188     }
189
190     // This attribute is an array, possibly empty
191
public void setHandler(int index, PortComponentHandlerType value) {
192         this.setValue(HANDLER, index, value);
193     }
194
195     //
196
public PortComponentHandlerType getHandler(int index) {
197         return (PortComponentHandlerType)this.getValue(HANDLER, index);
198     }
199
200     // This attribute is an array, possibly empty
201
public void setHandler(PortComponentHandlerType[] value) {
202         this.setValue(HANDLER, value);
203     }
204
205     //
206
public PortComponentHandlerType[] getHandler() {
207         return (PortComponentHandlerType[])this.getValues(HANDLER);
208     }
209
210     // Return the number of properties
211
public int sizeHandler() {
212         return this.size(HANDLER);
213     }
214
215     // Add a new element returning its index in the list
216
public int addHandler(com.sun.enterprise.tools.common.dd.webservice.PortComponentHandlerType value) {
217         return this.addValue(HANDLER, value);
218     }
219
220     //
221
// Remove an element using its reference
222
// Returns the index the element had in the list
223
//
224
public int removeHandler(com.sun.enterprise.tools.common.dd.webservice.PortComponentHandlerType value) {
225         return this.removeValue(HANDLER, value);
226     }
227
228     //
229
public static void addComparator(org.netbeans.modules.schema2beans.BeanComparator c) {
230         comparators.add(c);
231     }
232
233     //
234
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     // Dump the content of this bean returning it as a String
241
public void dump(StringBuffer JavaDoc str, String JavaDoc indent){
242         String JavaDoc s;
243         Object JavaDoc o;
244         org.netbeans.modules.schema2beans.BaseBean n;
245         str.append(indent);
246         str.append("Description"); // NOI18N
247
str.append(indent+"\t"); // NOI18N
248
str.append("<"); // NOI18N
249
s = this.getDescription();
250         str.append((s==null?"null":s.trim())); // NOI18N
251
str.append(">\n"); // NOI18N
252
this.dumpAttributes(DESCRIPTION, 0, str, indent);
253
254         str.append(indent);
255         str.append("DisplayName"); // NOI18N
256
str.append(indent+"\t"); // NOI18N
257
str.append("<"); // NOI18N
258
s = this.getDisplayName();
259         str.append((s==null?"null":s.trim())); // NOI18N
260
str.append(">\n"); // NOI18N
261
this.dumpAttributes(DISPLAY_NAME, 0, str, indent);
262
263         str.append(indent);
264         str.append("Icon"); // NOI18N
265
n = (org.netbeans.modules.schema2beans.BaseBean) this.getIcon();
266         if (n != null)
267             n.dump(str, indent + "\t"); // NOI18N
268
else
269             str.append(indent+"\tnull"); // NOI18N
270
this.dumpAttributes(ICON, 0, str, indent);
271
272         str.append(indent);
273         str.append("PortComponentName"); // NOI18N
274
str.append(indent+"\t"); // NOI18N
275
str.append("<"); // NOI18N
276
s = this.getPortComponentName();
277         str.append((s==null?"null":s.trim())); // NOI18N
278
str.append(">\n"); // NOI18N
279
this.dumpAttributes(PORT_COMPONENT_NAME, 0, str, indent);
280
281         str.append(indent);
282         str.append("WsdlPort"); // NOI18N
283
str.append(indent+"\t"); // NOI18N
284
str.append("<"); // NOI18N
285
o = this.getWsdlPort();
286         str.append((o==null?"null":o.toString().trim())); // NOI18N
287
str.append(">\n"); // NOI18N
288
this.dumpAttributes(WSDL_PORT, 0, str, indent);
289
290         str.append(indent);
291         str.append("ServiceEndpointInterface"); // NOI18N
292
str.append(indent+"\t"); // NOI18N
293
str.append("<"); // NOI18N
294
s = this.getServiceEndpointInterface();
295         str.append((s==null?"null":s.trim())); // NOI18N
296
str.append(">\n"); // NOI18N
297
this.dumpAttributes(SERVICE_ENDPOINT_INTERFACE, 0, str, indent);
298
299         str.append(indent);
300         str.append("ServiceImplBean"); // NOI18N
301
n = (org.netbeans.modules.schema2beans.BaseBean) this.getServiceImplBean();
302         if (n != null)
303             n.dump(str, indent + "\t"); // NOI18N
304
else
305             str.append(indent+"\tnull"); // NOI18N
306
this.dumpAttributes(SERVICE_IMPL_BEAN, 0, str, indent);
307
308         str.append(indent);
309         str.append("Handler["+this.sizeHandler()+"]"); // NOI18N
310
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"); // NOI18N
317
else
318                 str.append(indent+"\tnull"); // NOI18N
319
this.dumpAttributes(HANDLER, i, str, indent);
320         }
321
322     }
323     public String JavaDoc dumpBeanNode(){
324         StringBuffer JavaDoc str = new StringBuffer JavaDoc();
325         str.append("PortComponentType\n"); // NOI18N
326
this.dump(str, "\n "); // NOI18N
327
return str.toString();
328     }}
329
330 // END_NOI18N
331

332
333 /*
334  * The contents of this file are subject to the terms
335  * of the Common Development and Distribution License
336  * (the License). You may not use this file except in
337  * compliance with the License.
338  *
339  * You can obtain a copy of the license at
340  * https://glassfish.dev.java.net/public/CDDLv1.0.html or
341  * glassfish/bootstrap/legal/CDDLv1.0.txt.
342  * See the License for the specific language governing
343  * permissions and limitations under the License.
344  *
345  * When distributing Covered Code, include this CDDL
346  * Header Notice in each file and include the License file
347  * at glassfish/bootstrap/legal/CDDLv1.0.txt.
348  * If applicable, add the following below the CDDL Header,
349  * with the fields enclosed by brackets [] replaced by
350  * you own identifying information:
351  * "Portions Copyrighted [year] [name of copyright owner]"
352  *
353  * Copyright 2006 Sun Microsystems, Inc. All rights reserved.
354  */

355
Popular Tags