Spring Security Framework

org.springframework.security.acls.sid
Class PrincipalSid

java.lang.Object
  extended by org.springframework.security.acls.sid.PrincipalSid
All Implemented Interfaces:
Serializable, Sid

public class PrincipalSid
extends Object
implements Sid

Represents an Authentication.getPrincipal() as a Sid.

This is a basic implementation that simply uses the String-based principal for Sid comparison. More complex principal objects may wish to provide an alternative Sid implementation that uses some other identifier.

Version:
$Id$
Author:
Ben Alex
See Also:
Serialized Form

Constructor Summary
PrincipalSid(Authentication authentication)
           
PrincipalSid(String principal)
           
 
Method Summary
 boolean equals(Object object)
          Refer to the java.lang.Object documentation for the interface contract.
 String getPrincipal()
           
 int hashCode()
          Refer to the java.lang.Object documentation for the interface contract.
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

PrincipalSid

public PrincipalSid(String principal)

PrincipalSid

public PrincipalSid(Authentication authentication)
Method Detail

equals

public boolean equals(Object object)
Description copied from interface: Sid
Refer to the java.lang.Object documentation for the interface contract.

Specified by:
equals in interface Sid
Overrides:
equals in class Object
Parameters:
object - to be compared
Returns:
true if the objects are equal, false otherwise

hashCode

public int hashCode()
Description copied from interface: Sid
Refer to the java.lang.Object documentation for the interface contract.

Specified by:
hashCode in interface Sid
Overrides:
hashCode in class Object
Returns:
a hash code representation of this object

getPrincipal

public String getPrincipal()

toString

public String toString()
Overrides:
toString in class Object

Spring Security Framework

Copyright © 2004-2010 SpringSource, Inc. All Rights Reserved.