1 23 24 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 ; 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 43 public class SslClientConfig extends ConfigBean implements Serializable 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 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 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 void initialize(int options) { 92 93 } 94 95 public void setSsl(Ssl value) { 97 this.setValue(SSL, value); 98 } 99 100 public Ssl getSsl() { 102 return (Ssl)this.getValue(SSL); 103 } 104 105 109 public Ssl newSsl() { 110 return new Ssl(); 111 } 112 113 118 protected String getRelativeXPath() { 119 String ret = null; 120 ret = "ssl-client-config"; 121 return (null != ret ? ret.trim() : null); 122 } 123 124 127 public static String getDefaultAttributeValue(String attr) { 128 if(attr == null) return null; 129 attr = attr.trim(); 130 return null; 131 } 132 public static void addComparator(org.netbeans.modules.schema2beans.BeanComparator c) { 134 comparators.add(c); 135 } 136 137 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 public void dump(StringBuffer str, String indent){ 146 String s; 147 Object o; 148 org.netbeans.modules.schema2beans.BaseBean n; 149 str.append(indent); 150 str.append("Ssl"); n = (org.netbeans.modules.schema2beans.BaseBean) this.getSsl(); 152 if (n != null) 153 n.dump(str, indent + "\t"); else 155 str.append(indent+"\tnull"); this.dumpAttributes(SSL, 0, str, indent); 157 158 } 159 public String dumpBeanNode(){ 160 StringBuffer str = new StringBuffer (); 161 str.append("SslClientConfig\n"); this.dump(str, "\n "); return str.toString(); 164 }} 165 166 168 | Popular Tags |