1 23 24 package com.sun.enterprise.deployment.node.web; 25 26 import java.util.Map ; 27 import java.util.HashMap ; 28 import org.w3c.dom.Node ; 29 30 import com.sun.enterprise.deployment.MimeMappingDescriptor; 31 import com.sun.enterprise.deployment.xml.WebTagNames; 32 import com.sun.enterprise.deployment.node.DeploymentDescriptorNode; 33 34 40 public class MimeMappingNode extends DeploymentDescriptorNode { 41 42 48 protected Map getDispatchTable() { 49 Map table = new HashMap (); 50 table.put(WebTagNames.EXTENSION, "setExtension"); 51 table.put(WebTagNames.MIME_TYPE, "setMimeType"); 52 return table; 53 } 54 62 public Node writeDescriptor(Node parent, String nodeName, MimeMappingDescriptor descriptor) { 63 Node myNode = appendChild(parent, nodeName); 64 appendTextChild(myNode, WebTagNames.EXTENSION, descriptor.getExtension()); 65 appendTextChild(myNode, WebTagNames.MIME_TYPE, descriptor.getMimeType()); 66 return myNode; 67 } 68 } 69 | Popular Tags |