Interface RoleManager

  • All Superinterfaces:
    Serializable
    All Known Implementing Classes:
    AbstractRoleManager

    public interface RoleManager
    extends Serializable
    A RoleManager performs Role objects related tasks on behalf of the BaseSecurityService. The responsibilities of this class include loading data of a role from the storage and putting them into the Role objects, saving those data to the permanent storage.
    Version:
    $Id$
    Author:
    Eric Pugh
    • Field Summary

      Fields 
      Modifier and Type Field Description
      static String ROLE
      Avalon role - used to id the component within the manager
    • Field Detail

      • ROLE

        static final String ROLE
        Avalon role - used to id the component within the manager
    • Method Detail

      • getRoleInstance

        <T extends Role> T getRoleInstance()
                                    throws DataBackendException
        Construct a blank Role object This method calls getRoleClass, and then creates a new object using the default constructor.
        Type Parameters:
        T - role type
        Returns:
        an object implementing Role interface.
        Throws:
        DataBackendException - if the object could not be instantiated
      • getRoleInstance

        <T extends Role> T getRoleInstance​(String roleName)
                                    throws DataBackendException
        Construct a blank Role object. This method calls getRoleClass, and then creates a new object using the default constructor.
        Type Parameters:
        T - Role
        Parameters:
        roleName - The name of the Role
        Returns:
        an object implementing Role interface.
        Throws:
        DataBackendException - if the object could not be instantiated.
      • getAllRoles

        RoleSet getAllRoles()
                     throws DataBackendException
        Retrieves all roles defined in the system.
        Returns:
        the names of all roles defined in the system.
        Throws:
        DataBackendException - if there was an error accessing the data backend.
      • checkExists

        boolean checkExists​(Role role)
                     throws DataBackendException
        Determines if the Role exists in the security system.
        Parameters:
        role - a Role value
        Returns:
        true if the role exists in the system, false otherwise
        Throws:
        DataBackendException - when more than one Role with the same name exists.
      • checkExists

        boolean checkExists​(String roleName)
                     throws DataBackendException
        Determines if a Role exists in the security system with the specified role name.
        Parameters:
        roleName - the name of a Role to check.
        Returns:
        true if the role exists in the system, false otherwise
        Throws:
        DataBackendException - when more than one Role with the same name exists.