Class UnconditionalPermission
java.lang.Object
com.levigo.jadice.document.auth.web.UnconditionalPermission
- All Implemented Interfaces:
Permission<Object>
A Permission implementation with a fixed Vote which pertains to any and all Intents. Attention: this class is a client-side adaption of the jadice document platform version. While using the jadice web toolkit, it is expected to use this version on the client at all times.
The default behavior is the following: on the server side, document platform permissions are automatically transformed into GWT-compatible permissions when sending data to the client. On the opposite way, i.e. sending a JSON-serialized version from client to server, the JSON-serialized permissions are transformed again into corresponding document platform versions.
-
Nested Class Summary
Nested classes/interfaces inherited from interface com.levigo.jadice.document.Permission
Permission.Vote
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic Permission
<Object> A special kind of permission which always denys any action.static Permission
<Object> A special kind of permission which always grants any action. -
Method Summary
Modifier and TypeMethodDescriptionboolean
int
hashCode()
boolean
pertainsTo
(Class<? extends Intent> intentClass) Return whether this permission pertains to the given action.toString()
Make a permission decision about the given intended action on the given domain object.
-
Field Details
-
GRANT_ALL
A special kind of permission which always grants any action. -
DENY_ALL
A special kind of permission which always denys any action.
-
-
Method Details
-
equals
-
hashCode
public int hashCode() -
vote
Description copied from interface:Permission
Make a permission decision about the given intended action on the given domain object.- Specified by:
vote
in interfacePermission<Object>
- Parameters:
intent
-- Returns:
- the decision
-
pertainsTo
Description copied from interface:Permission
Return whether this permission pertains to the given action. If this method returnstrue
, this permission will be asked to make decisions about actions if the given class. Note to implementors: thePermission.vote(Object, Intent)
method is guaranteed to never be called for actions of classes for which this method has returned false. You may therefore skipinstanceof
checks in thePermission.vote(Object, Intent)
method, if you do them here.- Specified by:
pertainsTo
in interfacePermission<Object>
- Parameters:
intentClass
-- Returns:
true
if this method pertains to actions of the given class,false
otherwise
-
toString
-