1 23 24 package com.sun.enterprise.deployment.node.runtime; 25 26 import org.w3c.dom.Node ; 27 28 import com.sun.enterprise.deployment.node.DeploymentDescriptorNode; 29 import com.sun.enterprise.deployment.node.XMLElement; 30 import com.sun.enterprise.deployment.xml.RuntimeTagNames; 31 import com.sun.enterprise.deployment.PrincipalImpl; 32 33 39 public class PrincipalNode extends DeploymentDescriptorNode { 40 41 PrincipalImpl principal=null; 42 43 46 public Object getDescriptor() { 47 return principal; 48 } 49 50 56 public void setElementValue(XMLElement element, String value) { 57 58 if (RuntimeTagNames.NAME.equals(element.getQName())) { 59 principal = new PrincipalImpl(value); 60 } else super.setElementValue(element, value); 61 } 62 63 71 public Node writeDescriptor(Node parent, String nodeName, PrincipalImpl descriptor) { 72 Node principal = appendChild(parent, nodeName); 73 appendTextChild(principal, RuntimeTagNames.NAME, descriptor.getName()); 74 return principal; 75 76 } 77 } 78 | Popular Tags |