PrincipalNodepublic class PrincipalNode extends com.sun.enterprise.deployment.node.runtime.RuntimeDescriptorNode This node handles the principal runtime deployment descriptors |
Methods Summary |
---|
public void | setElementValue(com.sun.enterprise.deployment.node.XMLElement element, java.lang.String value)receives notification of the value for a particular tag
RuntimeDescriptor descriptor = (RuntimeDescriptor) getDescriptor();
if (descriptor==null) {
throw new RuntimeException("Trying to set values on a null descriptor");
}
if (element.getQName().equals(RuntimeTagNames.USER_NAME)) {
descriptor.setAttributeValue(Principal.USER_NAME, value);
} else
if (element.getQName().equals(RuntimeTagNames.PASSWORD)) {
descriptor.setAttributeValue(Principal.PASSWORD, value);
} else
if (element.getQName().equals(RuntimeTagNames.CREDENTIAL)) {
descriptor.setAttributeValue(Principal.CREDENTIAL, 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.runtime.connector.Principal descriptor)write the descriptor class to a DOM tree and return it
Element principalNode = (Element) super.writeDescriptor(parent, nodeName, descriptor);
appendTextChild(principalNode, RuntimeTagNames.DESCRIPTION, descriptor.getDescription());
setAttribute(principalNode, RuntimeTagNames.USER_NAME, (String) descriptor.getValue(Principal.USER_NAME));
setAttribute(principalNode, RuntimeTagNames.PASSWORD, (String) descriptor.getValue(Principal.PASSWORD));
setAttribute(principalNode, RuntimeTagNames.CREDENTIAL, (String) descriptor.getValue(Principal.CREDENTIAL));
return principalNode;
|
|