Package edu.vt.middleware.ldap.jaas
Class LdapRole
- java.lang.Object
-
- edu.vt.middleware.ldap.jaas.LdapRole
-
- All Implemented Interfaces:
java.io.Serializable
,java.lang.Comparable<java.security.Principal>
,java.security.Principal
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 aSubject
that represent roles.- Version:
- $Revision: 1330 $ $Date: 2010-05-24 00:10:53 +0200 (Mon, 24 May 2010) $
- Author:
- Middleware Services
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description LdapRole(java.lang.String name)
This creates a newLdapRole
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 thisLdapRole
.java.lang.String
getName()
This returns the name for thisLdapRole
.int
hashCode()
This returns the hash code for thisLdapRole
.java.lang.String
toString()
This returns a String representation of thisLdapRole
.
-
-
-
Method Detail
-
getName
public java.lang.String getName()
This returns the name for thisLdapRole
.- Specified by:
getName
in interfacejava.security.Principal
- Returns:
String
-
equals
public boolean equals(java.lang.Object o)
This returns the supplied Object is equal to thisLdapRole
.- 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 thisLdapRole
.- 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 thisLdapRole
.- 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.LdapRole
is always greater 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
-
-