Class AnnotationPermissions
java.lang.Object
com.levigo.jadice.annotation.auth.web.AnnotationPermissions
Helper class for annotation permission checks. Can be used on the client and on the server side.
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionstatic booleanisAddAllowed(Document document) Determines if annotations are allowed to be added to a document.static booleanisChangeAllowed(Annotation annotation) Determines if the given annotation may be changed.Only individual annotation permissions are taken into account.static booleanisChangeAllowed(Document document, Annotation... annotations) Determines if the given annotations may be changed on the given document.static booleanisRemoveAllowed(Annotation annotation) Determines if the annotations may be removed from a document.static booleanisRemoveAllowed(Document document, Annotation... annotations) Determines if the given annotations may be removed from the given document.static booleanisShowAllowed(Annotation annotation) Determines if the annotations have sufficient permissions to be shown in a viewer.static booleanisShowAllowed(Document document, Annotation... annotations) Determines if the given annotations are allowed to be shown in a viewer or a printout.
- 
Constructor Details- 
AnnotationPermissionspublic AnnotationPermissions()
 
- 
- 
Method Details- 
isChangeAllowedDetermines if the given annotations may be changed on the given document. Document and individual annotation permissions are taken into account.- Parameters:
- document- the- Documentin which the annotations reside
- annotations- a set of- Annotationobjects belonging to the document
- Returns:
- true if is it allowed to change the given annotations of the given document
 
- 
isChangeAllowedDetermines if the given annotation may be changed.Only individual annotation permissions are taken into account.- Parameters:
- annotation- an- Annotationobject
- Returns:
- true if it is allowed to change the annotation
 
- 
isRemoveAllowedDetermines if the given annotations may be removed from the given document. Document and individual annotation permissions are taken into account.- Parameters:
- document- the- Documentin which the annotations reside
- annotations- a set of- Annotationobjects belonging to the document
- Returns:
- true if it is allowed to remove the annotations from the given document
 
- 
isRemoveAllowedDetermines if the annotations may be removed from a document. Only individual annotation permissions are taken into account.- Parameters:
- annotation- an- Annotationobject
- Returns:
- true if it is allowed to remove the given annotations from a document
 
- 
isShowAllowedDetermines if the given annotations are allowed to be shown in a viewer or a printout. Document and individual annotation permissions are taken into account.- Parameters:
- document- the- Documentin which the annotations reside
- annotations- a set of- Annotationobjects belonging to the document
- Returns:
- true if it is allowed to show the annotations of the given document in a viewer
 
- 
isShowAllowedDetermines if the annotations have sufficient permissions to be shown in a viewer. Only individual annotation permissions are taken into account.- Parameters:
- annotation- an- Annotationobject
- Returns:
- true if it is allowed to show the annotations in a viewer
 
- 
isAddAllowedDetermines if annotations are allowed to be added to a document.- Parameters:
- document- the- Documentto add the annotations to
- Returns:
- true if it is allowed to add annotations to the given document
 
 
-