KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > com > sun > enterprise > config > clientbeans > 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.clientbeans;
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(ClientTags.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(ClientTags.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(ClientTags.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(ClientTags.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(ClientTags.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(ClientTags.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(ClientTags.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(ClientTags.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(ClientTags.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(ClientTags.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(ClientTags.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(ClientTags.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(ClientTags.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(ClientTags.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(ClientTags.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(ClientTags.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(ClientTags.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(ClientTags.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(ClientTags.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(ClientTags.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(ClientTags.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     * get the xpath representation for this element
247     * returns something like abc[@name='value'] or abc
248     * depending on the type of the bean
249     */

250     protected String JavaDoc getRelativeXPath() {
251         String JavaDoc ret = null;
252         ret = "ssl";
253         return (null != ret ? ret.trim() : null);
254     }
255
256     /*
257     * generic method to get default value from dtd
258     */

259     public static String JavaDoc getDefaultAttributeValue(String JavaDoc attr) {
260         if(attr == null) return null;
261         attr = attr.trim();
262         if(attr.equals(ClientTags.SSL2_ENABLED)) return "false".trim();
263         if(attr.equals(ClientTags.SSL3_ENABLED)) return "true".trim();
264         if(attr.equals(ClientTags.TLS_ENABLED)) return "true".trim();
265         if(attr.equals(ClientTags.TLS_ROLLBACK_ENABLED)) return "true".trim();
266     return null;
267     }
268     //
269
public static void addComparator(org.netbeans.modules.schema2beans.BeanComparator c) {
270         comparators.add(c);
271     }
272
273     //
274
public static void removeComparator(org.netbeans.modules.schema2beans.BeanComparator c) {
275         comparators.remove(c);
276     }
277     public void validate() throws org.netbeans.modules.schema2beans.ValidateException {
278     }
279
280     // Dump the content of this bean returning it as a String
281
public void dump(StringBuffer JavaDoc str, String JavaDoc indent){
282         String JavaDoc s;
283         Object JavaDoc o;
284         org.netbeans.modules.schema2beans.BaseBean n;
285     }
286     public String JavaDoc dumpBeanNode(){
287         StringBuffer JavaDoc str = new StringBuffer JavaDoc();
288         str.append("Ssl\n"); // NOI18N
289
this.dump(str, "\n "); // NOI18N
290
return str.toString();
291     }}
292
293 // END_NOI18N
294

295
Popular Tags