1 23 24 29 30 package com.sun.enterprise.deployment.node.runtime; 31 32 import java.util.Map ; 33 import org.w3c.dom.Node ; 34 35 import com.sun.enterprise.deployment.node.XMLElement; 36 import com.sun.enterprise.deployment.node.DeploymentDescriptorNode; 37 import com.sun.enterprise.deployment.EjbIORConfigurationDescriptor; 38 import com.sun.enterprise.deployment.xml.RuntimeTagNames; 39 40 46 public class IORConfigurationNode extends DeploymentDescriptorNode { 47 48 EjbIORConfigurationDescriptor descriptor = new EjbIORConfigurationDescriptor(); 49 50 53 public Object getDescriptor() { 54 return descriptor; 55 } 56 57 63 protected Map getDispatchTable() { 64 Map table = super.getDispatchTable(); 65 66 table.put(RuntimeTagNames.INTEGRITY, "setIntegrity"); 68 table.put(RuntimeTagNames.CONFIDENTIALITY, "setConfidentiality"); 69 table.put(RuntimeTagNames.ESTABLISH_TRUST_IN_TARGET, "setEstablishTrustInTarget"); 70 table.put(RuntimeTagNames.ESTABLISH_TRUST_IN_CLIENT, "setEstablishTrustInClient"); 71 72 table.put(RuntimeTagNames.AUTH_METHOD, "setAuthenticationMethod"); 74 table.put(RuntimeTagNames.REALM, "setRealmName"); 75 table.put(RuntimeTagNames.REQUIRED, "setAuthMethodRequired"); 76 77 table.put(RuntimeTagNames.CALLER_PROPAGATION, "setCallerPropagation"); 79 80 return table; 81 } 82 83 91 public Node writeDescriptor(Node parent, String nodeName, EjbIORConfigurationDescriptor iorDesc) { 92 Node iorNode = appendChild(parent, nodeName); 93 Node transportNode = appendChild(iorNode, RuntimeTagNames.TRANSPORT_CONFIG); 94 95 appendTextChild(transportNode, RuntimeTagNames.INTEGRITY, iorDesc.getIntegrity()); 96 appendTextChild(transportNode, RuntimeTagNames.CONFIDENTIALITY, iorDesc.getConfidentiality()); 97 appendTextChild(transportNode, RuntimeTagNames.ESTABLISH_TRUST_IN_TARGET, 98 iorDesc.getEstablishTrustInTarget()); 99 appendTextChild(transportNode, RuntimeTagNames.ESTABLISH_TRUST_IN_CLIENT, 100 iorDesc.getEstablishTrustInClient()); 101 102 Node asContextNode = appendChild(iorNode, RuntimeTagNames.AS_CONTEXT); 104 appendTextChild(asContextNode, RuntimeTagNames.AUTH_METHOD, iorDesc.getAuthenticationMethod()); 105 appendTextChild(asContextNode, RuntimeTagNames.REALM, iorDesc.getRealmName()); 106 appendTextChild(asContextNode, RuntimeTagNames.REQUIRED, 107 (new Boolean (iorDesc.isAuthMethodRequired()).toString())); 108 109 Node sasContextNode = appendChild(iorNode, RuntimeTagNames.SAS_CONTEXT); 110 appendTextChild(sasContextNode, RuntimeTagNames.CALLER_PROPAGATION, iorDesc.getCallerPropagation()); 111 return iorNode; 112 } 113 } 114 | Popular Tags |