DefaultResourcePrincipalNodepublic class DefaultResourcePrincipalNode extends com.sun.enterprise.deployment.node.DeploymentDescriptorNode This node handles the runtime deployment descriptor tag
default-resource-principal |
Fields Summary |
---|
private String | name | private String | passwd |
Methods Summary |
---|
public java.lang.Object | getDescriptor()
return null;
| public void | postParsing()notification of the end of XML parsing for this node
if (getParentNode().getDescriptor() instanceof ResourceReferenceDescriptor) {
((ResourceReferenceDescriptor) getParentNode().getDescriptor()).setResourcePrincipal(new ResourcePrincipal(name, passwd));
} else {
getParentNode().addDescriptor(new ResourcePrincipal(name, passwd));
}
| public void | setElementValue(com.sun.enterprise.deployment.node.XMLElement element, java.lang.String value)receives notification of the value for a particular tag
if (RuntimeTagNames.NAME.equals(element.getQName())) {
name = value;
} else if (RuntimeTagNames.PASSWORD.equals(element.getQName())) {
passwd = value;
} else super.setElementValue(element, value);
| public org.w3c.dom.Node | writeDescriptor(org.w3c.dom.Node parent, java.lang.String nodeName, com.sun.enterprise.deployment.ResourcePrincipal rpDescriptor)write the descriptor class to a DOM tree and return it
Node principalNode = super.writeDescriptor(parent, nodeName, null);
appendTextChild(principalNode, RuntimeTagNames.NAME, rpDescriptor.getName());
appendTextChild(principalNode, RuntimeTagNames.PASSWORD, rpDescriptor.getPassword());
return principalNode;
|
|