|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.entityfs.AbstractAccessController
org.entityfs.DisabledAccessController
public final class DisabledAccessController
The DisabledAccessController
is used to disable access controls
altogether in a file system.
Instances of this class do not have any internal state. Use the singleton
instance INSTANCE
instead of instantiating the class.
Field Summary | |
---|---|
static DisabledAccessController |
INSTANCE
Singleton instance. |
Method Summary | |
---|---|
void |
checkPermission(Permission p)
Verify that the current Subject is authorized for the permission. |
boolean |
hasPermission(Permission p)
Does the current Subject have the permission? It is up to the
access controller implementation to know how to find the current subject. |
boolean |
isEnabled()
Check if the AccessController is enabled. |
Methods inherited from class org.entityfs.AbstractAccessController |
---|
getLockCommandsForAccessControl, getSubject, setSubject |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final DisabledAccessController INSTANCE
Method Detail |
---|
public boolean isEnabled()
AccessController
AccessController
is enabled. A disabled access
controller grants all access requests.
false
, always.public boolean hasPermission(Permission p)
AccessController
Subject
have the permission? It is up to the
access controller implementation to know how to find the current subject.
Most implementations will use some kind of ThreadLocal
to store
the subject.
The AccessController.checkPermission(Permission)
method performs the same checks
as this method, but throws an AccessDeniedException
if the
subject does not have the requested permission.
p
- The permission. When EntityFS methods are calling this method,
this is always an EntityPermission
.
true
if the subject has the permission, false
if
not.AccessController.checkPermission(Permission)
public void checkPermission(Permission p)
AccessController
Subject
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 AccessController
checkPermission
in class AbstractAccessController
p
- The permission. When EntityFS methods are calling this method,
this is always an EntityPermission
.AccessController.hasPermission(Permission)
,
AccessController.getLockCommandsForAccessControl(Entity)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |