KickJava   Java API By Example, From Geeks To Geeks.

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


1 /**
2  * This generated bean class ResourceEnvRefType matches the schema element resource-env-refType
3  *
4  * ===============================================================
5  *
6  *
7  *
8  * The resource-env-refType is used to define
9  * resource-env-type elements. It contains a declaration of a
10  * Deployment Component's reference to an administered object
11  * associated with a resource in the Deployment Component's
12  * environment. It consists of an optional description, the
13  * resource environment reference name, and an indication of
14  * the resource environment reference type expected by the
15  * Deployment Component code.
16  *
17  * Example:
18  *
19  * <resource-env-ref>
20  * <resource-env-ref-name>jms/StockQueue
21  * </resource-env-ref-name>
22  * <resource-env-ref-type>javax.jms.Queue
23  * </resource-env-ref-type>
24  * </resource-env-ref>
25  *
26  *
27  *
28  * ===============================================================
29  * Generated on Fri Apr 22 15:42:49 PDT 2005
30  */

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

41 public class ResourceEnvRefType extends org.netbeans.modules.schema2beans.BaseBean
42 {
43
44     static Vector comparators = new Vector();
45
46     static public final String JavaDoc DESCRIPTION = "Description"; // NOI18N
47
static public final String JavaDoc RESOURCE_ENV_REF_NAME = "ResourceEnvRefName"; // NOI18N
48
static public final String JavaDoc RESOURCE_ENV_REF_TYPE = "ResourceEnvRefType"; // NOI18N
49

50     public ResourceEnvRefType() {
51         this(Common.USE_DEFAULT_VALUES);
52     }
53
54     public ResourceEnvRefType(int options)
55     {
56         super(comparators, new org.netbeans.modules.schema2beans.Version(1, 2, 0));
57         // Properties (see root bean comments for the bean graph)
58
this.createProperty("description", // NOI18N
59
DESCRIPTION,
60             Common.TYPE_0_N | Common.TYPE_STRING | Common.TYPE_KEY,
61             java.lang.String JavaDoc.class);
62         this.createAttribute(DESCRIPTION, "id", "Id",
63                         AttrProp.CDATA | AttrProp.IMPLIED,
64                         null, null);
65         this.createAttribute(DESCRIPTION, "xml:lang", "XmlLang",
66                         AttrProp.CDATA | AttrProp.IMPLIED,
67                         null, null);
68         this.createProperty("resource-env-ref-name", // NOI18N
69
RESOURCE_ENV_REF_NAME,
70             Common.TYPE_1 | Common.TYPE_STRING | Common.TYPE_KEY,
71             java.lang.String JavaDoc.class);
72         this.createProperty("resource-env-ref-type", // NOI18N
73
RESOURCE_ENV_REF_TYPE,
74             Common.TYPE_1 | Common.TYPE_STRING | Common.TYPE_KEY,
75             java.lang.String JavaDoc.class);
76         this.initialize(options);
77     }
78
79     // Setting the default values of the properties
80
void initialize(int options)
81     {
82
83     }
84
85     // This attribute is an array, possibly empty
86
public void setDescription(int index, java.lang.String JavaDoc value) {
87         this.setValue(DESCRIPTION, index, value);
88     }
89
90     //
91
public java.lang.String JavaDoc getDescription(int index) {
92         return (java.lang.String JavaDoc)this.getValue(DESCRIPTION, index);
93     }
94
95     // This attribute is an array, possibly empty
96
public void setDescription(java.lang.String JavaDoc[] value) {
97         this.setValue(DESCRIPTION, value);
98     }
99
100     //
101
public java.lang.String JavaDoc[] getDescription() {
102         return (java.lang.String JavaDoc[])this.getValues(DESCRIPTION);
103     }
104
105     // Return the number of properties
106
public int sizeDescription() {
107         return this.size(DESCRIPTION);
108     }
109
110     // Add a new element returning its index in the list
111
public int addDescription(java.lang.String JavaDoc value) {
112         return this.addValue(DESCRIPTION, value);
113     }
114
115     //
116
// Remove an element using its reference
117
// Returns the index the element had in the list
118
//
119
public int removeDescription(java.lang.String JavaDoc value) {
120         return this.removeValue(DESCRIPTION, value);
121     }
122
123     // This attribute is mandatory
124
public void setResourceEnvRefName(java.lang.String JavaDoc value) {
125         this.setValue(RESOURCE_ENV_REF_NAME, value);
126     }
127
128     //
129
public java.lang.String JavaDoc getResourceEnvRefName() {
130         return (java.lang.String JavaDoc)this.getValue(RESOURCE_ENV_REF_NAME);
131     }
132
133     // This attribute is mandatory
134
public void setResourceEnvRefType(java.lang.String JavaDoc value) {
135         this.setValue(RESOURCE_ENV_REF_TYPE, value);
136     }
137
138     //
139
public java.lang.String JavaDoc getResourceEnvRefType() {
140         return (java.lang.String JavaDoc)this.getValue(RESOURCE_ENV_REF_TYPE);
141     }
142
143     //
144
public static void addComparator(org.netbeans.modules.schema2beans.BeanComparator c) {
145         comparators.add(c);
146     }
147
148     //
149
public static void removeComparator(org.netbeans.modules.schema2beans.BeanComparator c) {
150         comparators.remove(c);
151     }
152     public void validate() throws org.netbeans.modules.schema2beans.ValidateException {
153     }
154
155     // Dump the content of this bean returning it as a String
156
public void dump(StringBuffer JavaDoc str, String JavaDoc indent){
157         String JavaDoc s;
158         Object JavaDoc o;
159         org.netbeans.modules.schema2beans.BaseBean n;
160         str.append(indent);
161         str.append("Description["+this.sizeDescription()+"]"); // NOI18N
162
for(int i=0; i<this.sizeDescription(); i++)
163         {
164             str.append(indent+"\t");
165             str.append("#"+i+":");
166             str.append(indent+"\t"); // NOI18N
167
str.append("<"); // NOI18N
168
s = this.getDescription(i);
169             str.append((s==null?"null":s.trim())); // NOI18N
170
str.append(">\n"); // NOI18N
171
this.dumpAttributes(DESCRIPTION, i, str, indent);
172         }
173
174         str.append(indent);
175         str.append("ResourceEnvRefName"); // NOI18N
176
str.append(indent+"\t"); // NOI18N
177
str.append("<"); // NOI18N
178
s = this.getResourceEnvRefName();
179         str.append((s==null?"null":s.trim())); // NOI18N
180
str.append(">\n"); // NOI18N
181
this.dumpAttributes(RESOURCE_ENV_REF_NAME, 0, str, indent);
182
183         str.append(indent);
184         str.append("ResourceEnvRefType"); // NOI18N
185
str.append(indent+"\t"); // NOI18N
186
str.append("<"); // NOI18N
187
s = this.getResourceEnvRefType();
188         str.append((s==null?"null":s.trim())); // NOI18N
189
str.append(">\n"); // NOI18N
190
this.dumpAttributes(RESOURCE_ENV_REF_TYPE, 0, str, indent);
191
192     }
193     public String JavaDoc dumpBeanNode(){
194         StringBuffer JavaDoc str = new StringBuffer JavaDoc();
195         str.append("ResourceEnvRefType\n"); // NOI18N
196
this.dump(str, "\n "); // NOI18N
197
return str.toString();
198     }}
199
200 // END_NOI18N
201

202
203 /*
204  * The contents of this file are subject to the terms
205  * of the Common Development and Distribution License
206  * (the License). You may not use this file except in
207  * compliance with the License.
208  *
209  * You can obtain a copy of the license at
210  * https://glassfish.dev.java.net/public/CDDLv1.0.html or
211  * glassfish/bootstrap/legal/CDDLv1.0.txt.
212  * See the License for the specific language governing
213  * permissions and limitations under the License.
214  *
215  * When distributing Covered Code, include this CDDL
216  * Header Notice in each file and include the License file
217  * at glassfish/bootstrap/legal/CDDLv1.0.txt.
218  * If applicable, add the following below the CDDL Header,
219  * with the fields enclosed by brackets [] replaced by
220  * you own identifying information:
221  * "Portions Copyrighted [year] [name of copyright owner]"
222  *
223  * Copyright 2006 Sun Microsystems, Inc. All rights reserved.
224  */

225
Popular Tags