public class DiscoveryAnnotationStoreClient extends DiscoveryAnnotationStore
assetGUID, discoveryReport, userId| Constructor and Description |
|---|
DiscoveryAnnotationStoreClient(String userId,
String assetGUID,
DiscoveryAnalysisReportClient discoveryAnalysisReportClient,
DiscoveryEngineClient discoveryEngineClient)
Constructor sets up the key parameters for accessing the annotations store.
|
| Modifier and Type | Method and Description |
|---|---|
String |
addAnnotationToAnnotation(String parentAnnotationGUID,
Annotation annotation)
Add a new annotation and link it to an existing annotation.
|
String |
addAnnotationToDataField(String parentDataFieldGUID,
Annotation annotation)
Add a new annotation and link it to an existing data field.
|
String |
addAnnotationToDiscoveryReport(Annotation annotation)
Add a new annotation to the annotation store as a top level annotation linked directly off of the report.
|
String |
addDataFieldToDataField(String parentDataFieldGUID,
DataField dataField)
Add a new data field and link it to an existing data field.
|
String |
addDataFieldToDiscoveryReport(String annotationGUID,
DataField dataField)
Add a new data field to the Annotation store linked off of an annotation (typically SchemaAnalysisAnnotation).
|
void |
deleteAnnotation(String annotationGUID)
Remove an annotation from the annotation store.
|
void |
deleteDataField(String dataFieldGUID)
Remove a data field from the annotation store.
|
Annotation |
getAnnotation(String annotationGUID)
Return a specific annotation stored in the annotation store (previous or new).
|
DataField |
getDataField(String dataFieldGUID)
Return a specific data field stored in the annotation store (previous or new).
|
List<Annotation> |
getExtendedAnnotations(String annotationGUID,
int startingFrom,
int maximumResults)
Return any annotations attached to this annotation.
|
List<DataField> |
getNestedDataFields(String parentDataFieldGUID,
int startingFrom,
int maximumResults)
Return any annotations attached to this annotation.
|
List<Annotation> |
getNewAnnotationsForAsset(int startingFrom,
int maximumResults)
Return the current list of annotations for this discovery run.
|
List<DataField> |
getNewDataFieldsForAsset(int startingFrom,
int maximumResults)
Return the current list of data fields for this discovery run.
|
List<Annotation> |
getPreviousAnnotationsForAsset(AnnotationStatus status,
int startingFrom,
int maximumResults)
Return the list of annotations from previous runs of the discovery service that are set to a specific status.
|
List<Annotation> |
getPreviousAnnotationsForAsset(int startingFrom,
int maximumResults)
Return the list of Annotations created for the asset by previous runs of the discovery service.
|
List<DataField> |
getPreviousDataFieldsForAsset(int startingFrom,
int maximumResults)
Return the list of data fields from previous runs of the discovery service.
|
List<String> |
getTypesOfAnnotation()
Return the annotation subtype names.
|
Map<String,String> |
getTypesOfAnnotationWithDescriptions()
Return the annotation subtype names mapped to their descriptions.
|
void |
updateAnnotation(Annotation annotation)
Replace the current properties of an annotation.
|
void |
updateDataField(DataField dataField)
Replace the current properties of a data field.
|
getDiscoveryReportpublic DiscoveryAnnotationStoreClient(String userId, String assetGUID, DiscoveryAnalysisReportClient discoveryAnalysisReportClient, DiscoveryEngineClient discoveryEngineClient)
userId - calling userassetGUID - unique identifier of the asset that the annotations should be attached todiscoveryAnalysisReportClient - discovery report that is linked to the annotations.discoveryEngineClient - client for calling REST APIspublic List<String> getTypesOfAnnotation() throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException
getTypesOfAnnotation in class DiscoveryAnnotationStoreInvalidParameterException - full path or userId is nullPropertyServerException - problem accessing property serverUserNotAuthorizedException - security access problempublic Map<String,String> getTypesOfAnnotationWithDescriptions() throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException
getTypesOfAnnotationWithDescriptions in class DiscoveryAnnotationStoreInvalidParameterException - full path or userId is nullPropertyServerException - problem accessing property serverUserNotAuthorizedException - security access problempublic List<Annotation> getPreviousAnnotationsForAsset(int startingFrom, int maximumResults) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException
getPreviousAnnotationsForAsset in class DiscoveryAnnotationStorestartingFrom - starting position in the list.maximumResults - maximum number of elements that can be returnedInvalidParameterException - one of the parameters is invalidUserNotAuthorizedException - the user id not authorized to issue this requestPropertyServerException - there was a problem retrieving annotations from the annotation store.public List<Annotation> getPreviousAnnotationsForAsset(AnnotationStatus status, int startingFrom, int maximumResults) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException
getPreviousAnnotationsForAsset in class DiscoveryAnnotationStorestatus - status value to use on the querystartingFrom - starting position in the list.maximumResults - maximum number of elements that can be returnedInvalidParameterException - one of the parameters is invalidUserNotAuthorizedException - the user id not authorized to issue this requestPropertyServerException - there was a problem retrieving annotations from the annotation store.public List<Annotation> getNewAnnotationsForAsset(int startingFrom, int maximumResults) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException
getNewAnnotationsForAsset in class DiscoveryAnnotationStorestartingFrom - starting position in the list.maximumResults - maximum number of elements that can be returnedInvalidParameterException - one of the parameters is invalidUserNotAuthorizedException - the user id not authorized to issue this requestPropertyServerException - there was a problem retrieving annotations from the annotation store.public List<Annotation> getExtendedAnnotations(String annotationGUID, int startingFrom, int maximumResults) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException
getExtendedAnnotations in class DiscoveryAnnotationStoreannotationGUID - parent annotationstartingFrom - starting position in the listmaximumResults - maximum number of annotations that can be returned.InvalidParameterException - 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 annotationGUID) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException
getAnnotation in class DiscoveryAnnotationStoreannotationGUID - unique identifier of the annotationInvalidParameterException - one of the parameters is invalidUserNotAuthorizedException - the user id not authorized to issue this requestPropertyServerException - there was a problem retrieving the annotation from the annotation store.public String addAnnotationToDiscoveryReport(Annotation annotation) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException
addAnnotationToDiscoveryReport in class DiscoveryAnnotationStoreannotation - annotation objectInvalidParameterException - the annotation is invalidUserNotAuthorizedException - the user id not authorized to issue this requestPropertyServerException - there was a problem adding the annotation to the annotation store.public String addAnnotationToAnnotation(String parentAnnotationGUID, Annotation annotation) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException
addAnnotationToAnnotation in class DiscoveryAnnotationStoreparentAnnotationGUID - unique identifier of the annotation that this new one is to be attached toannotation - annotation objectInvalidParameterException - 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(Annotation annotation) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException
updateAnnotation in class DiscoveryAnnotationStoreannotation - new propertiesInvalidParameterException - 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 annotationGUID) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException
deleteAnnotation in class DiscoveryAnnotationStoreannotationGUID - unique identifier of the annotationInvalidParameterException - 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.public List<DataField> getPreviousDataFieldsForAsset(int startingFrom, int maximumResults) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException
getPreviousDataFieldsForAsset in class DiscoveryAnnotationStorestartingFrom - starting position in the list.maximumResults - maximum number of elements that can be returnedInvalidParameterException - one of the parameters is invalidUserNotAuthorizedException - the user id not authorized to issue this requestPropertyServerException - there was a problem retrieving data fields from the annotation store.public List<DataField> getNewDataFieldsForAsset(int startingFrom, int maximumResults) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException
getNewDataFieldsForAsset in class DiscoveryAnnotationStorestartingFrom - starting position in the list.maximumResults - maximum number of elements that can be returnedInvalidParameterException - one of the parameters is invalidUserNotAuthorizedException - the user id not authorized to issue this requestPropertyServerException - there was a problem retrieving data fields from the annotation store.public List<DataField> getNestedDataFields(String parentDataFieldGUID, int startingFrom, int maximumResults) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException
getNestedDataFields in class DiscoveryAnnotationStoreparentDataFieldGUID - parent data field identifierstartingFrom - starting position in the listmaximumResults - maximum number of annotations that can be returned.InvalidParameterException - 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 DataField getDataField(String dataFieldGUID) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException
getDataField in class DiscoveryAnnotationStoredataFieldGUID - unique identifier of the data fieldInvalidParameterException - one of the parameters is invalidUserNotAuthorizedException - the user id not authorized to issue this requestPropertyServerException - there was a problem retrieving the data field from the annotation store.public String addDataFieldToDiscoveryReport(String annotationGUID, DataField dataField) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException
addDataFieldToDiscoveryReport in class DiscoveryAnnotationStoreannotationGUID - unique identifier of the annotation that the data field is to be linked todataField - dataField objectInvalidParameterException - the dataField is invalid or the annotation GUID points to an annotation
that can not be associated with a data field.UserNotAuthorizedException - the user id not authorized to issue this requestPropertyServerException - there was a problem adding the data field to the Annotation store.public String addDataFieldToDataField(String parentDataFieldGUID, DataField dataField) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException
addDataFieldToDataField in class DiscoveryAnnotationStoreparentDataFieldGUID - unique identifier of the data field that this new one is to be attached todataField - data field objectInvalidParameterException - one of the parameters is invalidUserNotAuthorizedException - the user id not authorized to issue this requestPropertyServerException - there was a problem saving data fields in the annotation store.public String addAnnotationToDataField(String parentDataFieldGUID, Annotation annotation) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException
addAnnotationToDataField in class DiscoveryAnnotationStoreparentDataFieldGUID - unique identifier of the data field that this new one is to be attached toannotation - data field objectInvalidParameterException - one of the parameters is invalidUserNotAuthorizedException - the user id not authorized to issue this requestPropertyServerException - there was a problem saving data fields in the annotation store.public void updateDataField(DataField dataField) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException
updateDataField in class DiscoveryAnnotationStoredataField - new propertiesInvalidParameterException - one of the parameters is invalidUserNotAuthorizedException - the user id not authorized to issue this requestPropertyServerException - there was a problem updating the data field in the annotation store.public void deleteDataField(String dataFieldGUID) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException
deleteDataField in class DiscoveryAnnotationStoredataFieldGUID - unique identifier of the data fieldInvalidParameterException - one of the parameters is invalidUserNotAuthorizedException - the user id not authorized to issue this requestPropertyServerException - there was a problem deleting the data field from the annotation store.Copyright © 2018–2021 LF AI & Data Foundation. All rights reserved.