Class UnresolvedPrincipal

  • All Implemented Interfaces:
    java.io.Serializable, java.security.Principal

    public final class UnresolvedPrincipal
    extends java.lang.Object
    implements java.security.Principal, java.io.Serializable
    Represents a Principal, typically read from an ACL, that cannot be resolved based on the current state of the user database, group manager, and built-in role definitions. Creating a principal marked "unresolved" allows delayed resolution, which enables principals to be resolved lazily during a later access control check. Conceptuallly, UnresolvedPrincipal performs a function similar to UnresolvedPermission.
    Since:
    2.3
    See Also:
    Serialized Form
    • Constructor Summary

      Constructors 
      Constructor Description
      UnresolvedPrincipal​(java.lang.String name)
      Constructs a new UnresolvedPrincipal instance.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      boolean equals​(java.lang.Object obj)
      An unresolved principal is equal to another unresolved principal if their names match.
      java.lang.String getName()
      Returns the name of the principal.
      int hashCode()
      The hashCode of this object is equal to the hash code of its name.
      java.lang.String toString()
      Returns a String representation of the UnresolvedPrincipal.
      • Methods inherited from class java.lang.Object

        clone, finalize, getClass, notify, notifyAll, wait, wait, wait
      • Methods inherited from interface java.security.Principal

        implies
    • Constructor Detail

      • UnresolvedPrincipal

        public UnresolvedPrincipal​(java.lang.String name)
        Constructs a new UnresolvedPrincipal instance.
        Parameters:
        name - the name of the Principal
    • Method Detail

      • getName

        public java.lang.String getName()
        Returns the name of the principal.
        Specified by:
        getName in interface java.security.Principal
        Returns:
        the name
        See Also:
        Principal.getName()
      • toString

        public java.lang.String toString()
        Returns a String representation of the UnresolvedPrincipal.
        Specified by:
        toString in interface java.security.Principal
        Overrides:
        toString in class java.lang.Object
        Returns:
        the String
      • equals

        public boolean equals​(java.lang.Object obj)
        An unresolved principal is equal to another unresolved principal if their names match.
        Specified by:
        equals in interface java.security.Principal
        Overrides:
        equals in class java.lang.Object
        Parameters:
        obj - the object to compare to this one
        Returns:
        the result of the equality test
        See Also:
        Object.equals(java.lang.Object)
      • hashCode

        public int hashCode()
        The hashCode of this object is equal to the hash code of its name.
        Specified by:
        hashCode in interface java.security.Principal
        Overrides:
        hashCode in class java.lang.Object
        Returns:
        the hash code