/** * Adds a new abstract role */ public void addRole(Role role) { for (BundleDescriptor bd : getBundleDescriptors()) { bd.addRole(role); } }
/** * Add a new abstrct role to me. */ public void addSecurityRole(SecurityRole securityRole) { Role r = new Role(securityRole.getName()); r.setDescription(securityRole.getDescription()); super.addRole(r); }
/** * 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); }