Interface AnnotationService
-
public interface AnnotationService
Manages theAnnotation
ofDocument
-
-
Field Summary
Fields Modifier and Type Field Description static org.slf4j.Logger
LOGGER
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description void
create(com.flower.docs.domain.common.Id documentId, java.util.List<com.arondor.viewer.annotation.api.Annotation> annotations)
Create multiple annotations for a documentvoid
delete(com.flower.docs.domain.common.Id documentId)
Deletes all annotations of a documentvoid
delete(com.flower.docs.domain.common.Id documentId, java.util.List<com.flower.docs.domain.common.Id> annotationIds)
Deletes multiple annotations of a documentjava.util.List<com.arondor.viewer.annotation.api.Annotation>
get(com.flower.docs.domain.common.Id documentId)
Gets all annotations of a documentdefault java.util.List<com.arondor.viewer.annotation.api.Annotation>
getRotations(com.flower.docs.domain.common.Id documentId)
Gets all rotations of a document, the user must have READ_ANNOTATION on acl-rotation objectvoid
update(com.flower.docs.domain.common.Id documentId, java.util.List<com.arondor.viewer.annotation.api.Annotation> annotations)
Updates multiple annotations of a document
-
-
-
Method Detail
-
create
void create(com.flower.docs.domain.common.Id documentId, java.util.List<com.arondor.viewer.annotation.api.Annotation> annotations) throws com.flower.docs.domain.exception.FunctionalException, com.flower.docs.domain.exception.TechnicalException
Create multiple annotations for a document- Parameters:
documentId
- The identifier of the document to annotateannotations
- The annotations to create- Throws:
com.flower.docs.domain.exception.FunctionalException
- If a functional error occurscom.flower.docs.domain.exception.TechnicalException
- If a technical error occurs
-
get
java.util.List<com.arondor.viewer.annotation.api.Annotation> get(com.flower.docs.domain.common.Id documentId) throws com.flower.docs.domain.exception.FunctionalException, com.flower.docs.domain.exception.TechnicalException
Gets all annotations of a document- Parameters:
documentId
- The document identifier- Returns:
- The annotations of document
- Throws:
com.flower.docs.domain.exception.FunctionalException
- If a functional error occurscom.flower.docs.domain.exception.TechnicalException
- If a technical error occurs
-
getRotations
default java.util.List<com.arondor.viewer.annotation.api.Annotation> getRotations(com.flower.docs.domain.common.Id documentId) throws com.flower.docs.domain.exception.FunctionalException, com.flower.docs.domain.exception.TechnicalException
Gets all rotations of a document, the user must have READ_ANNOTATION on acl-rotation object- Parameters:
documentId
- The document identifier- Returns:
- The annotations of document
- Throws:
com.flower.docs.domain.exception.FunctionalException
- If a functional error occurscom.flower.docs.domain.exception.TechnicalException
- If a technical error occurs
-
update
void update(com.flower.docs.domain.common.Id documentId, java.util.List<com.arondor.viewer.annotation.api.Annotation> annotations) throws com.flower.docs.domain.exception.FunctionalException, com.flower.docs.domain.exception.TechnicalException
Updates multiple annotations of a document- Parameters:
documentId
- The identifier of the documentannotations
- Annotations to update- Throws:
com.flower.docs.domain.exception.FunctionalException
- If a functional error occurscom.flower.docs.domain.exception.TechnicalException
- If a technical error occurs
-
delete
void delete(com.flower.docs.domain.common.Id documentId, java.util.List<com.flower.docs.domain.common.Id> annotationIds) throws com.flower.docs.domain.exception.FunctionalException, com.flower.docs.domain.exception.TechnicalException
Deletes multiple annotations of a document- Parameters:
documentId
- The identifier of the documentannotationIds
- The identifiers of annotations to delete- Throws:
com.flower.docs.domain.exception.FunctionalException
- If a functional error occurscom.flower.docs.domain.exception.TechnicalException
- If a technical error occurs
-
delete
void delete(com.flower.docs.domain.common.Id documentId) throws com.flower.docs.domain.exception.FunctionalException, com.flower.docs.domain.exception.TechnicalException
Deletes all annotations of a document- Parameters:
documentId
- The identifier of the document- Throws:
com.flower.docs.domain.exception.FunctionalException
- If a functional error occurscom.flower.docs.domain.exception.TechnicalException
- If a technical error occurs
-
-