public void addAppRole(SecurityRoleDescriptor descriptor) { Role role = new Role(descriptor.getName()); role.setDescription(descriptor.getDescription()); getAppRoles().add(role); }
public void addAppRole(SecurityRoleDescriptor descriptor) { Role role = new Role(descriptor.getName()); role.setDescription(descriptor.getDescription()); getAppRoles().add(role); }
@Override public Node writeDescriptor(Node parent, String nodeName, SecurityRoleDescriptor descriptor) { Node roleNode = appendChild(parent, nodeName); appendTextChild(roleNode, TagNames.DESCRIPTION, descriptor.getDescription()); appendTextChild(roleNode, TagNames.ROLE_NAME, descriptor.getName()); return roleNode; } }
/** * 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, SecurityRoleDescriptor descriptor) { Node roleNode = appendChild(parent, nodeName); appendTextChild(roleNode, TagNames.DESCRIPTION, descriptor.getDescription()); appendTextChild(roleNode, TagNames.ROLE_NAME, descriptor.getName()); return roleNode; } }
/** * Adds a Role object based on the supplied SecurityRoleDescriptor. * <p/> * A change in SecurityRoleNode to fix bug 4933385 causes the DOL to use SecurityRoleDescriptor, rather * than Role, to contain information about security roles. To minimize the impact on BundleDescriptor, * this method has been added for use by the DOL as it processes security-role elements. * <p/> * This method creates a new Role object based on the characteristics of the SecurityRoleDescriptor * and then delegates to addRole(Role) to preserve the rest of the behavior of this class. * * @param descriptor SecurityRoleDescriptor that describes the username and description of the role */ public void addRole(SecurityRoleDescriptor descriptor) { Role role = new Role(descriptor.getName()); role.setDescription(descriptor.getDescription()); this.addRole(role); }
/** * Adds a Role object based on the supplied SecurityRoleDescriptor. * <p/> * A change in SecurityRoleNode to fix bug 4933385 causes the DOL to use SecurityRoleDescriptor, rather * than Role, to contain information about security roles. To minimize the impact on BundleDescriptor, * this method has been added for use by the DOL as it processes security-role elements. * <p/> * This method creates a new Role object based on the characteristics of the SecurityRoleDescriptor * and then delegates to addRole(Role) to preserve the rest of the behavior of this class. * * @param descriptor SecurityRoleDescriptor that describes the username and description of the role */ public void addRole(SecurityRoleDescriptor descriptor) { Role role = new Role(descriptor.getName()); role.setDescription(descriptor.getDescription()); this.addRole(role); }