1 23 24 29 30 package com.sun.enterprise.tools.common.dd.ejb; 31 32 import org.w3c.dom.*; 33 import org.netbeans.modules.schema2beans.*; 34 import java.beans.*; 35 import java.util.*; 36 37 39 public class TransportConfig extends com.sun.enterprise.tools.common.dd.SunBaseBean 40 { 41 42 static Vector comparators = new Vector(); 43 44 static public final String INTEGRITY = "Integrity"; static public final String CONFIDENTIALITY = "Confidentiality"; static public final String ESTABLISH_TRUST_IN_TARGET = "EstablishTrustInTarget"; static public final String ESTABLISH_TRUST_IN_CLIENT = "EstablishTrustInClient"; 49 public TransportConfig() { 50 this(Common.USE_DEFAULT_VALUES); 51 } 52 53 public TransportConfig(int options) 54 { 55 super(comparators, new org.netbeans.modules.schema2beans.Version(1, 2, 0)); 56 this.createProperty("integrity", INTEGRITY, 59 Common.TYPE_1 | Common.TYPE_STRING | Common.TYPE_KEY, 60 String .class); 61 this.createProperty("confidentiality", CONFIDENTIALITY, 63 Common.TYPE_1 | Common.TYPE_STRING | Common.TYPE_KEY, 64 String .class); 65 this.createProperty("establish-trust-in-target", ESTABLISH_TRUST_IN_TARGET, 67 Common.TYPE_1 | Common.TYPE_STRING | Common.TYPE_KEY, 68 String .class); 69 this.createProperty("establish-trust-in-client", ESTABLISH_TRUST_IN_CLIENT, 71 Common.TYPE_1 | Common.TYPE_STRING | Common.TYPE_KEY, 72 String .class); 73 this.initialize(options); 74 } 75 76 void initialize(int options) 78 { 79 80 } 81 82 public void setIntegrity(String value) { 84 this.setValue(INTEGRITY, value); 85 } 86 87 public String getIntegrity() { 89 return (String )this.getValue(INTEGRITY); 90 } 91 92 public void setConfidentiality(String value) { 94 this.setValue(CONFIDENTIALITY, value); 95 } 96 97 public String getConfidentiality() { 99 return (String )this.getValue(CONFIDENTIALITY); 100 } 101 102 public void setEstablishTrustInTarget(String value) { 104 this.setValue(ESTABLISH_TRUST_IN_TARGET, value); 105 } 106 107 public String getEstablishTrustInTarget() { 109 return (String )this.getValue(ESTABLISH_TRUST_IN_TARGET); 110 } 111 112 public void setEstablishTrustInClient(String value) { 114 this.setValue(ESTABLISH_TRUST_IN_CLIENT, value); 115 } 116 117 public String getEstablishTrustInClient() { 119 return (String )this.getValue(ESTABLISH_TRUST_IN_CLIENT); 120 } 121 122 public static void addComparator(org.netbeans.modules.schema2beans.BeanComparator c) { 124 comparators.add(c); 125 } 126 127 public static void removeComparator(org.netbeans.modules.schema2beans.BeanComparator c) { 129 comparators.remove(c); 130 } 131 public void validate() throws org.netbeans.modules.schema2beans.ValidateException { 132 boolean restrictionFailure = false; 133 if (getIntegrity() == null) { 135 throw new org.netbeans.modules.schema2beans.ValidateException("getIntegrity() == null", "integrity", this); } 137 if (getConfidentiality() == null) { 139 throw new org.netbeans.modules.schema2beans.ValidateException("getConfidentiality() == null", "confidentiality", this); } 141 if (getEstablishTrustInTarget() == null) { 143 throw new org.netbeans.modules.schema2beans.ValidateException("getEstablishTrustInTarget() == null", "establishTrustInTarget", this); } 145 if (getEstablishTrustInClient() == null) { 147 throw new org.netbeans.modules.schema2beans.ValidateException("getEstablishTrustInClient() == null", "establishTrustInClient", this); } 149 } 150 151 public void dump(StringBuffer str, String indent){ 153 String s; 154 Object o; 155 org.netbeans.modules.schema2beans.BaseBean n; 156 str.append(indent); 157 str.append("Integrity"); str.append(indent+"\t"); str.append("<"); s = this.getIntegrity(); 161 str.append((s==null?"null":s.trim())); str.append(">\n"); this.dumpAttributes(INTEGRITY, 0, str, indent); 164 165 str.append(indent); 166 str.append("Confidentiality"); str.append(indent+"\t"); str.append("<"); s = this.getConfidentiality(); 170 str.append((s==null?"null":s.trim())); str.append(">\n"); this.dumpAttributes(CONFIDENTIALITY, 0, str, indent); 173 174 str.append(indent); 175 str.append("EstablishTrustInTarget"); str.append(indent+"\t"); str.append("<"); s = this.getEstablishTrustInTarget(); 179 str.append((s==null?"null":s.trim())); str.append(">\n"); this.dumpAttributes(ESTABLISH_TRUST_IN_TARGET, 0, str, indent); 182 183 str.append(indent); 184 str.append("EstablishTrustInClient"); str.append(indent+"\t"); str.append("<"); s = this.getEstablishTrustInClient(); 188 str.append((s==null?"null":s.trim())); str.append(">\n"); this.dumpAttributes(ESTABLISH_TRUST_IN_CLIENT, 0, str, indent); 191 192 } 193 public String dumpBeanNode(){ 194 StringBuffer str = new StringBuffer (); 195 str.append("TransportConfig\n"); this.dump(str, "\n "); return str.toString(); 198 }} 199 200 202 203 1047 | Popular Tags |