Class LdapPrincipal

  • All Implemented Interfaces:
    java.io.Serializable, java.lang.Comparable<java.security.Principal>, java.security.Principal

    public class LdapPrincipal
    extends java.lang.Object
    implements java.security.Principal, java.io.Serializable, java.lang.Comparable<java.security.Principal>
    LdapPrincipal provides a custom implementation for adding LDAP principals to a Subject.
    Version:
    $Revision: 1330 $ $Date: 2010-05-24 00:10:53 +0200 (Mon, 24 May 2010) $
    Author:
    Middleware Services
    See Also:
    Serialized Form
    • Field Summary

      Fields 
      Modifier and Type Field Description
      protected static int HASH_CODE_SEED
      hash code seed.
    • Constructor Summary

      Constructors 
      Constructor Description
      LdapPrincipal​(java.lang.String name)
      This creates a new LdapPrincipal with the supplied name.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      int compareTo​(java.security.Principal p)
      This compares the supplied object for order.
      boolean equals​(java.lang.Object o)
      This returns the supplied Object is equal to this LdapPrincipal.
      LdapAttributes getLdapAttributes()
      This returns the ldap attributes for this LdapPrincipal.
      java.lang.String getName()
      This returns the name for this LdapPrincipal.
      int hashCode()
      This returns the hash code for this LdapPrincipal.
      java.lang.String toString()
      This returns a String representation of this LdapPrincipal.
      • Methods inherited from class java.lang.Object

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

        implies
    • Field Detail

      • HASH_CODE_SEED

        protected static final int HASH_CODE_SEED
        hash code seed.
        See Also:
        Constant Field Values
    • Constructor Detail

      • LdapPrincipal

        public LdapPrincipal​(java.lang.String name)
        This creates a new LdapPrincipal with the supplied name.
        Parameters:
        name - String
    • Method Detail

      • getName

        public java.lang.String getName()
        This returns the name for this LdapPrincipal.
        Specified by:
        getName in interface java.security.Principal
        Returns:
        String
      • getLdapAttributes

        public LdapAttributes getLdapAttributes()
        This returns the ldap attributes for this LdapPrincipal.
        Returns:
        LdapAttributes
      • equals

        public boolean equals​(java.lang.Object o)
        This returns the supplied Object is equal to this LdapPrincipal.
        Specified by:
        equals in interface java.security.Principal
        Overrides:
        equals in class java.lang.Object
        Parameters:
        o - Object
        Returns:
        boolean
      • hashCode

        public int hashCode()
        This returns the hash code for this LdapPrincipal.
        Specified by:
        hashCode in interface java.security.Principal
        Overrides:
        hashCode in class java.lang.Object
        Returns:
        int
      • toString

        public java.lang.String toString()
        This returns a String representation of this LdapPrincipal.
        Specified by:
        toString in interface java.security.Principal
        Overrides:
        toString in class java.lang.Object
        Returns:
        String
      • compareTo

        public int compareTo​(java.security.Principal p)
        This compares the supplied object for order. LdapPrincipal is always less than any other object. Otherwise principals are compared lexicographically on name.
        Specified by:
        compareTo in interface java.lang.Comparable<java.security.Principal>
        Parameters:
        p - Principal
        Returns:
        int