Class IndividualAnnotationPermission
java.lang.Object
com.levigo.jadice.annotation.auth.web.IndividualAnnotationPermission
- All Implemented Interfaces:
Permission<Annotation>,Serializable
public final class IndividualAnnotationPermission
extends Object
implements Permission<Annotation>, Serializable
This class is a web technology adaption of the jadice document platform version. The original can
be found in
IndividualAnnotationPermission. When using
jadice web toolkit, it is expected to use this implementation on the client at all times.
The default behavior is the following: on the server side, document platform permissions are
automatically transformed into a json object when sending data to the client. On the
opposite way, i.e. sending a message from client side to be later prcessed by a MessageListener,
the json-serialized permissions are transformed again into corresponding document platform
versions.
Whenever it is necessary to set permissions on the server side (e.g. inside a
DocumentDataProvider implementation or in the server side
code of an update, triggered by the client), the original document platform
permission implementation
IndividualAnnotationPermission must be used.
- See Also:
-
Nested Class Summary
Nested ClassesNested classes/interfaces inherited from interface com.levigo.jadice.document.Permission
Permission.Vote -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final IndividualAnnotationPermission.Factorystatic final IndividualAnnotationPermission.FactoryFields inherited from interface com.levigo.jadice.document.Permission
DENY_ALL, GRANT_ALL -
Constructor Summary
ConstructorsConstructorDescriptionIndividualAnnotationPermission(Class<? extends Intent> intentClass, Permission.Vote vote) -
Method Summary
Modifier and TypeMethodDescriptionbooleaninthashCode()booleanpertainsTo(Class<? extends Intent> intentClass) Return whether this permission pertains to the given action.toString()vote(Annotation domain, Intent intent) Make a permission decision about the given intended action on the given domain object.
-
Field Details
-
ALLOW
-
DENY
-
-
Constructor Details
-
IndividualAnnotationPermission
-
-
Method Details
-
equals
-
hashCode
public int hashCode() -
pertainsTo
Description copied from interface:PermissionReturn 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 skipinstanceofchecks in thePermission.vote(Object, Intent)method, if you do them here.- Specified by:
pertainsToin interfacePermission<Annotation>- Parameters:
intentClass-- Returns:
trueif this method pertains to actions of the given class,falseotherwise
-
vote
Description copied from interface:PermissionMake a permission decision about the given intended action on the given domain object.- Specified by:
votein interfacePermission<Annotation>- Parameters:
intent-- Returns:
- the decision
-
toString
-