Package edu.vt.middleware.ldap.jaas
Class LdapDnPrincipal
- java.lang.Object
-
- edu.vt.middleware.ldap.jaas.LdapDnPrincipal
-
- All Implemented Interfaces:
java.io.Serializable
,java.lang.Comparable<java.security.Principal>
,java.security.Principal
public class LdapDnPrincipal 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 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 int
HASH_CODE_SEED
hash code seed.
-
Constructor Summary
Constructors Constructor Description LdapDnPrincipal(java.lang.String name)
This creates a newLdapPrincipal
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 thisLdapPrincipal
.LdapAttributes
getLdapAttributes()
This returns the ldap attributes for thisLdapPrincipal
.java.lang.String
getName()
This returns the name for thisLdapPrincipal
.int
hashCode()
This returns the hash code for thisLdapPrincipal
.java.lang.String
toString()
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:
getName
in 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:
equals
in interfacejava.security.Principal
- Overrides:
equals
in classjava.lang.Object
- Parameters:
o
-Object
- Returns:
boolean
-
hashCode
public int hashCode()
This returns the hash code for thisLdapPrincipal
.- Specified by:
hashCode
in interfacejava.security.Principal
- Overrides:
hashCode
in classjava.lang.Object
- Returns:
int
-
toString
public java.lang.String toString()
This returns a String representation of thisLdapPrincipal
.- Specified by:
toString
in interfacejava.security.Principal
- Overrides:
toString
in classjava.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 interfacejava.lang.Comparable<java.security.Principal>
- Parameters:
p
-Principal
- Returns:
int
-
-