Interface AnnotationService
- All Superinterfaces:
Service
-
Method Summary
Modifier and TypeMethodDescriptionGiven aList
of unique annotation IDs, delete their associated annotations if they are found.Given a request that includes aList
ofAnnotation
objects, save the annotations to Vault.Creates a newAnnotation.Builder
.Creates a newAnnotation.Builder
for the specified unique annotation ID.Creates a newAnnotationBatchDeleteRequest.Builder
.Creates a newAnnotationBatchSaveRequest.Builder
.Creates a newAnnotationPlacemark.Builder
.Creates a newAnnotationReadRequest.Builder
.Creates a newAnnotationReplyReadRequest.Builder
.Creates a newAnnotationReference.Builder
.readAnnotations
(AnnotationReadRequest readAnnotationRequest) Given either aList
of unique annotation IDs or a document version to read annotations from, returns anAnnotationReadOperation
to execute.readReplies
(AnnotationReplyReadRequest readReplyRequest) Given the ID of a parent annotation, returns anAnnotationReadOperation
to execute to read its replies.
-
Method Details
-
batchSaveAnnotations
BatchOperation<AnnotationBatchSaveSuccess,AnnotationBatchSaveError> batchSaveAnnotations(AnnotationBatchSaveRequest request) Given a request that includes aList
ofAnnotation
objects, save the annotations to Vault.Annotation
s with IDs built usingnewAnnotationBuilderWithId(String)
will be treated as updates, whileAnnotation
s without IDs built usingnewAnnotationBuilder()
will be created. Updates may specify fields, placemarks, or references to update, or replies to append. New annotations must contain a placemark and the minimum required fields for their type.Runs as a batch operation, for example:
annotationService.batchSaveAnnotations(annotations).onSuccesses(...).onErrors(...).ignoreErrors().execute();
Successes are gathered into
AnnotationBatchSaveSuccess
objects, which map the passedAnnotation
s to the IDs of annotations that were successfully created based on their document and placemark data.Errors are gathered into
AnnotationBatchSaveError
objects, which map the passedAnnotation
s to error types defined by theAnnotationBatchSaveErrorType
enum.The maximum allowed batch size is 500 input
Annotation
s.- Parameters:
request
- a request including theAnnotation
s to be created or updated, which must have a minimum amount of data based on their type- Returns:
- the batch operation, which will save the annotations upon execution
-
readAnnotations
Given either aList
of unique annotation IDs or a document version to read annotations from, returns anAnnotationReadOperation
to execute.Successes may be streamed, with each result being a fully populated
Annotation
object. If a particular annotation requested by ID is not found, it will not be included in the stream.Errors are
AnnotationReadErrorResult
objects, which include error types defined by theAnnotationReadErrorType
enum.Replies will not be fetched unless specified by ID. Replies, if any, can be fetched with
readReplies(AnnotationReplyReadRequest)
.- Parameters:
readAnnotationRequest
- the request to read annotations- Returns:
- an operation to read the requested annotations
-
readReplies
Given the ID of a parent annotation, returns anAnnotationReadOperation
to execute to read its replies.Successes may be streamed, with each result being a fully populated
Annotation
object representing a reply. They will be in the order in which they appear on the parent.Errors are
AnnotationReadErrorResult
objects, which include error types defined by theAnnotationReadErrorType
enum.- Parameters:
readReplyRequest
- the request to read the replies of a parent annotation- Returns:
- an operation to read the requested replies
-
batchDeleteAnnotations
BatchOperation<PositionalResult,AnnotationBatchDeleteError> batchDeleteAnnotations(AnnotationBatchDeleteRequest request) Given aList
of unique annotation IDs, delete their associated annotations if they are found.Runs as a batch operation, for example:
annotationService.batchDeleteAnnotations(annotationIds).onSuccesses(...).onErrors(...).ignoreErrors().execute();
Successes are gathered into
PositionalResult
objects, which indicate which inputs were successfully deleted, by input position.Errors are gathered into
AnnotationBatchDeleteError
objects, which map the inputs that were not deleted to error types defined by theAnnotationBatchDeleteErrorType
enum.The maximum allowed batch size is 500 input IDs.
- Parameters:
request
- a request including the unique IDs of the annotations to be deleted- Returns:
- the batch operation, which will save the annotations upon execution
-
newAnnotationBuilder
Annotation.Builder newAnnotationBuilder()Creates a newAnnotation.Builder
.- Returns:
- the created
Annotation.Builder
-
newAnnotationBuilderWithId
Creates a newAnnotation.Builder
for the specified unique annotation ID. Annotation objects built with the resulting builder, and then passed to thebatchSaveAnnotations(AnnotationBatchSaveRequest)
method, will be counted as an update to the annotation with the specified ID.Non-system managed fields may generally be updated unless there are additional restrictions due to annotation type or placemark type. Placemarks and references may also be updated. Any field, placemark, or reference list included using this builder will be counted as an update to the field, placemark, or reference list for that annotation. Replies may be appended to annotation types that support them, but cannot be removed.
- Parameters:
id
- the unique ID of the annotation to update- Returns:
- the created
Annotation.Builder
-
newBatchDeleteRequestBuilder
AnnotationBatchDeleteRequest.Builder newBatchDeleteRequestBuilder()Creates a newAnnotationBatchDeleteRequest.Builder
.- Returns:
- the created
AnnotationBatchDeleteRequest.Builder
-
newBatchSaveRequestBuilder
AnnotationBatchSaveRequest.Builder newBatchSaveRequestBuilder()Creates a newAnnotationBatchSaveRequest.Builder
.- Returns:
- the created
AnnotationBatchSaveRequest.Builder
-
newPlacemarkBuilder
AnnotationPlacemark.Builder newPlacemarkBuilder()Creates a newAnnotationPlacemark.Builder
.- Returns:
- the created
AnnotationPlacemark.Builder
-
newReadAnnotationRequestBuilder
AnnotationReadRequest.Builder newReadAnnotationRequestBuilder()Creates a newAnnotationReadRequest.Builder
.- Returns:
- the created
AnnotationReadRequest.Builder
-
newReadReplyRequestBuilder
AnnotationReplyReadRequest.Builder newReadReplyRequestBuilder()Creates a newAnnotationReplyReadRequest.Builder
.- Returns:
- the created
AnnotationReplyReadRequest.Builder
-
newReferenceBuilder
AnnotationReference.Builder newReferenceBuilder()Creates a newAnnotationReference.Builder
.- Returns:
- the created
AnnotationReference.Builder
-