com.levigo.jadice.annotation.auth
Class DocumentAnnotationPermission
java.lang.Object
com.levigo.jadice.annotation.auth.DocumentAnnotationPermission
- All Implemented Interfaces:
- Permission<Document>
- Direct Known Subclasses:
- DocumentAnnotationPermission.Factory.AbstractPerm
public abstract class DocumentAnnotationPermission
- extends Object
- implements Permission<Document>
An annotation permission object to be used to define per document 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 annotations within a document 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 of how to apply the permission to a single
Document
instance. Doing so denies the removal of any annotation from this
Document
; other Document
s are not touched by this permission.
// -1-
final
DocumentAnnotationPermission<Object> re = DocumentAnnotationPermission.DENY.REMOVE;
// -2-
final Document document = ...;
document.getPermissions().getPermissions().add(re);
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ALLOW
public static final DocumentAnnotationPermission.Factory ALLOW
DENY
public static final DocumentAnnotationPermission.Factory DENY
DocumentAnnotationPermission
public DocumentAnnotationPermission()
Copyright © 1995-2020 levigo holding gmbh. All Rights Reserved.