edu.vt.middleware.ldap.jaas
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.Constructor and Description |
---|
LdapRole(java.lang.String name)
This creates a new
LdapRole 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
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 . |
public LdapRole(java.lang.String name)
LdapRole
with the supplied name.name
- String
public java.lang.String getName()
LdapRole
.getName
in interface java.security.Principal
String
public boolean equals(java.lang.Object o)
LdapRole
.equals
in interface java.security.Principal
equals
in class java.lang.Object
o
- Object
boolean
public int hashCode()
LdapRole
.hashCode
in interface java.security.Principal
hashCode
in class java.lang.Object
int
public java.lang.String toString()
LdapRole
.toString
in interface java.security.Principal
toString
in class java.lang.Object
String
public int compareTo(java.security.Principal p)
LdapRole
is
always greater 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.