Class AbstractRole

  • All Implemented Interfaces:
    Principal, Role
    Direct Known Subclasses:
    GenericRole

    public abstract class AbstractRole
    extends Object
    implements Role

    Convenience base class for Role implementations.

    Since:
    4.1
    Author:
    Craig R. McClanahan
    • Field Detail

      • description

        protected String description
        The description of this Role.
      • rolename

        protected String rolename
        The role name of this Role.
    • Constructor Detail

      • AbstractRole

        public AbstractRole()
    • Method Detail

      • getDescription

        public String getDescription()
        Return the description of this role.
        Specified by:
        getDescription in interface Role
        Returns:
        the description of this role.
      • setDescription

        public void setDescription​(String description)
        Set the description of this role.
        Specified by:
        setDescription in interface Role
        Parameters:
        description - The new description
      • getRolename

        public String getRolename()
        Return the role name of this role, which must be unique within the scope of a UserDatabase.
        Specified by:
        getRolename in interface Role
        Returns:
        the role name of this role, which must be unique within the scope of a UserDatabase.
      • setRolename

        public void setRolename​(String rolename)
        Set the role name of this role, which must be unique within the scope of a UserDatabase.
        Specified by:
        setRolename in interface Role
        Parameters:
        rolename - The new role name
      • getName

        public String getName()
        Make the principal name the same as the role name.
        Specified by:
        getName in interface Principal