edu.vt.middleware.ldap.jaas
Class LdapRole

java.lang.Object
  extended by edu.vt.middleware.ldap.jaas.LdapRole
All Implemented Interfaces:
Serializable, Comparable<Principal>, Principal

public class LdapRole
extends Object
implements Principal, Serializable, Comparable<Principal>

LdapRole provides a custom implementation for adding LDAP principals to a Subject that represent roles.

Version:
$Revision: 1330 $ $Date: 2010-05-23 18:10:53 -0400 (Sun, 23 May 2010) $
Author:
Middleware Services
See Also:
Serialized Form

Constructor Summary
LdapRole(String name)
          This creates a new LdapRole with the supplied name.
 
Method Summary
 int compareTo(Principal p)
          This compares the supplied object for order.
 boolean equals(Object o)
          This returns the supplied Object is equal to this LdapRole.
 String getName()
          This returns the name for this LdapRole.
 int hashCode()
          This returns the hash code for this LdapRole.
 String toString()
          This returns a String representation of this LdapRole.
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

LdapRole

public LdapRole(String name)
This creates a new LdapRole with the supplied name.

Parameters:
name - String
Method Detail

getName

public String getName()
This returns the name for this LdapRole.

Specified by:
getName in interface Principal
Returns:
String

equals

public boolean equals(Object o)
This returns the supplied Object is equal to this LdapRole.

Specified by:
equals in interface Principal
Overrides:
equals in class Object
Parameters:
o - Object
Returns:
boolean

hashCode

public int hashCode()
This returns the hash code for this LdapRole.

Specified by:
hashCode in interface Principal
Overrides:
hashCode in class Object
Returns:
int

toString

public String toString()
This returns a String representation of this LdapRole.

Specified by:
toString in interface Principal
Overrides:
toString in class Object
Returns:
String

compareTo

public int compareTo(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 interface Comparable<Principal>
Parameters:
p - Principal
Returns:
int


Copyright © 2003-2010 Virginia Tech. All Rights Reserved.