/** * write the descriptor class to a DOM tree and return it * * @param parent node in the DOM tree * @param node name for the root element of this xml fragment * @param the descriptor to write * @return the DOM tree top node */ public Node writeDescriptor(Node parent, String nodeName, AuthorizationConstraintImpl descriptor) { Node myNode = appendChild(parent, nodeName); writeLocalizedDescriptions(myNode, descriptor); // role-name* for (Enumeration roles = descriptor.getSecurityRoles();roles.hasMoreElements();) { SecurityRoleDescriptor role = (SecurityRoleDescriptor) roles.nextElement(); appendTextChild(myNode, WebTagNames.ROLE_NAME, role.getName()); } return myNode; } }
Enumeration rolesEnum = authCons.getSecurityRoles(); StringBuffer rsb = new StringBuffer(); rsb.append(" Accessible by roles: ");