public class AnnotationHandler extends Object
| Constructor and Description |
|---|
AnnotationHandler(String serviceName,
String serverName,
InvalidParameterHandler invalidParameterHandler,
RepositoryHandler repositoryHandler,
OMRSRepositoryHelper repositoryHelper,
DataFieldHandler dataFieldHandler)
Construct the handler information needed to interact with the repository services
|
| Modifier and Type | Method and Description |
|---|---|
String |
addAnnotationToAnnotation(String userId,
String anchorAnnotationGUID,
Annotation annotation,
String methodName)
Add a new annotation and link it to an existing annotation.
|
void |
deleteAnnotation(String userId,
String annotationGUID,
String methodName)
Remove an annotation from the annotation store.
|
Annotation |
getAnnotation(String userId,
String annotationGUID,
String methodName)
Retrieve a single annotation by unique identifier.
|
List<Annotation> |
getExtendedAnnotations(String userId,
String annotationGUID,
AnnotationStatus annotationStatus,
int startingFrom,
int maximumResults,
String methodName)
Return any annotations attached to this annotation.
|
List<String> |
getTypesOfAnnotation()
Return the annotation subtype names.
|
Map<String,String> |
getTypesOfAnnotationDescriptions()
Return the list of annotation subtype names mapped to their descriptions.
|
void |
updateAnnotation(String userId,
String annotationGUID,
Annotation annotation,
String methodName)
Replace the current properties of an annotation.
|
public AnnotationHandler(String serviceName, String serverName, InvalidParameterHandler invalidParameterHandler, RepositoryHandler repositoryHandler, OMRSRepositoryHelper repositoryHelper, DataFieldHandler dataFieldHandler)
serviceName - name of this serviceserverName - name of the local serverinvalidParameterHandler - handler for managing parameter errorsrepositoryHandler - manages calls to the repository servicesrepositoryHelper - provides utilities for manipulating the repository services objectsdataFieldHandler - handler for managing data fieldspublic List<String> getTypesOfAnnotation()
public Map<String,String> getTypesOfAnnotationDescriptions()
public List<Annotation> getExtendedAnnotations(String userId, String annotationGUID, AnnotationStatus annotationStatus, int startingFrom, int maximumResults, String methodName) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException
userId - identifier of calling userannotationGUID - anchor annotationannotationStatus - status of the desired annotations - null means all statuses.startingFrom - starting position in the listmaximumResults - maximum number of annotations that can be returned.methodName - calling methodInvalidParameterException - one of the parameters is null or invalid.UserNotAuthorizedException - user not authorized to issue this request.PropertyServerException - there was a problem that occurred within the property server.public Annotation getAnnotation(String userId, String annotationGUID, String methodName) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException
userId - identifier of calling userannotationGUID - unique identifier of the annotationmethodName - calling methodInvalidParameterException - one of the parameters is null or invalid.UserNotAuthorizedException - user not authorized to issue this request.PropertyServerException - there was a problem that occurred within the property server.public String addAnnotationToAnnotation(String userId, String anchorAnnotationGUID, Annotation annotation, String methodName) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException
userId - identifier of calling useranchorAnnotationGUID - unique identifier of the annotation that this new one os to be attached toannotation - annotation objectmethodName - calling methodInvalidParameterException - one of the parameters is invalidUserNotAuthorizedException - the user id not authorized to issue this requestPropertyServerException - there was a problem saving annotations in the annotation store.public void updateAnnotation(String userId, String annotationGUID, Annotation annotation, String methodName) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException
userId - identifier of calling userannotationGUID - unique identifierannotation - new propertiesmethodName - calling methodInvalidParameterException - one of the parameters is invalidUserNotAuthorizedException - the user id not authorized to issue this requestPropertyServerException - there was a problem updating the annotation in the annotation store.public void deleteAnnotation(String userId, String annotationGUID, String methodName) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException
userId - identifier of calling userannotationGUID - unique identifier of the annotationmethodName - calling methodInvalidParameterException - one of the parameters is invalidUserNotAuthorizedException - the user id not authorized to issue this requestPropertyServerException - there was a problem deleting the annotation from the annotation store.Copyright © 2018–2020 ODPi. All rights reserved.