1 23 24 package com.sun.enterprise.deployment.node.runtime; 25 26 import org.xml.sax.Attributes ; 27 import org.w3c.dom.Node ; 28 import org.w3c.dom.Element ; 29 30 import com.sun.enterprise.deployment.node.DeploymentDescriptorNode; 31 import com.sun.enterprise.deployment.node.XMLElement; 32 import com.sun.enterprise.deployment.xml.RuntimeTagNames; 33 import com.sun.enterprise.deployment.Group; 34 35 36 42 public class GroupNode extends DeploymentDescriptorNode { 43 44 Group group=null; 45 46 49 public Object getDescriptor() { 50 return group; 51 } 52 53 56 public void startElement(XMLElement element, Attributes attributes) { 57 58 if (RuntimeTagNames.GROUP.equals(element.getQName())) { 59 for (int i=0; i<attributes.getLength();i++) { 60 if (RuntimeTagNames.NAME.equals(attributes.getQName(i))) { 61 group = new Group(attributes.getValue(i)); 62 } 63 } 64 } 65 } 66 67 75 public Node writeDescriptor(Node parent, String nodeName, Group descriptor) { 76 Element principal = appendChild(parent, nodeName); 77 setAttribute(principal, RuntimeTagNames.NAME, descriptor.getName()); 78 return principal; 79 80 } 81 } 82 | Popular Tags |