net.sf.sail.webapp.domain.authentication
Interface MutableAclSid

All Superinterfaces:
Persistable, Serializable, org.springframework.security.acls.sid.Sid
All Known Implementing Classes:
PersistentAclSid

public interface MutableAclSid
extends org.springframework.security.acls.sid.Sid, Persistable

Mutable extension of the Sid (security id) interface. This interface supports both principal and granted authority based Sid in a single interface. There is no need for separate implementations.

Version:
$Id$
Author:
Cynick Young
See Also:
org.acegisecurity.acls.sid.Sid

Method Summary
 String getGrantedAuthority()
          Gets the Sid as a String if this instance has been created using a granted authority.
 String getPrincipal()
          Gets the Sid as a String if this instance has been created using a principal.
 Boolean isPrincipal()
          Tests whether this instance of Sid was created as a principal.
 void setGrantedAuthority(org.springframework.security.GrantedAuthority grantedAuthority)
          Sets the Sid using a GrantedAuthority.
 void setPrincipal(org.springframework.security.Authentication authentication)
          Sets the Sid using an Authentication principal.
 
Methods inherited from interface org.springframework.security.acls.sid.Sid
equals, hashCode
 
Methods inherited from interface net.sf.sail.webapp.domain.Persistable
getId
 

Method Detail

isPrincipal

Boolean isPrincipal()
Tests whether this instance of Sid was created as a principal.

Returns:
true if this instance of Sid has been created using a principal, false if this has been created using a granted authority, and null if this instance has not been initialized properly.

getPrincipal

String getPrincipal()
Gets the Sid as a String if this instance has been created using a principal.

Returns:
the principal
Throws:
UnsupportedOperationException - if this instance of Sid is not a principal

setPrincipal

void setPrincipal(org.springframework.security.Authentication authentication)
Sets the Sid using an Authentication principal.

Parameters:
authentication - to set

setGrantedAuthority

void setGrantedAuthority(org.springframework.security.GrantedAuthority grantedAuthority)
Sets the Sid using a GrantedAuthority.

Parameters:
grantedAuthority - to set

getGrantedAuthority

String getGrantedAuthority()
Gets the Sid as a String if this instance has been created using a granted authority.

Returns:
the granted authority
Throws:
UnsupportedOperationException - if this instance of Sid is not a granted authority


Copyright © 2012. All Rights Reserved.