1 23 24 package com.sun.enterprise.deployment.node; 25 26 import java.util.Map ; 27 import org.w3c.dom.Node ; 28 29 import com.sun.enterprise.deployment.SecurityRoleDescriptor; 30 import com.sun.enterprise.deployment.xml.TagNames; 31 32 import com.sun.enterprise.deployment.Role; 33 34 39 public class SecurityRoleNode extends DeploymentDescriptorNode { 40 41 50 protected Map getDispatchTable() { 51 Map table = super.getDispatchTable(); 52 table.put(TagNames.ROLE_NAME, "setName"); 53 return table; 54 } 55 56 64 public Node writeDescriptor(Node parent, String nodeName, Role descriptor) { 65 Node roleNode = appendChild(parent, nodeName); 66 appendTextChild(roleNode, TagNames.DESCRIPTION, descriptor.getDescription()); 67 appendTextChild(roleNode, TagNames.ROLE_NAME, descriptor.getName()); 68 return roleNode; 69 } 70 71 79 public Node writeDescriptor(Node parent, String nodeName, SecurityRoleDescriptor descriptor) { 80 Node roleNode = appendChild(parent, nodeName); 81 appendTextChild(roleNode, TagNames.DESCRIPTION, descriptor.getDescription()); 82 appendTextChild(roleNode, TagNames.ROLE_NAME, descriptor.getName()); 83 return roleNode; 84 } 85 } 86 | Popular Tags |