Class Role

  • All Implemented Interfaces:
    Serializable, Principal

    public class Role
    extends PrincipalImpl
    In EJBs, ACL checking is done using the Roles. Roles are an abstraction of an application specific Logical Principals. These Principals do not have any properties of Principals within a Security Domain (or Realm). They merely serve as abstraction to application specific entities.
    Author:
    Harish Prabandham
    See Also:
    Serialized Form
    • Constructor Detail

      • Role

        public Role​(String name)
        Creates a new Role with a given name
    • Method Detail

      • equals

        public boolean equals​(Object other)
        Description copied from class: PrincipalImpl
        This function returns true if the object passed matches the principal represented in this implementation
        Specified by:
        equals in interface Principal
        Overrides:
        equals in class PrincipalImpl
        Parameters:
        other - the Principal to compare with.
        Returns:
        true if the Principal passed is the same as that encapsulated in this object, false otherwise
      • hashCode

        public int hashCode()
        Description copied from class: PrincipalImpl
        Returns the hashcode for this Principal object
        Specified by:
        hashCode in interface Principal
        Overrides:
        hashCode in class PrincipalImpl
        Returns:
        a hashcode for the principal.
      • getDescription

        public String getDescription()
      • setDescription

        public void setDescription​(String description)