|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface Permission<D>
An interface to be implemented by permission voters. This interface is implicitly implemented by enum classes.
Nested Class Summary | |
---|---|
static class |
Permission.Vote
|
Field Summary | |
---|---|
static Permission<Object> |
DENY_ALL
A special kind of permission which always denys any action. |
static Permission<Object> |
GRANT_ALL
A special kind of permission which always grants any action. |
Method Summary | |
---|---|
boolean |
pertainsTo(Class<? extends Intent> intentClass)
Return whether this permission pertains to the given action. |
Permission.Vote |
vote(D domain,
Intent intent)
Make a permission decision about the given intended action on the given domain object. |
Field Detail |
---|
static final Permission<Object> GRANT_ALL
static final Permission<Object> DENY_ALL
Method Detail |
---|
boolean pertainsTo(Class<? extends Intent> intentClass)
true
, this permission will be asked to make decisions about actions if the given
class.
Note to implementors: the vote(Object, Intent)
method is guaranteed to never be called
for actions of classes for which this method has returned false. You may therefore skip
instanceof
checks in the vote(Object, Intent)
method, if you do them
here.
intentClass
-
true
if this method pertains to actions of the given class,
false
otherwisePermission.Vote vote(D domain, Intent intent)
intent
-
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |