Class MemoryRoleManagerImpl

  • All Implemented Interfaces:
    Serializable, org.apache.avalon.framework.activity.Disposable, org.apache.avalon.framework.configuration.Configurable, org.apache.avalon.framework.logger.LogEnabled, org.apache.avalon.framework.service.Serviceable, org.apache.avalon.framework.thread.ThreadSafe, RoleManager

    public class MemoryRoleManagerImpl
    extends AbstractRoleManager
    This implementation keeps all objects in memory. This is mostly meant to help with testing and prototyping of ideas.
    Version:
    $Id$
    Author:
    Eric Pugh
    See Also:
    Serialized Form
    • Constructor Detail

      • MemoryRoleManagerImpl

        public MemoryRoleManagerImpl()
    • Method Detail

      • checkExists

        public boolean checkExists​(String roleName)
        Determines if the Role exists in the security system.
        Parameters:
        roleName - a String value
        Returns:
        true if the role exists in the system, false otherwise
      • getAllRoles

        public 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.
      • persistNewRole

        protected <T extends Role> T persistNewRole​(T role)
                                             throws DataBackendException
        Creates a new role with specified attributes.
        Specified by:
        persistNewRole in class AbstractRoleManager
        Parameters:
        role - the object describing the role to be created.
        Returns:
        a new Role object that has id set up properly.
        Throws:
        DataBackendException - if there was an error accessing the data backend.