KickJava   Java API By Example, From Geeks To Geeks.

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


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 MessageSecurityBinding matches the schema element 'message-security-binding'.
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 MessageSecurityBinding 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 AUTHLAYER = "AuthLayer"; // NOI18N
48
static public final String JavaDoc PROVIDERID = "ProviderId"; // NOI18N
49
static public final String JavaDoc MESSAGE_SECURITY = "MessageSecurity"; // NOI18N
50

51     public MessageSecurityBinding() {
52         this(Common.USE_DEFAULT_VALUES);
53     }
54
55     public MessageSecurityBinding(int options)
56     {
57         super(comparators, runtimeVersion);
58         // Properties (see root bean comments for the bean graph)
59
initPropertyTables(1);
60         this.createProperty("message-security", // NOI18N
61
MESSAGE_SECURITY,
62             Common.TYPE_0_N | Common.TYPE_BEAN | Common.TYPE_KEY,
63             MessageSecurity.class);
64         this.initialize(options);
65     }
66
67     // Setting the default values of the properties
68
void initialize(int options) {
69
70     }
71
72     // This attribute is mandatory
73
public void setAuthLayer(java.lang.String JavaDoc value) {
74         setAttributeValue(AUTHLAYER, value);
75     }
76
77     //
78
public java.lang.String JavaDoc getAuthLayer() {
79         return getAttributeValue(AUTHLAYER);
80     }
81
82     // This attribute is optional
83
public void setProviderId(java.lang.String JavaDoc value) {
84         setAttributeValue(PROVIDERID, value);
85     }
86
87     //
88
public java.lang.String JavaDoc getProviderId() {
89         return getAttributeValue(PROVIDERID);
90     }
91
92     // This attribute is an array, possibly empty
93
public void setMessageSecurity(int index, MessageSecurity value) {
94         this.setValue(MESSAGE_SECURITY, index, value);
95     }
96
97     //
98
public MessageSecurity getMessageSecurity(int index) {
99         return (MessageSecurity)this.getValue(MESSAGE_SECURITY, index);
100     }
101
102     // Return the number of properties
103
public int sizeMessageSecurity() {
104         return this.size(MESSAGE_SECURITY);
105     }
106
107     // This attribute is an array, possibly empty
108
public void setMessageSecurity(MessageSecurity[] value) {
109         this.setValue(MESSAGE_SECURITY, value);
110     }
111
112     //
113
public MessageSecurity[] getMessageSecurity() {
114         return (MessageSecurity[])this.getValues(MESSAGE_SECURITY);
115     }
116
117     // Add a new element returning its index in the list
118
public int addMessageSecurity(com.sun.enterprise.tools.common.dd.MessageSecurity value) {
119         int positionOfNewItem = this.addValue(MESSAGE_SECURITY, value);
120         return positionOfNewItem;
121     }
122
123     //
124
// Remove an element using its reference
125
// Returns the index the element had in the list
126
//
127
public int removeMessageSecurity(com.sun.enterprise.tools.common.dd.MessageSecurity value) {
128         return this.removeValue(MESSAGE_SECURITY, value);
129     }
130
131     /**
132      * Create a new bean using it's default constructor.
133      * This does not add it to any bean graph.
134      */

135     public MessageSecurity newMessageSecurity() {
136         return new MessageSecurity();
137     }
138
139     //
140
public static void addComparator(org.netbeans.modules.schema2beans.BeanComparator c) {
141         comparators.add(c);
142     }
143
144     //
145
public static void removeComparator(org.netbeans.modules.schema2beans.BeanComparator c) {
146         comparators.remove(c);
147     }
148     public void validate() throws org.netbeans.modules.schema2beans.ValidateException {
149     }
150
151     // Dump the content of this bean returning it as a String
152
public void dump(StringBuffer JavaDoc str, String JavaDoc indent){
153         String JavaDoc s;
154         Object JavaDoc o;
155         org.netbeans.modules.schema2beans.BaseBean n;
156         str.append(indent);
157         str.append("MessageSecurity["+this.sizeMessageSecurity()+"]"); // NOI18N
158
for(int i=0; i<this.sizeMessageSecurity(); i++)
159         {
160             str.append(indent+"\t");
161             str.append("#"+i+":");
162             n = (org.netbeans.modules.schema2beans.BaseBean) this.getMessageSecurity(i);
163             if (n != null)
164                 n.dump(str, indent + "\t"); // NOI18N
165
else
166                 str.append(indent+"\tnull"); // NOI18N
167
this.dumpAttributes(MESSAGE_SECURITY, i, str, indent);
168         }
169
170     }
171     public String JavaDoc dumpBeanNode(){
172         StringBuffer JavaDoc str = new StringBuffer JavaDoc();
173         str.append("MessageSecurityBinding\n"); // NOI18N
174
this.dump(str, "\n "); // NOI18N
175
return str.toString();
176     }}
177
178 // END_NOI18N
179

180
Popular Tags