KickJava   Java API By Example, From Geeks To Geeks.

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


1 /**
2  * This generated bean class EnvEntryType matches the schema element env-entryType
3  *
4  * ===============================================================
5  *
6  *
7  * The env-entryType is used to declare an application's
8  * environment entry. The declaration consists of an optional
9  * description, the name of the environment entry, and an
10  * optional value. If a value is not specified, one must be
11  * supplied during deployment.
12  *
13  * It is used by env-entry elements.
14  *
15  *
16  * ===============================================================
17  * Generated on Fri Apr 22 15:42:52 PDT 2005
18  */

19
20 package com.sun.enterprise.tools.common.dd.webservice;
21
22 import org.w3c.dom.*;
23 import org.netbeans.modules.schema2beans.*;
24 import java.beans.*;
25 import java.util.*;
26
27 // BEGIN_NOI18N
28

29 public class EnvEntryType extends org.netbeans.modules.schema2beans.BaseBean
30 {
31
32     static Vector comparators = new Vector();
33
34     static public final String JavaDoc DESCRIPTION = "Description"; // NOI18N
35
static public final String JavaDoc ENV_ENTRY_NAME = "EnvEntryName"; // NOI18N
36
static public final String JavaDoc ENV_ENTRY_TYPE = "EnvEntryType"; // NOI18N
37
static public final String JavaDoc ENV_ENTRY_VALUE = "EnvEntryValue"; // NOI18N
38

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

217
218 /*
219  * The contents of this file are subject to the terms
220  * of the Common Development and Distribution License
221  * (the License). You may not use this file except in
222  * compliance with the License.
223  *
224  * You can obtain a copy of the license at
225  * https://glassfish.dev.java.net/public/CDDLv1.0.html or
226  * glassfish/bootstrap/legal/CDDLv1.0.txt.
227  * See the License for the specific language governing
228  * permissions and limitations under the License.
229  *
230  * When distributing Covered Code, include this CDDL
231  * Header Notice in each file and include the License file
232  * at glassfish/bootstrap/legal/CDDLv1.0.txt.
233  * If applicable, add the following below the CDDL Header,
234  * with the fields enclosed by brackets [] replaced by
235  * you own identifying information:
236  * "Portions Copyrighted [year] [name of copyright owner]"
237  *
238  * Copyright 2006 Sun Microsystems, Inc. All rights reserved.
239  */

240
Popular Tags