/** * write the descriptor class to a DOM tree and return it * * @param parent node for the DOM tree * @param node name for the descriptor * @param the descriptor to write * @return the DOM tree top node */ public Node writeDescriptor(Node parent, String nodeName, Principal descriptor) { 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; } }
/** * write the descriptor class to a DOM tree and return it * * @param parent node for the DOM tree * @param node name for the descriptor * @param the descriptor to write * @return the DOM tree top node */ public Node writeDescriptor(Node parent, String nodeName, Principal descriptor) { 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; } }