Class LdapRole

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

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

      Constructors 
      Constructor Description
      LdapRole​(java.lang.String name)
      This creates a new LdapRole 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 LdapRole.
      java.lang.String getName()
      This returns the name for this LdapRole.
      int hashCode()
      This returns the hash code for this LdapRole.
      java.lang.String toString()
      This returns a String representation of this LdapRole.
      • 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

      • LdapRole

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

      • getName

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

        public boolean equals​(java.lang.Object o)
        This returns the supplied Object is equal to this LdapRole.
        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 LdapRole.
        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 LdapRole.
        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. LdapRole is always greater 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