/** * My hashcode. */ public int hashCode() { return this.getName().hashCode(); }
/** * My hashcode. */ public int hashCode() { return this.getName().hashCode(); }
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); }
/** * 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; } }
void setOutcome(Set<Role> roleSet, AuthorizationConstraint ac, UserDataConstraint udc) { if (ac == null) { setPredefinedOutcome(true); } else { Enumeration eroles = ac.getSecurityRoles(); if (!eroles.hasMoreElements()) { setPredefinedOutcome(false); } else while (eroles.hasMoreElements()) { SecurityRoleDescriptor srd = (SecurityRoleDescriptor)eroles.nextElement(); String roleName = srd.getName(); if ("*".equals(roleName)) { Iterator it = roleSet.iterator(); while(it.hasNext()) { setRole(((Role)it.next()).getName()); } } else { setRole(roleName); } } } addConnectType(udc == null? null : udc.getTransportGuarantee()); if (WebPermissionUtil.logger.isLoggable(Level.FINE)){ WebPermissionUtil.logger.log (Level.FINE,"JACC: setOutcome yields: " + toString()); } }
@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; } }
SecurityRoleDescriptor srd = (SecurityRoleDescriptor)eroles.nextElement(); String roleName = srd.getName(); if ("*".equals(roleName)) { containsAllRoles = true;
/** * 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); }
if (e != null) { while (e.hasMoreElements()){ webModule.addSecurityRole(e.nextElement().getName());