public interface Permission<D>
Modifier and Type | Interface and Description |
---|---|
static class |
Permission.Vote |
Modifier and Type | Field and Description |
---|---|
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.
|
Modifier and Type | Method and Description |
---|---|
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.
|
static final Permission<Object> GRANT_ALL
static final Permission<Object> DENY_ALL
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.true
if this method pertains to actions of the given class,
false
otherwisePermission.Vote vote(D domain, Intent intent)
Copyright © 2024 levigo holding gmbh. All rights reserved.