1 23 24 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 ; 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 Ssl 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 50 public Ssl() { 51 this(Common.USE_DEFAULT_VALUES); 52 } 53 54 public Ssl(int options) 55 { 56 super(comparators, runtimeVersion); 57 initPropertyTables(0); 59 this.initialize(options); 60 } 61 62 void initialize(int options) { 64 65 } 66 67 71 public String getCertNickname() { 72 return getAttributeValue(ClientTags.CERT_NICKNAME); 73 } 74 79 public void setCertNickname(String v, boolean overwrite) throws StaleWriteConfigException { 80 setAttributeValue(ClientTags.CERT_NICKNAME, v, overwrite); 81 } 82 86 public void setCertNickname(String v) { 87 setAttributeValue(ClientTags.CERT_NICKNAME, v); 88 } 89 93 public boolean isSsl2Enabled() { 94 return toBoolean(getAttributeValue(ClientTags.SSL2_ENABLED)); 95 } 96 101 public void setSsl2Enabled(boolean v, boolean overwrite) throws StaleWriteConfigException { 102 setAttributeValue(ClientTags.SSL2_ENABLED, ""+(v==true), overwrite); 103 } 104 108 public void setSsl2Enabled(boolean v) { 109 setAttributeValue(ClientTags.SSL2_ENABLED, ""+(v==true)); 110 } 111 114 public static String getDefaultSsl2Enabled() { 115 return "false".trim(); 116 } 117 121 public String getSsl2Ciphers() { 122 return getAttributeValue(ClientTags.SSL2_CIPHERS); 123 } 124 129 public void setSsl2Ciphers(String v, boolean overwrite) throws StaleWriteConfigException { 130 setAttributeValue(ClientTags.SSL2_CIPHERS, v, overwrite); 131 } 132 136 public void setSsl2Ciphers(String v) { 137 setAttributeValue(ClientTags.SSL2_CIPHERS, v); 138 } 139 143 public boolean isSsl3Enabled() { 144 return toBoolean(getAttributeValue(ClientTags.SSL3_ENABLED)); 145 } 146 151 public void setSsl3Enabled(boolean v, boolean overwrite) throws StaleWriteConfigException { 152 setAttributeValue(ClientTags.SSL3_ENABLED, ""+(v==true), overwrite); 153 } 154 158 public void setSsl3Enabled(boolean v) { 159 setAttributeValue(ClientTags.SSL3_ENABLED, ""+(v==true)); 160 } 161 164 public static String getDefaultSsl3Enabled() { 165 return "true".trim(); 166 } 167 171 public String getSsl3TlsCiphers() { 172 return getAttributeValue(ClientTags.SSL3_TLS_CIPHERS); 173 } 174 179 public void setSsl3TlsCiphers(String v, boolean overwrite) throws StaleWriteConfigException { 180 setAttributeValue(ClientTags.SSL3_TLS_CIPHERS, v, overwrite); 181 } 182 186 public void setSsl3TlsCiphers(String v) { 187 setAttributeValue(ClientTags.SSL3_TLS_CIPHERS, v); 188 } 189 193 public boolean isTlsEnabled() { 194 return toBoolean(getAttributeValue(ClientTags.TLS_ENABLED)); 195 } 196 201 public void setTlsEnabled(boolean v, boolean overwrite) throws StaleWriteConfigException { 202 setAttributeValue(ClientTags.TLS_ENABLED, ""+(v==true), overwrite); 203 } 204 208 public void setTlsEnabled(boolean v) { 209 setAttributeValue(ClientTags.TLS_ENABLED, ""+(v==true)); 210 } 211 214 public static String getDefaultTlsEnabled() { 215 return "true".trim(); 216 } 217 221 public boolean isTlsRollbackEnabled() { 222 return toBoolean(getAttributeValue(ClientTags.TLS_ROLLBACK_ENABLED)); 223 } 224 229 public void setTlsRollbackEnabled(boolean v, boolean overwrite) throws StaleWriteConfigException { 230 setAttributeValue(ClientTags.TLS_ROLLBACK_ENABLED, ""+(v==true), overwrite); 231 } 232 236 public void setTlsRollbackEnabled(boolean v) { 237 setAttributeValue(ClientTags.TLS_ROLLBACK_ENABLED, ""+(v==true)); 238 } 239 242 public static String getDefaultTlsRollbackEnabled() { 243 return "true".trim(); 244 } 245 250 protected String getRelativeXPath() { 251 String ret = null; 252 ret = "ssl"; 253 return (null != ret ? ret.trim() : null); 254 } 255 256 259 public static String getDefaultAttributeValue(String 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 public static void addComparator(org.netbeans.modules.schema2beans.BeanComparator c) { 270 comparators.add(c); 271 } 272 273 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 public void dump(StringBuffer str, String indent){ 282 String s; 283 Object o; 284 org.netbeans.modules.schema2beans.BaseBean n; 285 } 286 public String dumpBeanNode(){ 287 StringBuffer str = new StringBuffer (); 288 str.append("Ssl\n"); this.dump(str, "\n "); return str.toString(); 291 }} 292 293 295 | Popular Tags |