edu.vt.middleware.ldap.jaas
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
.Modifier and Type | Field and Description |
---|---|
protected static int |
HASH_CODE_SEED
hash code seed.
|
Constructor and Description |
---|
LdapPrincipal(java.lang.String name)
This creates a new
LdapPrincipal with the supplied name. |
Modifier and Type | Method and 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 . |
protected static final int HASH_CODE_SEED
public LdapPrincipal(java.lang.String name)
LdapPrincipal
with the supplied name.name
- String
public java.lang.String getName()
LdapPrincipal
.getName
in interface java.security.Principal
String
public LdapAttributes getLdapAttributes()
LdapPrincipal
.LdapAttributes
public boolean equals(java.lang.Object o)
LdapPrincipal
.equals
in interface java.security.Principal
equals
in class java.lang.Object
o
- Object
boolean
public int hashCode()
LdapPrincipal
.hashCode
in interface java.security.Principal
hashCode
in class java.lang.Object
int
public java.lang.String toString()
LdapPrincipal
.toString
in interface java.security.Principal
toString
in class java.lang.Object
String
public int compareTo(java.security.Principal p)
LdapPrincipal
is
always less than any other object. Otherwise principals are compared
lexicographically on name.compareTo
in interface java.lang.Comparable<java.security.Principal>
p
- Principal
int
Copyright © 2014. All Rights Reserved.