Interface RoleGroup

  • All Superinterfaces:
    Role, Serializable
    All Known Implementing Classes:
    SimpleRoleGroup

    public interface RoleGroup
    extends Role
    Represents a group of roles
    Since:
    Nov 16, 2007
    Version:
    $Revision$
    Author:
    Anil.Saldhana@redhat.com
    • Method Detail

      • getRoles

        Collection<Role> getRoles()

        Get the roles contained in the RoleGroup. The returned List should be unmodifiable as the RoleGroup interface provides methods to add and remove roles.

        Returns:
        a unmodifiable Collection containing the RoleGroup's roles.
      • addRole

        void addRole​(Role aRole)
        Add a role
        Parameters:
        aRole -
      • addAll

        void addAll​(Collection<Role> roles)

        Adds all specified roles to the role group.

        Parameters:
        roles - the list of roles to be added.
      • clearRoles

        void clearRoles()
        Clear all the roles
      • removeRole

        void removeRole​(Role aRole)
        Remove a role
        Parameters:
        aRole -
      • containsRole

        boolean containsRole​(Role aRole)
        Validates whether a simple role is available
        Parameters:
        aRole - simple role
        Returns:
        Throws:
        IllegalArgumentException - role is not simple
      • containsAtleastOneRole

        boolean containsAtleastOneRole​(RoleGroup anotherRoleGroup)
        Validates whether there is at least one matching role in "anotherRoleGroup"
        Parameters:
        anotherRoleGroup - another role group
        Returns: