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>LdapRoleprovides a custom implementation for adding LDAP principals to aSubjectthat 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 newLdapRolewith 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 thisLdapRole.java.lang.StringgetName()This returns the name for thisLdapRole.inthashCode()This returns the hash code for thisLdapRole.java.lang.StringtoString()This returns a String representation of thisLdapRole.
-
-
-
Method Detail
-
getName
public java.lang.String getName()
This returns the name for thisLdapRole.- Specified by:
getNamein interfacejava.security.Principal- Returns:
String
-
equals
public boolean equals(java.lang.Object o)
This returns the supplied Object is equal to thisLdapRole.- 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 thisLdapRole.- 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 thisLdapRole.- 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.LdapRoleis always greater 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
-
-