com.levigo.jadice.annotation.auth
Class IndividualAnnotationPermission

java.lang.Object
  extended by com.levigo.jadice.annotation.auth.IndividualAnnotationPermission
All Implemented Interfaces:
Permission<Annotation>
Direct Known Subclasses:
IndividualAnnotationPermission.Factory.AbstractPerm

public abstract class IndividualAnnotationPermission
extends Object
implements Permission<Annotation>

An annotation permission object to be used to define individual annotation permissions. This class contains several predefined permissions which can be used to generate a suitable permission set. As an example take a look at the following code. Assume you would like to define a permission that the removal of a individual annotation instance should be denied.
At -1- you can use this class to get a predefined annotation permission. For a deny permission use the static constant DENY, otherwise use ALLOW. Then use one of the predefined permissions, in this case the REMOVE_ANNOTATION permission.
At -2- you see an example how to apply the permission to a single annotation instance. Doing so denies the removal of this specific annotation, other annotations are not touched be this permission.

   // -1-
    final IndividualAnnotationPermission<Object> re = IndividualAnnotationPermission.DENY.REMOVE;

    // -2-
    final Annotation annotation= ...;
    annotation.getPermissions().getPermissions().add(re);


Nested Class Summary
static class IndividualAnnotationPermission.Factory
           
 
Nested classes/interfaces inherited from interface com.levigo.jadice.document.Permission
Permission.Vote
 
Field Summary
static IndividualAnnotationPermission.Factory ALLOW
           
static IndividualAnnotationPermission.Factory DENY
           
 
Fields inherited from interface com.levigo.jadice.document.Permission
DENY_ALL, GRANT_ALL
 
Constructor Summary
IndividualAnnotationPermission()
           
 
Method Summary
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface com.levigo.jadice.document.Permission
pertainsTo, vote
 

Field Detail

ALLOW

public static final IndividualAnnotationPermission.Factory ALLOW

DENY

public static final IndividualAnnotationPermission.Factory DENY
Constructor Detail

IndividualAnnotationPermission

public IndividualAnnotationPermission()


Copyright © 1995-2020 levigo holding gmbh. All Rights Reserved.