KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > com > sun > enterprise > tools > common > dd > Message


1 /*
2  * The contents of this file are subject to the terms
3  * of the Common Development and Distribution License
4  * (the License). You may not use this file except in
5  * compliance with the License.
6  *
7  * You can obtain a copy of the license at
8  * https://glassfish.dev.java.net/public/CDDLv1.0.html or
9  * glassfish/bootstrap/legal/CDDLv1.0.txt.
10  * See the License for the specific language governing
11  * permissions and limitations under the License.
12  *
13  * When distributing Covered Code, include this CDDL
14  * Header Notice in each file and include the License file
15  * at glassfish/bootstrap/legal/CDDLv1.0.txt.
16  * If applicable, add the following below the CDDL Header,
17  * with the fields enclosed by brackets [] replaced by
18  * you own identifying information:
19  * "Portions Copyrighted [year] [name of copyright owner]"
20  *
21  * Copyright 2006 Sun Microsystems, Inc. All rights reserved.
22  */

23
24 /**
25  * This generated bean class Message matches the schema element 'message'.
26  * The root bean class is SunEjbJar
27  *
28  * Generated on Tue Aug 08 09:56:25 PDT 2006
29  * @Generated
30  */

31
32 package com.sun.enterprise.tools.common.dd;
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 Message extends org.netbeans.modules.schema2beans.BaseBean
42 {
43
44     static Vector comparators = new Vector();
45     private static final org.netbeans.modules.schema2beans.Version runtimeVersion = new org.netbeans.modules.schema2beans.Version(5, 0, 0);
46
47     static public final String JavaDoc JAVA_METHOD = "JavaMethod"; // NOI18N
48
static public final String JavaDoc OPERATION_NAME = "OperationName"; // NOI18N
49

50     public Message() {
51         this(Common.USE_DEFAULT_VALUES);
52     }
53
54     public Message(int options)
55     {
56         super(comparators, runtimeVersion);
57         // Properties (see root bean comments for the bean graph)
58
initPropertyTables(2);
59         this.createProperty("java-method", // NOI18N
60
JAVA_METHOD, Common.SEQUENCE_OR |
61             Common.TYPE_0_1 | Common.TYPE_BEAN | Common.TYPE_KEY,
62             JavaMethod.class);
63         this.createProperty("operation-name", // NOI18N
64
OPERATION_NAME, Common.SEQUENCE_OR |
65             Common.TYPE_0_1 | Common.TYPE_STRING | Common.TYPE_KEY,
66             String JavaDoc.class);
67         this.initialize(options);
68     }
69
70     // Setting the default values of the properties
71
void initialize(int options) {
72
73     }
74
75     // This attribute is optional
76
public void setJavaMethod(JavaMethod value) {
77         this.setValue(JAVA_METHOD, value);
78         if (value != null) {
79             // It's a mutually exclusive property.
80
setOperationName(null);
81         }
82     }
83
84     //
85
public JavaMethod getJavaMethod() {
86         return (JavaMethod)this.getValue(JAVA_METHOD);
87     }
88
89     // This attribute is optional
90
public void setOperationName(String JavaDoc value) {
91         this.setValue(OPERATION_NAME, value);
92         if (value != null) {
93             // It's a mutually exclusive property.
94
setJavaMethod(null);
95         }
96     }
97
98     //
99
public String JavaDoc getOperationName() {
100         return (String JavaDoc)this.getValue(OPERATION_NAME);
101     }
102
103     /**
104      * Create a new bean using it's default constructor.
105      * This does not add it to any bean graph.
106      */

107     public JavaMethod newJavaMethod() {
108         return new JavaMethod();
109     }
110
111     //
112
public static void addComparator(org.netbeans.modules.schema2beans.BeanComparator c) {
113         comparators.add(c);
114     }
115
116     //
117
public static void removeComparator(org.netbeans.modules.schema2beans.BeanComparator c) {
118         comparators.remove(c);
119     }
120     public void validate() throws org.netbeans.modules.schema2beans.ValidateException {
121     }
122
123     // Dump the content of this bean returning it as a String
124
public void dump(StringBuffer JavaDoc str, String JavaDoc indent){
125         String JavaDoc s;
126         Object JavaDoc o;
127         org.netbeans.modules.schema2beans.BaseBean n;
128         str.append(indent);
129         str.append("JavaMethod"); // NOI18N
130
n = (org.netbeans.modules.schema2beans.BaseBean) this.getJavaMethod();
131         if (n != null)
132             n.dump(str, indent + "\t"); // NOI18N
133
else
134             str.append(indent+"\tnull"); // NOI18N
135
this.dumpAttributes(JAVA_METHOD, 0, str, indent);
136
137         str.append(indent);
138         str.append("OperationName"); // NOI18N
139
str.append(indent+"\t"); // NOI18N
140
str.append("<"); // NOI18N
141
o = this.getOperationName();
142         str.append((o==null?"null":o.toString().trim())); // NOI18N
143
str.append(">\n"); // NOI18N
144
this.dumpAttributes(OPERATION_NAME, 0, str, indent);
145
146     }
147     public String JavaDoc dumpBeanNode(){
148         StringBuffer JavaDoc str = new StringBuffer JavaDoc();
149         str.append("Message\n"); // NOI18N
150
this.dump(str, "\n "); // NOI18N
151
return str.toString();
152     }}
153
154 // END_NOI18N
155

156
Popular Tags