1 23 24 package com.sun.enterprise.deployment.node.web; 25 26 import java.util.Map ; 27 import org.w3c.dom.Node ; 28 import com.sun.enterprise.deployment.node.DeploymentDescriptorNode; 29 import com.sun.enterprise.deployment.LocaleEncodingMappingDescriptor; 30 import com.sun.enterprise.deployment.xml.WebTagNames; 31 32 34 public class LocaleEncodingMappingNode extends DeploymentDescriptorNode { 35 36 42 protected Map getDispatchTable() { 43 Map table = super.getDispatchTable(); 44 table.put(WebTagNames.LOCALE, "setLocale"); 45 table.put(WebTagNames.ENCODING, "setEncoding"); 46 return table; 47 } 48 49 57 public Node writeDescriptor(Node parent, String nodeName, LocaleEncodingMappingDescriptor descriptor) { 58 Node envEntryNode = super.writeDescriptor(parent, nodeName, descriptor); 59 appendTextChild(envEntryNode, WebTagNames.LOCALE, descriptor.getLocale()); 60 appendTextChild(envEntryNode, WebTagNames.ENCODING, descriptor.getEncoding()); 61 return envEntryNode; 62 } 63 } 64 | Popular Tags |