1 23 24 package com.sun.enterprise.deployment.node.connector; 25 26 import java.util.*; 27 import org.xml.sax.Attributes ; 28 import com.sun.enterprise.deployment.Descriptor; 29 import com.sun.enterprise.deployment.ConnectorDescriptor; 30 import com.sun.enterprise.deployment.LicenseDescriptor; 31 import com.sun.enterprise.deployment.xml.ConnectorTagNames; 32 import com.sun.enterprise.deployment.node.DeploymentDescriptorNode; 33 import com.sun.enterprise.deployment.node.XMLElement; 34 35 import org.xml.sax.Attributes ; 36 import org.w3c.dom.Node ; 37 38 39 43 public class LicenseNode extends DeploymentDescriptorNode { 44 45 53 protected Map getDispatchTable() { 54 Map table = super.getDispatchTable(); 55 table.put(ConnectorTagNames.LICENSE_REQUIRED, "setLicenseRequired"); 56 return table; 57 } 58 59 66 public Node writeDescriptor(Node parent, ConnectorDescriptor descriptor) { 67 LicenseDescriptor licenseDesc = descriptor.getLicenseDescriptor(); 68 if (licenseDesc != null) { 69 Node licenseNode = appendChild(parent, 70 ConnectorTagNames.LICENSE); 71 writeLocalizedDescriptions(licenseNode, licenseDesc); 72 appendTextChild(licenseNode, ConnectorTagNames.LICENSE_REQUIRED, 73 licenseDesc.getLicenseRequiredValue()); 74 } 75 return parent; 76 } 77 } 78 | Popular Tags |