|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.entityfs.AbstractAccessController
public abstract class AbstractAccessController
Abstract base class for AccessController implementations. It stores a
thread's subject as an InheritableThreadLocal.
| Constructor Summary | |
|---|---|
AbstractAccessController()
|
|
| Method Summary | |
|---|---|
void |
checkPermission(Permission p)
Verify that the current Subject is authorized for the permission. |
Collection<? extends LockCommand> |
getLockCommandsForAccessControl(Entity ev)
Get the collection of lock commands that have to be executed in order to get all required locks for performing an access control on the supplied entity. |
Subject |
getSubject()
Get the Subject for the current thread. |
void |
setSubject(Subject s)
Set the subject for the current thread. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface org.entityfs.security.AccessController |
|---|
hasPermission, isEnabled |
| Constructor Detail |
|---|
public AbstractAccessController()
| Method Detail |
|---|
public void setSubject(Subject s)
AccessControllerSubject.doAs(java.security.PrivilegedAction) or
Subject.doAs(java.security.PrivilegedExceptionAction) methods
instead.
setSubject in interface AccessControllers - The new subject for the current thread. May be null.public Subject getSubject()
AccessControllerSubject for the current thread.
getSubject in interface AccessControllerSubject, or null if the current thread does
not have a Subject set.public void checkPermission(Permission p)
AccessControllerSubject is authorized for the permission.
The AccessController.hasPermission(Permission) method performs the same checks as
this method, but returns false instead of throwing an exception
if the subject does not have the requested permission.
checkPermission in interface AccessControllerp - The permission. When EntityFS methods are calling this method,
this is always an EntityPermission.AccessController.hasPermission(Permission),
AccessController.getLockCommandsForAccessControl(Entity)public Collection<? extends LockCommand> getLockCommandsForAccessControl(Entity ev)
AccessController
getLockCommandsForAccessControl in interface AccessControllerev - The entity to perform access controls on. The entity must be
in the file system that owns this AccessController.
nullAccessController.checkPermission(Permission)
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||