KickJava   Java API By Example, From Geeks To Geeks.

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


1 /**
2  * This generated bean class SecurityRoleRefType matches the schema element security-role-refType
3  *
4  * ===============================================================
5  *
6  *
7  * The security-role-refType contains the declaration of a
8  * security role reference in a component's or a
9  * Deployment Component's code. The declaration consists of an
10  * optional description, the security role name used in the
11  * code, and an optional link to a security role. If the
12  * security role is not specified, the Deployer must choose an
13  * appropriate security role.
14  *
15  *
16  * ===============================================================
17  * Generated on Fri Apr 22 15:42:54 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 SecurityRoleRefType 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 ROLE_NAME = "RoleName"; // NOI18N
36
static public final String JavaDoc ROLE_LINK = "RoleLink"; // NOI18N
37

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

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

213
Popular Tags