edu.vt.middleware.ldap.jaas
Class LdapDnPrincipal

java.lang.Object
  extended by edu.vt.middleware.ldap.jaas.LdapDnPrincipal
All Implemented Interfaces:
Serializable, Comparable<Principal>, Principal

public class LdapDnPrincipal
extends Object
implements Principal, Serializable, Comparable<Principal>

LdapPrincipal provides a custom implementation for adding LDAP principals to a Subject.

Version:
$Revision: 1330 $ $Date: 2010-05-23 18:10:53 -0400 (Sun, 23 May 2010) $
Author:
Middleware Services
See Also:
Serialized Form

Field Summary
protected static int HASH_CODE_SEED
          hash code seed.
 
Constructor Summary
LdapDnPrincipal(String name)
          This creates a new LdapPrincipal with the supplied name.
 
Method Summary
 int compareTo(Principal p)
          This compares the supplied object for order.
 boolean equals(Object o)
          This returns the supplied Object is equal to this LdapPrincipal.
 LdapAttributes getLdapAttributes()
          This returns the ldap attributes for this LdapPrincipal.
 String getName()
          This returns the name for this LdapPrincipal.
 int hashCode()
          This returns the hash code for this LdapPrincipal.
 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
 

Field Detail

HASH_CODE_SEED

protected static final int HASH_CODE_SEED
hash code seed.

See Also:
Constant Field Values
Constructor Detail

LdapDnPrincipal

public LdapDnPrincipal(String name)
This creates a new LdapPrincipal with the supplied name.

Parameters:
name - String
Method Detail

getName

public String getName()
This returns the name for this LdapPrincipal.

Specified by:
getName in interface Principal
Returns:
String

getLdapAttributes

public LdapAttributes getLdapAttributes()
This returns the ldap attributes for this LdapPrincipal.

Returns:
LdapAttributes

equals

public boolean equals(Object o)
This returns the supplied Object is equal to this LdapPrincipal.

Specified by:
equals in interface Principal
Overrides:
equals in class Object
Parameters:
o - Object
Returns:
boolean

hashCode

public int hashCode()
This returns the hash code for this LdapPrincipal.

Specified by:
hashCode in interface Principal
Overrides:
hashCode in class Object
Returns:
int

toString

public String toString()
This returns a String representation of this LdapPrincipal.

Specified by:
toString in interface Principal
Overrides:
toString in class Object
Returns:
String

compareTo

public int compareTo(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 Comparable<Principal>
Parameters:
p - Principal
Returns:
int


Copyright © 2003-2010 Virginia Tech. All Rights Reserved.