/** * Copy constructor. */ public AuthorizationConstraintImpl(AuthorizationConstraintImpl other) { this.securityRoles = new HashSet(other.getSecurityRoleSet()); }
/** * Adds a role to the authorization constraint. * @param the role to be added. */ public void addSecurityRole(SecurityRole securityRole) { this.getSecurityRoleSet().add(securityRole); }
/** * Removes the given role from the autrhorization constraint. * @param the role to be removed. */ public void removeSecurityRole(SecurityRole securityRole) { this.getSecurityRoleSet().remove(securityRole); }
/** * Return the security roles involved in this constraint. The * enumeration is empty if there are none. * @return the enumeration of security roles in this constraint. */ public Enumeration getSecurityRoles() { if (this.securityRoles == null) { this.securityRoles = new HashSet(); } return (new Vector(this.getSecurityRoleSet())).elements(); }