Class Principal

  • All Implemented Interfaces:
    java.security.Principal
    Direct Known Subclasses:
    ExternalRole, Role, User

    public class Principal
    extends java.lang.Object
    implements java.security.Principal
    This class represents a Principal entity, such as a Role or a User.
    • Constructor Summary

      Constructors 
      Constructor Description
      Principal()
      Constructs a new Principal.
      Principal​(java.lang.String name)
      Constructs a new Principal with the specified name.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      long getDBID()
      Retrieves the DBID of the Principal.
      java.lang.String getName()
      Retrieves the name of the Principal.
      java.lang.String getUUID()
      Retrieves the UUID of the Principal.
      java.lang.String toString()
      Returns a string representation of the Principal.
      boolean validate()
      Tests whether the object is valid or not.
      boolean verify​(java.lang.String name, java.lang.String uuid, long dbid)
      Tests whether the object is the same as specified
      • Methods inherited from class java.lang.Object

        equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
      • Methods inherited from interface java.security.Principal

        equals, hashCode, implies
    • Constructor Detail

      • Principal

        public Principal()
        Constructs a new Principal.
      • Principal

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

      • getName

        public java.lang.String getName()
        Retrieves the name of the Principal.
        Specified by:
        getName in interface java.security.Principal
        Returns:
        Principal name
      • getUUID

        public java.lang.String getUUID()
        Retrieves the UUID of the Principal.
        Returns:
        the UUID of the Principal
      • getDBID

        public long getDBID()
        Retrieves the DBID of the Principal.
        Returns:
        the DBID of the Principal
      • validate

        public boolean validate()
        Tests whether the object is valid or not.
        Returns:
        true if valid
      • verify

        public boolean verify​(java.lang.String name,
                              java.lang.String uuid,
                              long dbid)
        Tests whether the object is the same as specified
        Parameters:
        name - name of the Principal object
        uuid - UUID of the Principal object
        dbid - DBID of the Principal object
        Returns:
        true if same
      • toString

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