Package edu.vt.middleware.ldap.jaas
Class LdapPrincipal
- java.lang.Object
-
- edu.vt.middleware.ldap.jaas.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>LdapPrincipalprovides a custom implementation for adding LDAP principals to aSubject.- 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 intHASH_CODE_SEEDhash code seed.
-
Constructor Summary
Constructors Constructor Description LdapPrincipal(java.lang.String name)This creates a newLdapPrincipalwith the supplied name.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description intcompareTo(java.security.Principal p)This compares the supplied object for order.booleanequals(java.lang.Object o)This returns the supplied Object is equal to thisLdapPrincipal.LdapAttributesgetLdapAttributes()This returns the ldap attributes for thisLdapPrincipal.java.lang.StringgetName()This returns the name for thisLdapPrincipal.inthashCode()This returns the hash code for thisLdapPrincipal.java.lang.StringtoString()This returns a String representation of thisLdapPrincipal.
-
-
-
Field Detail
-
HASH_CODE_SEED
protected static final int HASH_CODE_SEED
hash code seed.- See Also:
- Constant Field Values
-
-
Method Detail
-
getName
public java.lang.String getName()
This returns the name for thisLdapPrincipal.- Specified by:
getNamein interfacejava.security.Principal- Returns:
String
-
getLdapAttributes
public LdapAttributes getLdapAttributes()
This returns the ldap attributes for thisLdapPrincipal.- Returns:
LdapAttributes
-
equals
public boolean equals(java.lang.Object o)
This returns the supplied Object is equal to thisLdapPrincipal.- Specified by:
equalsin interfacejava.security.Principal- Overrides:
equalsin classjava.lang.Object- Parameters:
o-Object- Returns:
boolean
-
hashCode
public int hashCode()
This returns the hash code for thisLdapPrincipal.- Specified by:
hashCodein interfacejava.security.Principal- Overrides:
hashCodein classjava.lang.Object- Returns:
int
-
toString
public java.lang.String toString()
This returns a String representation of thisLdapPrincipal.- Specified by:
toStringin interfacejava.security.Principal- Overrides:
toStringin classjava.lang.Object- Returns:
String
-
compareTo
public int compareTo(java.security.Principal p)
This compares the supplied object for order.LdapPrincipalis always less than any other object. Otherwise principals are compared lexicographically on name.- Specified by:
compareToin interfacejava.lang.Comparable<java.security.Principal>- Parameters:
p-Principal- Returns:
int
-
-