KickJava   Java API By Example, From Geeks To Geeks.

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


1 /**
2  * This generated bean class MessageDestinationRefType matches the schema element message-destination-refType
3  *
4  * ===============================================================
5  *
6  *
7  *
8  * The message-destination-ref element contains a declaration
9  * of Deployment Component's reference to a message destination
10  * associated with a resource in Deployment Component's
11  * environment. It consists of:
12  *
13  * - an optional description
14  * - the message destination reference name
15  * - the message destination type
16  * - a specification as to whether the
17  * destination is used for
18  * consuming or producing messages, or both
19  * - a link to the message destination
20  *
21  * Examples:
22  *
23  * <message-destination-ref>
24  * <message-destination-ref-name>jms/StockQueue
25  * </message-destination-ref-name>
26  * <message-destination-type>javax.jms.Queue
27  * </message-destination-type>
28  * <message-destination-usage>Consumes
29  * </message-destination-usage>
30  * <message-destination-link>CorporateStocks
31  * </message-destination-link>
32  * </message-destination-ref>
33  *
34  *
35  *
36  * ===============================================================
37  * Generated on Fri Apr 22 15:43:00 PDT 2005
38  */

39
40 package com.sun.enterprise.tools.common.dd.webservice;
41
42 import org.w3c.dom.*;
43 import org.netbeans.modules.schema2beans.*;
44 import java.beans.*;
45 import java.util.*;
46
47 // BEGIN_NOI18N
48

