Class PrincipalSid
- java.lang.Object
-
- org.springframework.security.acls.domain.PrincipalSid
-
- All Implemented Interfaces:
java.io.Serializable
,Sid
public class PrincipalSid extends java.lang.Object implements Sid
Represents anAuthentication.getPrincipal()
as aSid
.This is a basic implementation that simply uses the
String
-based principal forSid
comparison. More complex principal objects may wish to provide an alternativeSid
implementation that uses some other identifier.- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description PrincipalSid(java.lang.String principal)
PrincipalSid(Authentication authentication)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
equals(java.lang.Object object)
Refer to thejava.lang.Object
documentation for the interface contract.java.lang.String
getPrincipal()
int
hashCode()
Refer to thejava.lang.Object
documentation for the interface contract.java.lang.String
toString()
-
-
-
Constructor Detail
-
PrincipalSid
public PrincipalSid(java.lang.String principal)
-
PrincipalSid
public PrincipalSid(Authentication authentication)
-
-
Method Detail
-
equals
public boolean equals(java.lang.Object object)
Description copied from interface:Sid
Refer to thejava.lang.Object
documentation for the interface contract.
-
hashCode
public int hashCode()
Description copied from interface:Sid
Refer to thejava.lang.Object
documentation for the interface contract.
-
getPrincipal
public java.lang.String getPrincipal()
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
-