KickJava   Java API By Example, From Geeks To Geeks.

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


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

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

34 public class EjbLocalRefType extends org.netbeans.modules.schema2beans.BaseBean
35 {
36
37     static Vector comparators = new Vector();
38
39     static public final String JavaDoc DESCRIPTION = "Description"; // NOI18N
40
static public final String JavaDoc EJB_REF_NAME = "EjbRefName"; // NOI18N
41
static public final String JavaDoc EJB_REF_TYPE = "EjbRefType"; // NOI18N
42
static public final String JavaDoc LOCAL_HOME = "LocalHome"; // NOI18N
43
static public final String JavaDoc LOCAL = "Local"; // NOI18N
44
static public final String JavaDoc EJB_LINK = "EjbLink"; // NOI18N
45

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

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

290
Popular Tags