1 23 24 package com.sun.enterprise.deployment.node.web; 25 26 import java.util.Map ; 27 import java.util.Enumeration ; 28 import org.w3c.dom.Node ; 29 import com.sun.enterprise.deployment.node.DeploymentDescriptorNode; 30 import com.sun.enterprise.deployment.node.XMLElement; 31 import com.sun.enterprise.deployment.LocaleEncodingMappingListDescriptor; 32 import com.sun.enterprise.deployment.LocaleEncodingMappingDescriptor; 33 import com.sun.enterprise.deployment.xml.WebTagNames; 34 35 37 public class LocaleEncodingMappingListNode extends DeploymentDescriptorNode { 38 public LocaleEncodingMappingListNode() { 39 super(); 40 registerElementHandler(new XMLElement(WebTagNames.LOCALE_ENCODING_MAPPING), LocaleEncodingMappingNode.class, "addLocaleEncodingMapping"); 41 } 42 43 51 public Node writeDescriptor(Node parent, String nodeName, LocaleEncodingMappingListDescriptor descriptor) { 52 Node myNode = appendChild(parent, nodeName); 53 LocaleEncodingMappingNode lNode = new LocaleEncodingMappingNode(); 54 for(Enumeration en = descriptor.getLocaleEncodingMappings(); 55 en.hasMoreElements();) { 56 lNode.writeDescriptor(myNode, WebTagNames.LOCALE_ENCODING_MAPPING, (LocaleEncodingMappingDescriptor) en.nextElement()); 57 } 58 59 return myNode; 60 } 61 } 62 | Popular Tags |