49 public class MessageDestinationRefType extends org.netbeans.modules.schema2beans.BaseBean
50 {
51
52     static Vector comparators = new Vector();
53
54     static public final String JavaDoc DESCRIPTION = "Description"; // NOI18N
55
static public final String JavaDoc MESSAGE_DESTINATION_REF_NAME = "MessageDestinationRefName"; // NOI18N
56
static public final String JavaDoc MESSAGE_DESTINATION_TYPE = "MessageDestinationType"; // NOI18N
57
static public final String JavaDoc MESSAGE_DESTINATION_USAGE = "MessageDestinationUsage"; // NOI18N
58
static public final String JavaDoc MESSAGE_DESTINATION_LINK = "MessageDestinationLink"; // NOI18N
59

60     public MessageDestinationRefType() {
61         this(Common.USE_DEFAULT_VALUES);
62     }
63
64     public MessageDestinationRefType(int options)
65     {
66         super(comparators, new org.netbeans.modules.schema2beans.Version(1, 2, 0));
67         // Properties (see root bean comments for the bean graph)
68
this.createProperty("description", // NOI18N
69
DESCRIPTION,
70             Common.TYPE_0_N | Common.TYPE_STRING | Common.TYPE_KEY,
71             java.lang.String JavaDoc.class);
72         this.createAttribute(DESCRIPTION, "id", "Id",
73                         AttrProp.CDATA | AttrProp.IMPLIED,
74                         null, null);
75         this.createAttribute(DESCRIPTION, "xml:lang", "XmlLang",
76                         AttrProp.CDATA | AttrProp.IMPLIED,
77                         null, null);
78         this.createProperty("message-destination-ref-name", // NOI18N
79
MESSAGE_DESTINATION_REF_NAME,
80             Common.TYPE_1 | Common.TYPE_STRING | Common.TYPE_KEY,
81             java.lang.String JavaDoc.class);
82         this.createProperty("message-destination-type", // NOI18N
83
MESSAGE_DESTINATION_TYPE,
84             Common.TYPE_1 | Common.TYPE_STRING | Common.TYPE_KEY,
85             java.lang.String JavaDoc.class);
86         this.createProperty("message-destination-usage", // NOI18N
87
MESSAGE_DESTINATION_USAGE,
88             Common.TYPE_1 | Common.TYPE_STRING | Common.TYPE_KEY,
89             java.lang.String JavaDoc.class);
90         this.createProperty("message-destination-link", // NOI18N
91
MESSAGE_DESTINATION_LINK,
92             Common.TYPE_0_1 | Common.TYPE_STRING | Common.TYPE_KEY,
93             java.lang.String JavaDoc.class);
94         this.initialize(options);
95     }
96
97     // Setting the default values of the properties
98
void initialize(int options)
99     {
100
101     }
102
103     // This attribute is an array, possibly empty
104
public void setDescription(int index, java.lang.String JavaDoc value) {
105         this.setValue(DESCRIPTION, index, value);
106     }
107
108     //
109
public java.lang.String JavaDoc getDescription(int index) {
110         return (java.lang.String JavaDoc)this.getValue(DESCRIPTION, index);
111     }
112
113     // This attribute is an array, possibly empty
114
public void setDescription(java.lang.String JavaDoc[] value) {
115         this.setValue(DESCRIPTION, value);
116     }
117
118     //
119
public java.lang.String JavaDoc[] getDescription() {
120         return (java.lang.String JavaDoc[])this.getValues(DESCRIPTION);
121     }
122
123     // Return the number of properties
124
public int sizeDescription() {
125         return this.size(DESCRIPTION);
126     }
127
128     // Add a new element returning its index in the list
129
public int addDescription(java.lang.String JavaDoc value) {
130         return this.addValue(DESCRIPTION, value);
131     }
132
133     //
134
// Remove an element using its reference
135
// Returns the index the element had in the list
136
//
137
public int removeDescription(java.lang.String JavaDoc value) {
138         return this.removeValue(DESCRIPTION, value);
139     }
140
141     // This attribute is mandatory
142
public void setMessageDestinationRefName(java.lang.String JavaDoc value) {
143         this.setValue(MESSAGE_DESTINATION_REF_NAME, value);
144     }
145
146     //
147
public java.lang.String JavaDoc getMessageDestinationRefName() {
148         return (java.lang.String JavaDoc)this.getValue(MESSAGE_DESTINATION_REF_NAME);
149     }
150
151     // This attribute is mandatory
152
public void setMessageDestinationType(java.lang.String JavaDoc value) {
153         this.setValue(MESSAGE_DESTINATION_TYPE, value);
154     }
155
156     //
157
public java.lang.String JavaDoc getMessageDestinationType() {
158         return (java.lang.String JavaDoc)this.getValue(MESSAGE_DESTINATION_TYPE);
159     }
160
161     // This attribute is mandatory
162
public void setMessageDestinationUsage(java.lang.String JavaDoc value) {
163         this.setValue(MESSAGE_DESTINATION_USAGE, value);
164     }
165
166     //
167
public java.lang.String JavaDoc getMessageDestinationUsage() {
168         return (java.lang.String JavaDoc)this.getValue(MESSAGE_DESTINATION_USAGE);
169     }
170
171     // This attribute is optional
172
public void setMessageDestinationLink(java.lang.String JavaDoc value) {
173         this.setValue(MESSAGE_DESTINATION_LINK, value);
174     }
175
176     //
177
public java.lang.String JavaDoc getMessageDestinationLink() {
178         return (java.lang.String JavaDoc)this.getValue(MESSAGE_DESTINATION_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("MessageDestinationRefName"); // NOI18N
214
str.append(indent+"\t"); // NOI18N
215
str.append("<"); // NOI18N
216
s = this.getMessageDestinationRefName();
217         str.append((s==null?"null":s.trim())); // NOI18N
218
str.append(">\n"); // NOI18N
219
this.dumpAttributes(MESSAGE_DESTINATION_REF_NAME, 0, str, indent);
220
221         str.append(indent);
222         str.append("MessageDestinationType"); // NOI18N
223
str.append(indent+"\t"); // NOI18N
224
str.append("<"); // NOI18N
225
s = this.getMessageDestinationType();
226         str.append((s==null?"null":s.trim())); // NOI18N
227
str.append(">\n"); // NOI18N
228
this.dumpAttributes(MESSAGE_DESTINATION_TYPE, 0, str, indent);
229
230         str.append(indent);
231         str.append("MessageDestinationUsage"); // NOI18N
232
str.append(indent+"\t"); // NOI18N
233
str.append("<"); // NOI18N
234
s = this.getMessageDestinationUsage();
235         str.append((s==null?"null":s.trim())); // NOI18N
236
str.append(">\n"); // NOI18N
237
this.dumpAttributes(MESSAGE_DESTINATION_USAGE, 0, str, indent);
238
239         str.append(indent);
240         str.append("MessageDestinationLink"); // NOI18N
241
str.append(indent+"\t"); // NOI18N
242
str.append("<"); // NOI18N
243
s = this.getMessageDestinationLink();
244         str.append((s==null?"null":s.trim())); // NOI18N
245
str.append(">\n"); // NOI18N
246
this.dumpAttributes(MESSAGE_DESTINATION_LINK, 0, str, indent);
247
248     }
249     public String JavaDoc dumpBeanNode(){
250         StringBuffer JavaDoc str = new StringBuffer JavaDoc();
251         str.append("MessageDestinationRefType\n"); // NOI18N
252
this.dump(str, "\n "); // NOI18N
253
return str.toString();
254     }}
255
256 // END_NOI18N
257

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

281
Popular Tags