KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > com > sun > enterprise > config > serverbeans > Ssl


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 Ssl matches the DTD element ssl
26  *
27  */

28
29 package com.sun.enterprise.config.serverbeans;
30
31 import org.w3c.dom.*;
32 import org.netbeans.modules.schema2beans.*;
33 import java.beans.*;
34 import java.util.*;
35 import java.io.Serializable JavaDoc;
36 import com.sun.enterprise.config.ConfigBean;
37 import com.sun.enterprise.config.ConfigException;
38 import com.sun.enterprise.config.StaleWriteConfigException;
39 import com.sun.enterprise.util.i18n.StringManager;
40
41 // BEGIN_NOI18N
42

43 public class Ssl extends ConfigBean implements Serializable JavaDoc
44 {
45
46     static Vector comparators = new Vector();
47     private static final org.netbeans.modules.schema2beans.Version runtimeVersion = new org.netbeans.modules.schema2beans.Version(4, 2, 0);
48
49
50     public Ssl() {
51         this(Common.USE_DEFAULT_VALUES);
52     }
53
54     public Ssl(int options)
55     {
56         super(comparators, runtimeVersion);
57         // Properties (see root bean comments for the bean graph)
58
initPropertyTables(0);
59         this.initialize(options);
60     }
61
62     // Setting the default values of the properties
63
void initialize(int options) {
64
65     }
66
67     /**
68     * Getter for CertNickname of the Element ssl
69     * @return the CertNickname of the Element ssl
70     */

71     public String JavaDoc getCertNickname() {
72         return getAttributeValue(ServerTags.CERT_NICKNAME);
73     }
74     /**
75     * Modify the CertNickname of the Element ssl
76     * @param v the new value
77     * @throws StaleWriteConfigException if overwrite is false and file changed on disk
78     */

79     public void setCertNickname(String JavaDoc v, boolean overwrite) throws StaleWriteConfigException {
80         setAttributeValue(ServerTags.CERT_NICKNAME, v, overwrite);
81     }
82     /**
83     * Modify the CertNickname of the Element ssl
84     * @param v the new value
85     */

86     public void setCertNickname(String JavaDoc v) {
87         setAttributeValue(ServerTags.CERT_NICKNAME, v);
88     }
89     /**
90     * Getter for Ssl2Enabled of the Element ssl
91     * @return the Ssl2Enabled of the Element ssl
92     */

93     public boolean isSsl2Enabled() {
94         return toBoolean(getAttributeValue(ServerTags.SSL2_ENABLED));
95     }
96     /**
97     * Modify the Ssl2Enabled of the Element ssl
98     * @param v the new value
99     * @throws StaleWriteConfigException if overwrite is false and file changed on disk
100     */

101     public void setSsl2Enabled(boolean v, boolean overwrite) throws StaleWriteConfigException {
102         setAttributeValue(ServerTags.SSL2_ENABLED, ""+(v==true), overwrite);
103     }
104     /**
105     * Modify the Ssl2Enabled of the Element ssl
106     * @param v the new value
107     */

108     public void setSsl2Enabled(boolean v) {
109         setAttributeValue(ServerTags.SSL2_ENABLED, ""+(v==true));
110     }
111     /**
112     * Get the default value of Ssl2Enabled from dtd
113     */

114     public static String JavaDoc getDefaultSsl2Enabled() {
115         return "false".trim();
116     }
117     /**
118     * Getter for Ssl2Ciphers of the Element ssl
119     * @return the Ssl2Ciphers of the Element ssl
120     */

121     public String JavaDoc getSsl2Ciphers() {
122             return getAttributeValue(ServerTags.SSL2_CIPHERS);
123     }
124     /**
125     * Modify the Ssl2Ciphers of the Element ssl
126     * @param v the new value
127     * @throws StaleWriteConfigException if overwrite is false and file changed on disk
128     */

129     public void setSsl2Ciphers(String JavaDoc v, boolean overwrite) throws StaleWriteConfigException {
130         setAttributeValue(ServerTags.SSL2_CIPHERS, v, overwrite);
131     }
132     /**
133     * Modify the Ssl2Ciphers of the Element ssl
134     * @param v the new value
135     */

136     public void setSsl2Ciphers(String JavaDoc v) {
137         setAttributeValue(ServerTags.SSL2_CIPHERS, v);
138     }
139     /**
140     * Getter for Ssl3Enabled of the Element ssl
141     * @return the Ssl3Enabled of the Element ssl
142     */

143     public boolean isSsl3Enabled() {
144         return toBoolean(getAttributeValue(ServerTags.SSL3_ENABLED));
145     }
146     /**
147     * Modify the Ssl3Enabled of the Element ssl
148     * @param v the new value
149     * @throws StaleWriteConfigException if overwrite is false and file changed on disk
150     */

151     public void setSsl3Enabled(boolean v, boolean overwrite) throws StaleWriteConfigException {
152         setAttributeValue(ServerTags.SSL3_ENABLED, ""+(v==true), overwrite);
153     }
154     /**
155     * Modify the Ssl3Enabled of the Element ssl
156     * @param v the new value
157     */

158     public void setSsl3Enabled(boolean v) {
159         setAttributeValue(ServerTags.SSL3_ENABLED, ""+(v==true));
160     }
161     /**
162     * Get the default value of Ssl3Enabled from dtd
163     */

164     public static String JavaDoc getDefaultSsl3Enabled() {
165         return "true".trim();
166     }
167     /**
168     * Getter for Ssl3TlsCiphers of the Element ssl
169     * @return the Ssl3TlsCiphers of the Element ssl
170     */

171     public String JavaDoc getSsl3TlsCiphers() {
172             return getAttributeValue(ServerTags.SSL3_TLS_CIPHERS);
173     }
174     /**
175     * Modify the Ssl3TlsCiphers of the Element ssl
176     * @param v the new value
177     * @throws StaleWriteConfigException if overwrite is false and file changed on disk
178     */

179     public void setSsl3TlsCiphers(String JavaDoc v, boolean overwrite) throws StaleWriteConfigException {
180         setAttributeValue(ServerTags.SSL3_TLS_CIPHERS, v, overwrite);
181     }
182     /**
183     * Modify the Ssl3TlsCiphers of the Element ssl
184     * @param v the new value
185     */

186     public void setSsl3TlsCiphers(String JavaDoc v) {
187         setAttributeValue(ServerTags.SSL3_TLS_CIPHERS, v);
188     }
189     /**
190     * Getter for TlsEnabled of the Element ssl
191     * @return the TlsEnabled of the Element ssl
192     */

193     public boolean isTlsEnabled() {
194         return toBoolean(getAttributeValue(ServerTags.TLS_ENABLED));
195     }
196     /**
197     * Modify the TlsEnabled of the Element ssl
198     * @param v the new value
199     * @throws StaleWriteConfigException if overwrite is false and file changed on disk
200     */

201     public void setTlsEnabled(boolean v, boolean overwrite) throws StaleWriteConfigException {
202         setAttributeValue(ServerTags.TLS_ENABLED, ""+(v==true), overwrite);
203     }
204     /**
205     * Modify the TlsEnabled of the Element ssl
206     * @param v the new value
207     */

208     public void setTlsEnabled(boolean v) {
209         setAttributeValue(ServerTags.TLS_ENABLED, ""+(v==true));
210     }
211     /**
212     * Get the default value of TlsEnabled from dtd
213     */

214     public static String JavaDoc getDefaultTlsEnabled() {
215         return "true".trim();
216     }
217     /**
218     * Getter for TlsRollbackEnabled of the Element ssl
219     * @return the TlsRollbackEnabled of the Element ssl
220     */

221     public boolean isTlsRollbackEnabled() {
222         return toBoolean(getAttributeValue(ServerTags.TLS_ROLLBACK_ENABLED));
223     }
224     /**
225     * Modify the TlsRollbackEnabled of the Element ssl
226     * @param v the new value
227     * @throws StaleWriteConfigException if overwrite is false and file changed on disk
228     */

229     public void setTlsRollbackEnabled(boolean v, boolean overwrite) throws StaleWriteConfigException {
230         setAttributeValue(ServerTags.TLS_ROLLBACK_ENABLED, ""+(v==true), overwrite);
231     }
232     /**
233     * Modify the TlsRollbackEnabled of the Element ssl
234     * @param v the new value
235     */

236     public void setTlsRollbackEnabled(boolean v) {
237         setAttributeValue(ServerTags.TLS_ROLLBACK_ENABLED, ""+(v==true));
238     }
239     /**
240     * Get the default value of TlsRollbackEnabled from dtd
241     */

242     public static String JavaDoc getDefaultTlsRollbackEnabled() {
243         return "true".trim();
244     }
245     /**
246     * Getter for ClientAuthEnabled of the Element ssl
247     * @return the ClientAuthEnabled of the Element ssl
248     */

249     public boolean isClientAuthEnabled() {
250         return toBoolean(getAttributeValue(ServerTags.CLIENT_AUTH_ENABLED));
251     }
252     /**
253     * Modify the ClientAuthEnabled of the Element ssl
254     * @param v the new value
255     * @throws StaleWriteConfigException if overwrite is false and file changed on disk
256     */

257     public void setClientAuthEnabled(boolean v, boolean overwrite) throws StaleWriteConfigException {
258         setAttributeValue(ServerTags.CLIENT_AUTH_ENABLED, ""+(v==true), overwrite);
259     }
260     /**
261     * Modify the ClientAuthEnabled of the Element ssl
262     * @param v the new value
263     */

264     public void setClientAuthEnabled(boolean v) {
265         setAttributeValue(ServerTags.CLIENT_AUTH_ENABLED, ""+(v==true));
266     }
267     /**
268     * Get the default value of ClientAuthEnabled from dtd
269     */

270     public static String JavaDoc getDefaultClientAuthEnabled() {
271         return "false".trim();
272     }
273     /**
274     * get the xpath representation for this element
275     * returns something like abc[@name='value'] or abc
276     * depending on the type of the bean
277     */

278     protected String JavaDoc getRelativeXPath() {
279         String JavaDoc ret = null;
280         ret = "ssl";
281         return (null != ret ? ret.trim() : null);
282     }
283
284     /*
285     * generic method to get default value from dtd
286     */

287     public static String JavaDoc getDefaultAttributeValue(String JavaDoc attr) {
288         if(attr == null) return null;
289         attr = attr.trim();
290         if(attr.equals(ServerTags.SSL2_ENABLED)) return "false".trim();
291         if(attr.equals(ServerTags.SSL3_ENABLED)) return "true".trim();
292         if(attr.equals(ServerTags.TLS_ENABLED)) return "true".trim();
293         if(attr.equals(ServerTags.TLS_ROLLBACK_ENABLED)) return "true".trim();
294         if(attr.equals(ServerTags.CLIENT_AUTH_ENABLED)) return "false".trim();
295     return null;
296     }
297     //
298
public static void addComparator(org.netbeans.modules.schema2beans.BeanComparator c) {
299         comparators.add(c);
300     }
301
302     //
303
public static void removeComparator(org.netbeans.modules.schema2beans.BeanComparator c) {
304         comparators.remove(c);
305     }
306     public void validate() throws org.netbeans.modules.schema2beans.ValidateException {
307     }
308
309     // Dump the content of this bean returning it as a String
310
public void dump(StringBuffer JavaDoc str, String JavaDoc indent){
311         String JavaDoc s;
312         Object JavaDoc o;
313         org.netbeans.modules.schema2beans.BaseBean n;
314     }
315     public String JavaDoc dumpBeanNode(){
316         StringBuffer JavaDoc str = new StringBuffer JavaDoc();
317         str.append("Ssl\n"); // NOI18N
318
this.dump(str, "\n "); // NOI18N
319
return str.toString();
320     }}
321
322 // END_NOI18N
323

324
Popular Tags