net.codescore.security
Class CSUserPrincipal

java.lang.Object
  extended by net.codescore.security.CSUserPrincipal
All Implemented Interfaces:
Serializable, Principal

public class CSUserPrincipal
extends Object
implements Principal, Serializable

This class implements the Principal interface

Principals such as this CCTUserPrincipal may be associated with a particular Subject to augment that Subject with an additional identity. Refer to the Subject class for more information on how to achieve this. Authorization decisions can then be based upon the Principals associated with a Subject.

See Also:
Principal, Subject, Serialized Form

Field Summary
private  org.apache.commons.logging.Log log
           
private  String name
           
 
Constructor Summary
CSUserPrincipal(String name)
           
 
Method Summary
 boolean equals(Object o)
           
 String getName()
           
 ArrayList<CSRolePrincipal> getRoles(ObjectContext oc)
           
 int hashCode()
           
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

name

private final String name

log

private org.apache.commons.logging.Log log
Constructor Detail

CSUserPrincipal

public CSUserPrincipal(String name)
Parameters:
name -
Throws:
NullPointerException - if the name is null.
Method Detail

equals

public boolean equals(Object o)
Specified by:
equals in interface Principal
Overrides:
equals in class Object

getName

public String getName()
Specified by:
getName in interface Principal

getRoles

public ArrayList<CSRolePrincipal> getRoles(ObjectContext oc)

hashCode

public int hashCode()
Specified by:
hashCode in interface Principal
Overrides:
hashCode in class Object

toString

public String toString()
Specified by:
toString in interface Principal
Overrides:
toString in class Object


Copyright 2008 © Adam Cornett, Andrew Conner All Rights Reserved.