Class SimpleAuthorizationInfo

  • All Implemented Interfaces:
    AuthorizationInfo, java.io.Serializable

    public class SimpleAuthorizationInfo
    extends java.lang.Object
    implements AuthorizationInfo
    A simple implementation of the AuthorizationInfo interface that stores roles and permissions as internal attributes.
    Since:
    1.5.0
    See Also:
    Serialized Form
    • Constructor Summary

      Constructors 
      Constructor Description
      SimpleAuthorizationInfo()
      Default no-argument constructor.
      SimpleAuthorizationInfo​(java.util.Set<java.lang.String> roles)
      Creates a new instance with the specified roles and no permissions.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      boolean equals​(java.lang.Object o)  
      java.util.Set<java.lang.String> getRoles()
      Returns all assigned roles.
      int hashCode()  
      java.lang.String toString()  
      • Methods inherited from class java.lang.Object

        clone, finalize, getClass, notify, notifyAll, wait, wait, wait
    • Constructor Detail

      • SimpleAuthorizationInfo

        public SimpleAuthorizationInfo()
        Default no-argument constructor.
      • SimpleAuthorizationInfo

        public SimpleAuthorizationInfo​(java.util.Set<java.lang.String> roles)
        Creates a new instance with the specified roles and no permissions.
        Parameters:
        roles - the roles assigned to the realm account
    • Method Detail

      • getRoles

        public java.util.Set<java.lang.String> getRoles()
        Returns all assigned roles.
        Specified by:
        getRoles in interface AuthorizationInfo
        Returns:
        all assigned roles
      • equals

        public boolean equals​(java.lang.Object o)
        Overrides:
        equals in class java.lang.Object
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class java.lang.Object
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object