org.jasig.cas.authentication.principal
Class SimplePrincipal

java.lang.Object
  extended by org.jasig.cas.authentication.principal.SimplePrincipal
All Implemented Interfaces:
Serializable, Principal

public class SimplePrincipal
extends Object
implements Principal

Simple implementation of a AttributePrincipal that exposes an unmodifiable map of attributes.

Since:
3.1
Version:
$Revision: 1.3 $ $Date: 2007/04/19 20:13:01 $
Author:
Scott Battaglia
See Also:
Serialized Form

Constructor Summary
SimplePrincipal(String id)
           
SimplePrincipal(String id, Map<String,Object> attributes)
           
 
Method Summary
 boolean equals(Object o)
           
 Map<String,Object> getAttributes()
          Returns an immutable map.
 String getId()
          Returns the unique id for the Principal
 int hashCode()
           
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

SimplePrincipal

public SimplePrincipal(String id)

SimplePrincipal

public SimplePrincipal(String id,
                       Map<String,Object> attributes)
Method Detail

getAttributes

public Map<String,Object> getAttributes()
Returns an immutable map.

Specified by:
getAttributes in interface Principal
Returns:

toString

public String toString()
Overrides:
toString in class Object

hashCode

public int hashCode()
Overrides:
hashCode in class Object

getId

public final String getId()
Description copied from interface: Principal
Returns the unique id for the Principal

Specified by:
getId in interface Principal
Returns:
the unique id for the Principal.

equals

public boolean equals(Object o)
Overrides:
equals in class Object


Copyright © 2004-2013 Jasig. All Rights Reserved.