public interface AnnotationService
Modifier and Type | Method and Description |
---|---|
Annotation |
createAnnotation(CoreSession session,
Annotation annotation)
Creates an annotation on a document.
|
void |
deleteAnnotation(CoreSession session,
String annotationId)
Deletes an annotation for a document.
|
void |
deleteExternalAnnotation(CoreSession session,
String entityId)
Deletes an external annotation.
|
Annotation |
getAnnotation(CoreSession session,
String annotationId)
Gets an annotation.
|
List<Annotation> |
getAnnotations(CoreSession session,
String documentId,
String xpath)
Gets all annotations for a document.
|
Annotation |
getExternalAnnotation(CoreSession session,
String entityId)
Gets an annotation generated by an external service.
|
void |
updateAnnotation(CoreSession session,
String annotationId,
Annotation annotation)
Updates an annotation for a document.
|
void |
updateExternalAnnotation(CoreSession session,
String entityId,
Annotation annotation)
Updates an external annotation.
|
Annotation createAnnotation(CoreSession session, Annotation annotation) throws CommentSecurityException
session
- the core sessionannotation
- the annotation to createCommentSecurityException
- if the current user does have the right permissions on the document to annotate.Annotation getAnnotation(CoreSession session, String annotationId) throws CommentNotFoundException, CommentSecurityException
session
- the core sessionannotationId
- the annotation document model idnull
if the annotation with the given id was not foundCommentNotFoundException
- if no annotation was found with the given idCommentSecurityException
- if the current user does have the right permissions on the annotated document.List<Annotation> getAnnotations(CoreSession session, String documentId, String xpath) throws CommentNotFoundException, CommentSecurityException
session
- the core sessiondocumentId
- the annotated document idxpath
- the annotated blob xpath in the documentCommentNotFoundException
- if no annotation was found with the given idCommentSecurityException
- if the current user does have the right permissions on the annotated document.void updateAnnotation(CoreSession session, String annotationId, Annotation annotation) throws CommentNotFoundException, CommentSecurityException
session
- the core sessionannotationId
- the annotation document model idannotation
- the annotation containing the modificationsCommentNotFoundException
- if no annotation was found with the given idCommentSecurityException
- if the current user does have the right permissions on the annotated document.void deleteAnnotation(CoreSession session, String annotationId) throws CommentNotFoundException, CommentSecurityException
session
- the core sessionannotationId
- the annotation document model idCommentNotFoundException
- if no annotation was found with the given idCommentSecurityException
- if the current user does have the right permissions on the annotated document.Annotation getExternalAnnotation(CoreSession session, String entityId) throws CommentNotFoundException, CommentSecurityException
session
- the core sessionentityId
- the annotation entity idCommentNotFoundException
- if no annotation was found with the given external entity idCommentSecurityException
- if the current user does have the right permissions on the annotated document.void updateExternalAnnotation(CoreSession session, String entityId, Annotation annotation) throws CommentNotFoundException, CommentSecurityException
session
- the core sessionentityId
- the annotation document model idannotation
- the annotation containing the modificationsCommentNotFoundException
- if no annotation was found with the given external entity idCommentSecurityException
- if the current user does have the right permissions on the annotated document.void deleteExternalAnnotation(CoreSession session, String entityId) throws CommentNotFoundException, CommentSecurityException
session
- the core sessionentityId
- the annotation entity idCommentNotFoundException
- if no annotation was found with the given external entity idCommentSecurityException
- if the current user does have the right permissions on the annotated document.Copyright © 2019 Nuxeo. All rights reserved.