Documentation of 'org.apache.derby.authentication.SystemPrincipal' Java class
SystemPrincipal
org.apache.derby.authentication

Class SystemPrincipal

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


    public final class SystemPrincipal
    extends java.lang.Object
    implements java.security.Principal, java.io.Serializable
    This class represents Derby's notion of a principal, a concept of user identity with controlled access to Derby System Privileges. An authenticated user may have other identities which make sense in other code domains.

    Note that principal names do NOT follow Authorization Identifier rules. For instance, although edward and edWard both match the normalized authorization identifier EDWARD, the instances SystemPrincipal("edward") and SystemPrincipal("edWard") represent different principals under the methods getName(), equals(), and hashCode().

    According to JAASRefGuide, Principal classes must implement Serializable.

    See Also:
    Principal.getName(), JAASRefGuide on Principals, Serialized Form
    • Constructor Summary

      Constructors 
      Constructor and Description
      SystemPrincipal(java.lang.String name)
      Constructs a principal for a given name.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method and Description
      boolean equals(java.lang.Object other)
      Compares this principal to the specified object.
      java.lang.String getName()
      Returns the name of this principal.
      int hashCode()
      Returns a hashcode for this principal.
      java.lang.String toString()
      Returns a string representation of this principal.
      • Methods inherited from class java.lang.Object

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

        implies
    • Constructor Detail

      • SystemPrincipal

        public SystemPrincipal(java.lang.String name)
        Constructs a principal for a given name.
        Parameters:
        name - the name of the principal
        Throws:
        java.lang.NullPointerException - if name is null
        java.lang.IllegalArgumentException - if name is not a legal Principal name
    • Method Detail

      • equals

        public boolean equals(java.lang.Object other)
        Compares this principal to the specified object. Returns true if the object passed in matches the principal represented by the implementation of this interface.
        Specified by:
        equals in interface java.security.Principal
        Overrides:
        equals in class java.lang.Object
        Parameters:
        other - principal to compare with
        Returns:
        true if the principal passed in is the same as that encapsulated by this principal, and false otherwise
        See Also:
        Principal.equals(java.lang.Object)
      • getName

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

        public int hashCode()
        Returns a hashcode for this principal.
        Specified by:
        hashCode in interface java.security.Principal
        Overrides:
        hashCode in class java.lang.Object
        Returns:
        a hashcode for this principal
        See Also:
        Principal.hashCode()
      • toString

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

DataMelt 3.0 © DataMelt by jWork.ORG

You see the box below because you did not login.