KickJava   Java API By Example, From Geeks To Geeks.

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


1 /**
2  * This generated bean class EjbRefType matches the schema element ejb-refType
3  *
4  * ===============================================================
5  *
6  *
7  * The ejb-refType is used by ejb-ref elements for the
8  * declaration of a reference to an enterprise bean's home. The
9  * declaration consists of:
10  *
11  * - an optional description
12  * - the EJB reference name used in the code of
13  * the Deployment Component that's referencing the enterprise
14  * bean
15  * - the expected type of the referenced enterprise bean
16  * - the expected home and remote interfaces of the referenced
17  * enterprise bean
18  * - optional ejb-link information, used to specify the
19  * referenced enterprise bean
20  *
21  *
22  * ===============================================================
23  * Generated on Fri Apr 22 15:42:57 PDT 2005
24  */

25
26 package com.sun.enterprise.tools.common.dd.webservice;
27
28 import org.w3c.dom.*;
29 import org.netbeans.modules.schema2beans.*;
30 import java.beans.*;
31 import java.util.*;
32
33 // BEGIN_NOI18N
34

35 public class EjbRefType extends org.netbeans.modules.schema2beans.BaseBean
36 {
37
38     static Vector comparators = new Vector();
39
40     static public final String JavaDoc DESCRIPTION = "Description"; // NOI18N
41
static public final String JavaDoc EJB_REF_NAME = "EjbRefName"; // NOI18N
42
static public final String JavaDoc EJB_REF_TYPE = "EjbRefType"; // NOI18N
43
static public final String JavaDoc HOME = "Home"; // NOI18N
44
static public final String JavaDoc REMOTE = "Remote"; // NOI18N
45
static public final String JavaDoc EJB_LINK = "EjbLink"; // NOI18N
46

47     public EjbRefType() {
48         this(Common.USE_DEFAULT_VALUES);
49     }
50
51     public EjbRefType(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("description", // NOI18N
56
DESCRIPTION,
57             Common.TYPE_0_N | Common.TYPE_STRING | Common.TYPE_KEY,
58             java.lang.String JavaDoc.class);
59         this.createAttribute(DESCRIPTION, "id", "Id",
60                         AttrProp.CDATA | AttrProp.IMPLIED,
61                         null, null);
62         this.createAttribute(DESCRIPTION, "xml:lang", "XmlLang",
63                         AttrProp.CDATA | AttrProp.IMPLIED,
64                         null, null);
65         this.createProperty("ejb-ref-name", // NOI18N
66
EJB_REF_NAME,
67             Common.TYPE_1 | Common.TYPE_STRING | Common.TYPE_KEY,
68             java.lang.String JavaDoc.class);
69         this.createProperty("ejb-ref-type", // NOI18N
70
EJB_REF_TYPE,
71             Common.TYPE_1 | Common.TYPE_STRING | Common.TYPE_KEY,
72             java.lang.String JavaDoc.class);
73         this.createProperty("home", // NOI18N
74
HOME,
75             Common.TYPE_1 | Common.TYPE_STRING | Common.TYPE_KEY,
76             java.lang.String JavaDoc.class);
77         this.createProperty("remote", // NOI18N
78
REMOTE,
79             Common.TYPE_1 | Common.TYPE_STRING | Common.TYPE_KEY,
80             java.lang.String JavaDoc.class);
81         this.createProperty("ejb-link", // NOI18N
82
EJB_LINK,
83             Common.TYPE_0_1 | Common.TYPE_STRING | Common.TYPE_KEY,
84             java.lang.String JavaDoc.class);
85         this.initialize(options);
86     }
87
88     // Setting the default values of the properties
89
void initialize(int options)
90     {
91
92     }
93
94     // This attribute is an array, possibly empty
95
public void setDescription(int index, java.lang.String JavaDoc value) {
96         this.setValue(DESCRIPTION, index, value);
97     }
98
99     //
100
public java.lang.String JavaDoc getDescription(int index) {
101         return (java.lang.String JavaDoc)this.getValue(DESCRIPTION, index);
102     }
103
104     // This attribute is an array, possibly empty
105
public void setDescription(java.lang.String JavaDoc[] value) {
106         this.setValue(DESCRIPTION, value);
107     }
108
109     //
110
public java.lang.String JavaDoc[] getDescription() {
111         return (java.lang.String JavaDoc[])this.getValues(DESCRIPTION);
112     }
113
114     // Return the number of properties
115
public int sizeDescription() {
116         return this.size(DESCRIPTION);
117     }
118
119     // Add a new element returning its index in the list
120
public int addDescription(java.lang.String JavaDoc value) {
121         return this.addValue(DESCRIPTION, value);
122     }
123
124     //
125
// Remove an element using its reference
126
// Returns the index the element had in the list
127
//
128
public int removeDescription(java.lang.String JavaDoc value) {
129         return this.removeValue(DESCRIPTION, value);
130     }
131
132     // This attribute is mandatory
133
public void setEjbRefName(java.lang.String JavaDoc value) {
134         this.setValue(EJB_REF_NAME, value);
135     }
136
137     //
138
public java.lang.String JavaDoc getEjbRefName() {
139         return (java.lang.String JavaDoc)this.getValue(EJB_REF_NAME);
140     }
141
142     // This attribute is mandatory
143
public void setEjbRefType(java.lang.String JavaDoc value) {
144         this.setValue(EJB_REF_TYPE, value);
145     }
146
147     //
148
public java.lang.String JavaDoc getEjbRefType() {
149         return (java.lang.String JavaDoc)this.getValue(EJB_REF_TYPE);
150     }
151
152     // This attribute is mandatory
153
public void setHome(java.lang.String JavaDoc value) {
154         this.setValue(HOME, value);
155     }
156
157     //
158
public java.lang.String JavaDoc getHome() {
159         return (java.lang.String JavaDoc)this.getValue(HOME);
160     }
161
162     // This attribute is mandatory
163
public void setRemote(java.lang.String JavaDoc value) {
164         this.setValue(REMOTE, value);
165     }
166
167     //
168
public java.lang.String JavaDoc getRemote() {
169         return (java.lang.String JavaDoc)this.getValue(REMOTE);
170     }
171
172     // This attribute is optional
173
public void setEjbLink(java.lang.String JavaDoc value) {
174         this.setValue(EJB_LINK, value);
175     }
176
177     //
178
public java.lang.String JavaDoc getEjbLink() {
179         return (java.lang.String JavaDoc)this.getValue(EJB_LINK);
180     }
181
182     //
183
public static void addComparator(org.netbeans.modules.schema2beans.BeanComparator c) {
184         comparators.add(c);
185     }
186
187     //
188
public static void removeComparator(org.netbeans.modules.schema2beans.BeanComparator c) {
189         comparators.remove(c);
190     }
191     public void validate() throws org.netbeans.modules.schema2beans.ValidateException {
192     }
193
194     // Dump the content of this bean returning it as a String
195
public void dump(StringBuffer JavaDoc str, String JavaDoc indent){
196         String JavaDoc s;
197         Object JavaDoc o;
198         org.netbeans.modules.schema2beans.BaseBean n;
199         str.append(indent);
200         str.append("Description["+this.sizeDescription()+"]"); // NOI18N
201
for(int i=0; i<this.sizeDescription(); i++)
202         {
203             str.append(indent+"\t");
204             str.append("#"+i+":");
205             str.append(indent+"\t"); // NOI18N
206
str.append("<"); // NOI18N
207
s = this.getDescription(i);
208             str.append((s==null?"null":s.trim())); // NOI18N
209
str.append(">\n"); // NOI18N
210
this.dumpAttributes(DESCRIPTION, i, str, indent);
211         }
212
213         str.append(indent);
214         str.append("EjbRefName"); // NOI18N
215
str.append(indent+"\t"); // NOI18N
216
str.append("<"); // NOI18N
217
s = this.getEjbRefName();
218         str.append((s==null?"null":s.trim())); // NOI18N
219
str.append(">\n"); // NOI18N
220
this.dumpAttributes(EJB_REF_NAME, 0, str, indent);
221
222         str.append(indent);
223         str.append("EjbRefType"); // NOI18N
224
str.append(indent+"\t"); // NOI18N
225
str.append("<"); // NOI18N
226
s = this.getEjbRefType();
227         str.append((s==null?"null":s.trim())); // NOI18N
228
str.append(">\n"); // NOI18N
229
this.dumpAttributes(EJB_REF_TYPE, 0, str, indent);
230
231         str.append(indent);
232         str.append("Home"); // NOI18N
233
str.append(indent+"\t"); // NOI18N
234
str.append("<"); // NOI18N
235
s = this.getHome();
236         str.append((s==null?"null":s.trim())); // NOI18N
237
str.append(">\n"); // NOI18N
238
this.dumpAttributes(HOME, 0, str, indent);
239
240         str.append(indent);
241         str.append("Remote"); // NOI18N
242
str.append(indent+"\t"); // NOI18N
243
str.append("<"); // NOI18N
244
s = this.getRemote();
245         str.append((s==null?"null":s.trim())); // NOI18N
246
str.append(">\n"); // NOI18N
247
this.dumpAttributes(REMOTE, 0, str, indent);
248
249         str.append(indent);
250         str.append("EjbLink"); // NOI18N
251
str.append(indent+"\t"); // NOI18N
252
str.append("<"); // NOI18N
253
s = this.getEjbLink();
254         str.append((s==null?"null":s.trim())); // NOI18N
255
str.append(">\n"); // NOI18N
256
this.dumpAttributes(EJB_LINK, 0, str, indent);
257
258     }
259     public String JavaDoc dumpBeanNode(){
260         StringBuffer JavaDoc str = new StringBuffer JavaDoc();
261         str.append("EjbRefType\n"); // NOI18N
262
this.dump(str, "\n "); // NOI18N
263
return str.toString();
264     }}
265
266 // END_NOI18N
267

268
269 /*
270  * The contents of this file are subject to the terms
271  * of the Common Development and Distribution License
272  * (the License). You may not use this file except in
273  * compliance with the License.
274  *
275  * You can obtain a copy of the license at
276  * https://glassfish.dev.java.net/public/CDDLv1.0.html or
277  * glassfish/bootstrap/legal/CDDLv1.0.txt.
278  * See the License for the specific language governing
279  * permissions and limitations under the License.
280  *
281  * When distributing Covered Code, include this CDDL
282  * Header Notice in each file and include the License file
283  * at glassfish/bootstrap/legal/CDDLv1.0.txt.
284  * If applicable, add the following below the CDDL Header,
285  * with the fields enclosed by brackets [] replaced by
286  * you own identifying information:
287  * "Portions Copyrighted [year] [name of copyright owner]"
288  *
289  * Copyright 2006 Sun Microsystems, Inc. All rights reserved.
290  */

291
Popular Tags