net.sf.sail.webapp.domain.authentication.impl
Class PersistentAclSid

java.lang.Object
  extended by net.sf.sail.webapp.domain.authentication.impl.PersistentAclSid
All Implemented Interfaces:
Serializable, MutableAclSid, Persistable, org.springframework.security.acls.sid.Sid

public class PersistentAclSid
extends Object
implements MutableAclSid

Concrete implementation of MutableAclSid marked with EJB3 annotations for persistence.

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

Field Summary
static String COLUMN_NAME_SID
           
static String DATA_STORE_NAME
           
 
Constructor Summary
PersistentAclSid()
           
 
Method Summary
 boolean equals(Object obj)
           
 String getGrantedAuthority()
          Gets the Sid as a String if this instance has been created using a granted authority.
 Long getId()
          Primary identifier that is unique for each different object instance.
 String getPrincipal()
          Gets the Sid as a String if this instance has been created using a principal.
 int hashCode()
           
 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 class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

DATA_STORE_NAME

public static final String DATA_STORE_NAME
See Also:
Constant Field Values

COLUMN_NAME_SID

public static final String COLUMN_NAME_SID
See Also:
Constant Field Values
Constructor Detail

PersistentAclSid

public PersistentAclSid()
Method Detail

isPrincipal

public Boolean isPrincipal()
Description copied from interface: MutableAclSid
Tests whether this instance of Sid was created as a principal.

Specified by:
isPrincipal in interface MutableAclSid
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.
See Also:
MutableAclSid.isPrincipal()

getPrincipal

public String getPrincipal()
Description copied from interface: MutableAclSid
Gets the Sid as a String if this instance has been created using a principal.

Specified by:
getPrincipal in interface MutableAclSid
Returns:
the principal
See Also:
MutableAclSid.getPrincipal()

setPrincipal

public void setPrincipal(org.springframework.security.Authentication authentication)
Description copied from interface: MutableAclSid
Sets the Sid using an Authentication principal.

Specified by:
setPrincipal in interface MutableAclSid
Parameters:
authentication - to set
See Also:
net.sf.sail.webapp.domain.authentication.MutableAclSid#setPrincipal(org.acegisecurity.Authentication)

setGrantedAuthority

public void setGrantedAuthority(org.springframework.security.GrantedAuthority grantedAuthority)
Description copied from interface: MutableAclSid
Sets the Sid using a GrantedAuthority.

Specified by:
setGrantedAuthority in interface MutableAclSid
Parameters:
grantedAuthority - to set
See Also:
net.sf.sail.webapp.domain.authentication.MutableAclSid#setGrantedAuthority(org.acegisecurity.GrantedAuthority)

getGrantedAuthority

public String getGrantedAuthority()
Description copied from interface: MutableAclSid
Gets the Sid as a String if this instance has been created using a granted authority.

Specified by:
getGrantedAuthority in interface MutableAclSid
Returns:
the granted authority
See Also:
MutableAclSid.getGrantedAuthority()

getId

public Long getId()
Description copied from interface: Persistable
Primary identifier that is unique for each different object instance.

Specified by:
getId in interface Persistable
Returns:
Serializable ID
See Also:
Persistable.getId()

hashCode

public int hashCode()
Specified by:
hashCode in interface org.springframework.security.acls.sid.Sid
Overrides:
hashCode in class Object
See Also:
Object.hashCode()

equals

public boolean equals(Object obj)
Specified by:
equals in interface org.springframework.security.acls.sid.Sid
Overrides:
equals in class Object
See Also:
Object.equals(java.lang.Object)


Copyright © 2012. All Rights Reserved.