KickJava   Java API By Example, From Geeks To Geeks.

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


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 SslClientConfig matches the DTD element ssl-client-config
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 SslClientConfig 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     static public final String JavaDoc SSL = "Ssl";
50
51     public SslClientConfig() {
52         this(Common.USE_DEFAULT_VALUES);
53     }
54
55     public SslClientConfig(int options)
56     {
57         super(comparators, runtimeVersion);
58         // Properties (see root bean comments for the bean graph)
59
initPropertyTables(1);
60         this.createProperty("ssl", SSL,
61             Common.TYPE_1 | Common.TYPE_BEAN | Common.TYPE_KEY,
62             Ssl.class);
63         this.createAttribute(SSL, "cert-nickname", "CertNickname",
64                         AttrProp.CDATA | AttrProp.REQUIRED,
65                         null, null);
66         this.createAttribute(SSL, "ssl2-enabled", "Ssl2Enabled",
67                         AttrProp.CDATA,
68                         null, "false");
69         this.createAttribute(SSL, "ssl2-ciphers", "Ssl2Ciphers",
70                         AttrProp.CDATA | AttrProp.IMPLIED,
71                         null, null);
72         this.createAttribute(SSL, "ssl3-enabled", "Ssl3Enabled",
73                         AttrProp.CDATA,
74                         null, "true");
75         this.createAttribute(SSL, "ssl3-tls-ciphers", "Ssl3TlsCiphers",
76                         AttrProp.CDATA | AttrProp.IMPLIED,
77                         null, null);
78         this.createAttribute(SSL, "tls-enabled", "TlsEnabled",
79                         AttrProp.CDATA,
80                         null, "true");
81         this.createAttribute(SSL, "tls-rollback-enabled", "TlsRollbackEnabled",
82                         AttrProp.CDATA,
83                         null, "true");
84         this.createAttribute(SSL, "client-auth-enabled", "ClientAuthEnabled",
85                         AttrProp.CDATA,
86                         null, "false");
87         this.initialize(options);
88     }
89
90     // Setting the default values of the properties
91
void initialize(int options) {
92
93     }
94
95     // This attribute is mandatory
96
public void setSsl(Ssl value) {
97         this.setValue(SSL, value);
98     }
99
100     // Get Method
101
public Ssl getSsl() {
102         return (Ssl)this.getValue(SSL);
103     }
104
105     /**
106      * Create a new bean using it's default constructor.
107      * This does not add it to any bean graph.
108      */

109     public Ssl newSsl() {
110         return new Ssl();
111     }
112
113     /**
114     * get the xpath representation for this element
115     * returns something like abc[@name='value'] or abc
116     * depending on the type of the bean
117     */

118     protected String JavaDoc getRelativeXPath() {
119         String JavaDoc ret = null;
120         ret = "ssl-client-config";
121         return (null != ret ? ret.trim() : null);
122     }
123
124     /*
125     * generic method to get default value from dtd
126     */

127     public static String JavaDoc getDefaultAttributeValue(String JavaDoc attr) {
128         if(attr == null) return null;
129         attr = attr.trim();
130     return null;
131     }
132     //
133
public static void addComparator(org.netbeans.modules.schema2beans.BeanComparator c) {
134         comparators.add(c);
135     }
136
137     //
138
public static void removeComparator(org.netbeans.modules.schema2beans.BeanComparator c) {
139         comparators.remove(c);
140     }
141     public void validate() throws org.netbeans.modules.schema2beans.ValidateException {
142     }
143
144     // Dump the content of this bean returning it as a String
145
public void dump(StringBuffer JavaDoc str, String JavaDoc indent){
146         String JavaDoc s;
147         Object JavaDoc o;
148         org.netbeans.modules.schema2beans.BaseBean n;
149         str.append(indent);
150         str.append("Ssl"); // NOI18N
151
n = (org.netbeans.modules.schema2beans.BaseBean) this.getSsl();
152         if (n != null)
153             n.dump(str, indent + "\t"); // NOI18N
154
else
155             str.append(indent+"\tnull"); // NOI18N
156
this.dumpAttributes(SSL, 0, str, indent);
157
158     }
159     public String JavaDoc dumpBeanNode(){
160         StringBuffer JavaDoc str = new StringBuffer JavaDoc();
161         str.append("SslClientConfig\n"); // NOI18N
162
this.dump(str, "\n "); // NOI18N
163
return str.toString();
164     }}
165
166 // END_NOI18N
167

168
Popular Tags