public abstract class OpenMetadataClient extends Object implements OpenMetadataStore
| Constructor and Description |
|---|
OpenMetadataClient(String serverPlatformURLRoot,
String serverName)
Simple constructor for the minimal toString implementation
|
| Modifier and Type | Method and Description |
|---|---|
abstract void |
classifyMetadataElementInStore(String metadataElementGUID,
String classificationName,
Date effectiveFrom,
Date effectiveTo,
ElementProperties properties)
Add a new classification to the metadata element.
|
abstract String |
createIncidentReport(String qualifiedName,
int domainIdentifier,
String background,
List<IncidentImpactedElement> impactedResources,
List<IncidentDependency> previousIncidents,
Map<String,Integer> incidentClassifiers,
Map<String,String> additionalProperties)
Create an incident report to capture the situation detected by this governance action service.
|
abstract String |
createMetadataElementInStore(String metadataElementTypeName,
ElementStatus initialStatus,
Date effectiveFrom,
Date effectiveTo,
ElementProperties properties,
String templateGUID)
Create a new metadata element in the metadata store.
|
abstract String |
createRelatedElementsInStore(String relationshipTypeName,
String metadataElement1GUID,
String metadataElement2GUID,
Date effectiveFrom,
Date effectiveTo,
ElementProperties properties)
Create a relationship between two metadata elements.
|
abstract void |
deleteMetadataElementInStore(String metadataElementGUID)
Delete a specific metadata element.
|
abstract void |
deleteRelatedElementsInStore(String relationshipGUID)
Delete a relationship between two metadata elements.
|
abstract void |
disconnectListener()
Unregister the listener from the event infrastructure.
|
abstract List<OpenMetadataElement> |
findMetadataElements(String metadataElementTypeName,
List<String> metadataElementSubtypeName,
SearchProperties searchProperties,
List<ElementStatus> limitResultsByStatus,
SearchClassifications matchClassifications,
String sequencingProperty,
SequencingOrder sequencingOrder,
int startFrom,
int pageSize)
Return a list of metadata elements that match the supplied criteria.
|
abstract List<OpenMetadataElement> |
findMetadataElementsWithString(String searchString,
int startFrom,
int pageSize)
Retrieve the metadata elements that contain the requested string.
|
abstract List<RelatedMetadataElements> |
findRelationshipsBetweenMetadataElements(String relationshipTypeName,
SearchProperties searchProperties,
String sequencingProperty,
SequencingOrder sequencingOrder,
int startFrom,
int pageSize)
Return a list of relationships that match the requested conditions.
|
abstract OpenMetadataElement |
getMetadataElementByGUID(String elementGUID)
Retrieve the metadata element using its unique identifier.
|
abstract OpenMetadataElement |
getMetadataElementByUniqueName(String uniqueName,
String uniquePropertyName)
Retrieve the metadata element using its unique name (typically the qualified name).
|
abstract String |
getMetadataElementGUIDByUniqueName(String uniqueName,
String uniquePropertyName)
Retrieve the unique identifier of a metadata element using its unique name (typically the qualified name).
|
abstract List<RelatedMetadataElement> |
getRelatedMetadataElements(String elementGUID,
int startingAtEnd,
String relationshipTypeName,
int startFrom,
int pageSize)
Retrieve the metadata elements connected to the supplied element.
|
abstract String |
initiateGovernanceAction(String qualifiedName,
int domainIdentifier,
String displayName,
String description,
List<String> requestSourceGUIDs,
List<NewActionTarget> actionTargets,
Date startTime,
String governanceEngineName,
String requestType,
Map<String,String> requestParameters)
Create a governance action in the metadata store which will trigger the governance action service
associated with the supplied request type.
|
abstract String |
initiateGovernanceActionProcess(String processQualifiedName,
Map<String,String> requestParameters,
List<String> requestSourceGUIDs,
List<NewActionTarget> actionTargets,
Date startTime)
Using the named governance action process as a template, initiate a chain of governance actions.
|
abstract void |
reclassifyMetadataElementInStore(String metadataElementGUID,
String classificationName,
boolean replaceProperties,
ElementProperties properties)
Update the properties of a classification that is currently attached to a specific metadata element.
|
abstract void |
recordCompletionStatus(CompletionStatus status,
List<String> outputGuards,
Map<String,String> requestParameters,
List<NewActionTarget> newActionTargets)
Declare that all of the processing for the governance action service is finished and the status of the work.
|
abstract void |
registerListener(WatchdogGovernanceListener listener,
List<WatchdogEventType> interestingEventTypes,
List<String> interestingMetadataTypes,
String specificInstance)
Register a listener to receive events about changes to metadata elements in the open metadata store.
|
String |
toString()
Standard toString method.
|
abstract void |
unclassifyMetadataElementInStore(String metadataElementGUID,
String classificationName)
Remove the named classification from a specific metadata element.
|
abstract void |
updateActionTargetStatus(String actionTargetGUID,
GovernanceActionStatus status,
Date startDate,
Date completionDate)
Update the status of a specific action target.
|
abstract void |
updateClassificationStatusInStore(String metadataElementGUID,
String classificationName,
Date effectiveFrom,
Date effectiveTo)
Update the effectivity dates of a specific classification attached to a metadata element.
|
abstract void |
updateMetadataElementInStore(String metadataElementGUID,
boolean replaceProperties,
ElementProperties properties)
Update the properties of a specific metadata element.
|
abstract void |
updateMetadataElementStatusInStore(String metadataElementGUID,
ElementStatus newElementStatus,
Date effectiveFrom,
Date effectiveTo)
Update the status of specific metadata element.
|
abstract void |
updateRelatedElementsInStore(String relationshipGUID,
boolean replaceProperties,
ElementProperties properties)
Update the properties associated with a relationship.
|
abstract void |
updateRelatedElementsStatusInStore(String relationshipGUID,
Date effectiveFrom,
Date effectiveTo)
Update the effectivity dates of a specific relationship between metadata elements.
|
public OpenMetadataClient(String serverPlatformURLRoot, String serverName)
serverPlatformURLRoot - network identifier for the platform where the metadata server is runningserverName - name of the server supporting the metadata storepublic abstract OpenMetadataElement getMetadataElementByGUID(String elementGUID) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException
getMetadataElementByGUID in interface OpenMetadataStoreelementGUID - unique identifier for the metadata elementInvalidParameterException - the unique identifier is null or not known.UserNotAuthorizedException - the governance action service is not able to access the elementPropertyServerException - there is a problem accessing the metadata storepublic abstract OpenMetadataElement getMetadataElementByUniqueName(String uniqueName, String uniquePropertyName) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException
getMetadataElementByUniqueName in interface OpenMetadataStoreuniqueName - unique name for the metadata elementuniquePropertyName - name of property name to test in the open metadata element - if null "qualifiedName" is usedInvalidParameterException - the unique identifier is null or not known.UserNotAuthorizedException - the governance action service is not able to access the elementPropertyServerException - there is a problem accessing the metadata storepublic abstract String getMetadataElementGUIDByUniqueName(String uniqueName, String uniquePropertyName) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException
getMetadataElementGUIDByUniqueName in interface OpenMetadataStoreuniqueName - unique name for the metadata elementuniquePropertyName - name of property name to test in the open metadata element - if null "qualifiedName" is usedInvalidParameterException - the unique identifier is null or not known.UserNotAuthorizedException - the governance action service is not able to access the elementPropertyServerException - there is a problem accessing the metadata storepublic abstract List<OpenMetadataElement> findMetadataElementsWithString(String searchString, int startFrom, int pageSize) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException
findMetadataElementsWithString in interface OpenMetadataStoresearchString - name to retrievestartFrom - paging start pointpageSize - maximum results that can be returnedInvalidParameterException - the qualified name is nullUserNotAuthorizedException - the governance action service is not able to access the elementPropertyServerException - there is a problem accessing the metadata storepublic abstract List<RelatedMetadataElement> getRelatedMetadataElements(String elementGUID, int startingAtEnd, String relationshipTypeName, int startFrom, int pageSize) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException
getRelatedMetadataElements in interface OpenMetadataStoreelementGUID - unique identifier for the starting metadata elementstartingAtEnd - indicates which end to retrieve from (0 is "either end"; 1 is end1; 2 is end 2)relationshipTypeName - type name of relationships to follow (or null for all)startFrom - paging start pointpageSize - maximum results that can be returnedInvalidParameterException - the unique identifier is null or not known; the relationship type is invalidUserNotAuthorizedException - the governance action service is not able to access the elementsPropertyServerException - there is a problem accessing the metadata storepublic abstract List<OpenMetadataElement> findMetadataElements(String metadataElementTypeName, List<String> metadataElementSubtypeName, SearchProperties searchProperties, List<ElementStatus> limitResultsByStatus, SearchClassifications matchClassifications, String sequencingProperty, SequencingOrder sequencingOrder, int startFrom, int pageSize) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException
findMetadataElements in interface OpenMetadataStoremetadataElementTypeName - type of interest (null means any element type)metadataElementSubtypeName - optional list of the subtypes of the metadataElementTypeName to
include in the search results. Null means all subtypes.searchProperties - Optional list of entity property conditions to match.limitResultsByStatus - By default, entities in all statuses (other than DELETE) are returned. However, it is possible
to specify a list of statuses (eg ACTIVE) to restrict the results to. Null means all status values.matchClassifications - Optional list of classifications to match.sequencingProperty - String name of the property that is to be used to sequence the results.
Null means do not sequence on a property name (see SequencingOrder).sequencingOrder - Enum defining how the results should be ordered.startFrom - paging start pointpageSize - maximum results that can be returnedInvalidParameterException - one of the search parameters are is invalidUserNotAuthorizedException - the governance action service is not able to access the elementsPropertyServerException - there is a problem accessing the metadata storepublic abstract List<RelatedMetadataElements> findRelationshipsBetweenMetadataElements(String relationshipTypeName, SearchProperties searchProperties, String sequencingProperty, SequencingOrder sequencingOrder, int startFrom, int pageSize) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException
findRelationshipsBetweenMetadataElements in interface OpenMetadataStorerelationshipTypeName - relationship's type. Null means all types
(but may be slow so not recommended).searchProperties - Optional list of relationship property conditions to match.sequencingProperty - String name of the property that is to be used to sequence the results.
Null means do not sequence on a property name (see SequencingOrder).sequencingOrder - Enum defining how the results should be ordered.startFrom - paging start pointpageSize - maximum results that can be returnedInvalidParameterException - one of the search parameters are is invalidUserNotAuthorizedException - the governance action service is not able to access the elementsPropertyServerException - there is a problem accessing the metadata storepublic abstract String createMetadataElementInStore(String metadataElementTypeName, ElementStatus initialStatus, Date effectiveFrom, Date effectiveTo, ElementProperties properties, String templateGUID) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException
metadataElementTypeName - type name of the new metadata elementinitialStatus - initial status of the metadata elementeffectiveFrom - the date when this element is active - null for active on creationeffectiveTo - the date when this element becomes inactive - null for active until deletedproperties - properties of the new metadata elementtemplateGUID - the unique identifier of the existing asset to copy (this will copy all of the attachments such as nested content, schema
connection etc)InvalidParameterException - the type name, status or one of the properties is invalidUserNotAuthorizedException - the governance action service is not authorized to create this type of elementPropertyServerException - there is a problem with the metadata storepublic abstract void updateMetadataElementInStore(String metadataElementGUID, boolean replaceProperties, ElementProperties properties) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException
metadataElementGUID - unique identifier of the metadata element to updatereplaceProperties - flag to indicate whether to completely replace the existing properties with the new properties, or just update
the individual properties specified on the request.properties - new properties for the metadata elementInvalidParameterException - either the unique identifier or the properties are invalid in some wayUserNotAuthorizedException - the governance action service is not authorized to update this elementPropertyServerException - there is a problem with the metadata storepublic abstract void updateMetadataElementStatusInStore(String metadataElementGUID, ElementStatus newElementStatus, Date effectiveFrom, Date effectiveTo) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException
metadataElementGUID - unique identifier of the metadata element to updatenewElementStatus - new status value - or null to leave as iseffectiveFrom - the date when this element is active - null for active noweffectiveTo - the date when this element becomes inactive - null for active until deletedInvalidParameterException - either the unique identifier or the status are invalid in some wayUserNotAuthorizedException - the governance action service is not authorized to update this elementPropertyServerException - there is a problem with the metadata storepublic abstract void deleteMetadataElementInStore(String metadataElementGUID) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException
metadataElementGUID - unique identifier of the metadata element to updateInvalidParameterException - the unique identifier is null or invalid in some wayUserNotAuthorizedException - the governance action service is not authorized to delete this elementPropertyServerException - there is a problem with the metadata storepublic abstract void classifyMetadataElementInStore(String metadataElementGUID, String classificationName, Date effectiveFrom, Date effectiveTo, ElementProperties properties) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException
metadataElementGUID - unique identifier of the metadata element to updateclassificationName - name of the classification to add (if the classification is already present then use reclassify)effectiveFrom - the date when this classification is active - null for active noweffectiveTo - the date when this classification becomes inactive - null for active until deletedproperties - properties to store in the new classification. These must conform to the valid properties associated with the
classification nameInvalidParameterException - the unique identifier or classification name is null or invalid in some way; properties do not match the
valid properties associated with the classification's type definitionUserNotAuthorizedException - the governance action service is not authorized to update this elementPropertyServerException - there is a problem with the metadata storepublic abstract void reclassifyMetadataElementInStore(String metadataElementGUID, String classificationName, boolean replaceProperties, ElementProperties properties) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException
metadataElementGUID - unique identifier of the metadata element to updateclassificationName - unique name of the classification to updatereplaceProperties - flag to indicate whether to completely replace the existing properties with the new properties, or just update
the individual properties specified on the request.properties - new properties for the classificationInvalidParameterException - the unique identifier or classification name is null or invalid in some way; properties do not match the
valid properties associated with the classification's type definitionUserNotAuthorizedException - the governance action service is not authorized to update this element/classificationPropertyServerException - there is a problem with the metadata storepublic abstract void updateClassificationStatusInStore(String metadataElementGUID, String classificationName, Date effectiveFrom, Date effectiveTo) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException
metadataElementGUID - unique identifier of the metadata element to updateclassificationName - unique name of the classification to updateeffectiveFrom - the date when this element is active - null for active noweffectiveTo - the date when this element becomes inactive - null for active until deletedInvalidParameterException - either the unique identifier or the status are invalid in some wayUserNotAuthorizedException - the governance action service is not authorized to update this elementPropertyServerException - there is a problem with the metadata storepublic abstract void unclassifyMetadataElementInStore(String metadataElementGUID, String classificationName) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException
metadataElementGUID - unique identifier of the metadata element to updateclassificationName - unique name of the classification to removeInvalidParameterException - the unique identifier or classification name is null or invalid in some wayUserNotAuthorizedException - the governance action service is not authorized to remove this classificationPropertyServerException - there is a problem with the metadata storepublic abstract String createRelatedElementsInStore(String relationshipTypeName, String metadataElement1GUID, String metadataElement2GUID, Date effectiveFrom, Date effectiveTo, ElementProperties properties) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException
relationshipTypeName - name of the type of relationship to create. This will determine the types of metadata elements that can be
related and the properties that can be associated with this relationship.metadataElement1GUID - unique identifier of the metadata element at end 1 of the relationshipmetadataElement2GUID - unique identifier of the metadata element at end 2 of the relationshipeffectiveFrom - the date when this element is active - null for active noweffectiveTo - the date when this element becomes inactive - null for active until deletedproperties - the properties of the relationshipInvalidParameterException - the unique identifier's of the metadata elements are null or invalid in some way; the properties are
not valid for this type of relationshipUserNotAuthorizedException - the governance action service is not authorized to create this type of relationshipPropertyServerException - there is a problem with the metadata storepublic abstract void updateRelatedElementsInStore(String relationshipGUID, boolean replaceProperties, ElementProperties properties) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException
relationshipGUID - unique identifier of the relationship to updatereplaceProperties - flag to indicate whether to completely replace the existing properties with the new properties, or just update
the individual properties specified on the request.properties - new properties for the relationshipInvalidParameterException - the unique identifier of the relationship is null or invalid in some way; the properties are
not valid for this type of relationshipUserNotAuthorizedException - the governance action service is not authorized to update this relationshipPropertyServerException - there is a problem with the metadata storepublic abstract void updateRelatedElementsStatusInStore(String relationshipGUID, Date effectiveFrom, Date effectiveTo) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException
relationshipGUID - unique identifier of the relationship to updateeffectiveFrom - the date when this element is active - null for active noweffectiveTo - the date when this element becomes inactive - null for active until deletedInvalidParameterException - either the unique identifier or the status are invalid in some wayUserNotAuthorizedException - the governance action service is not authorized to update this elementPropertyServerException - there is a problem with the metadata storepublic abstract void deleteRelatedElementsInStore(String relationshipGUID) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException
relationshipGUID - unique identifier of the relationship to deleteInvalidParameterException - the unique identifier of the relationship is null or invalid in some wayUserNotAuthorizedException - the governance action service is not authorized to delete this relationshipPropertyServerException - there is a problem with the metadata storepublic abstract void updateActionTargetStatus(String actionTargetGUID, GovernanceActionStatus status, Date startDate, Date completionDate) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException
actionTargetGUID - unique identifier of the governance action service.status - status enum to show its progressstartDate - date/time that the governance action service started processing the targetcompletionDate - date/time that the governance process completed processing this target.InvalidParameterException - the action target GUID is not recognizedUserNotAuthorizedException - the governance action service is not authorized to update the action target propertiesPropertyServerException - there is a problem connecting to the metadata storepublic abstract void recordCompletionStatus(CompletionStatus status, List<String> outputGuards, Map<String,String> requestParameters, List<NewActionTarget> newActionTargets) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException
status - completion status enum valueoutputGuards - optional guard strings for triggering subsequent action(s)requestParameters - properties to pass to the next governance action servicenewActionTargets - list of action target names to GUIDs for the resulting governance action serviceInvalidParameterException - the completion status is nullUserNotAuthorizedException - the governance action service is not authorized to update the governance action service statusPropertyServerException - there is a problem connecting to the metadata storepublic abstract String initiateGovernanceAction(String qualifiedName, int domainIdentifier, String displayName, String description, List<String> requestSourceGUIDs, List<NewActionTarget> actionTargets, Date startTime, String governanceEngineName, String requestType, Map<String,String> requestParameters) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException
qualifiedName - unique identifier to give this governance actiondomainIdentifier - governance domain associated with this action (0=ALL)displayName - display name for this actiondescription - description for this actionrequestSourceGUIDs - request source elements for the resulting governance action serviceactionTargets - list of action target names to GUIDs for the resulting governance action servicegovernanceEngineName - name of the governance engine to run the requeststartTime - future start time or null for "as soon as possible".requestType - request type to identify the governance action service to runrequestParameters - properties to pass to the governance action serviceInvalidParameterException - null qualified nameUserNotAuthorizedException - this governance action service is not authorized to create a governance actionPropertyServerException - there is a problem with the metadata storepublic abstract String initiateGovernanceActionProcess(String processQualifiedName, Map<String,String> requestParameters, List<String> requestSourceGUIDs, List<NewActionTarget> actionTargets, Date startTime) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException
processQualifiedName - unique name of the governance action process to userequestParameters - initial set of request parameters to pass to the governance actionsrequestSourceGUIDs - request source elements for the resulting governance action serviceactionTargets - list of action target names to GUIDs for the resulting governance action servicestartTime - future start time or null for "as soon as possible".InvalidParameterException - null or unrecognized qualified name of the processUserNotAuthorizedException - this governance action service is not authorized to create a governance action processPropertyServerException - there is a problem with the metadata storepublic abstract String createIncidentReport(String qualifiedName, int domainIdentifier, String background, List<IncidentImpactedElement> impactedResources, List<IncidentDependency> previousIncidents, Map<String,Integer> incidentClassifiers, Map<String,String> additionalProperties) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException
qualifiedName - unique identifier to give this new incident reportdomainIdentifier - governance domain associated with this action (0=ALL)background - description of the situationimpactedResources - details of the resources impacted by this situationpreviousIncidents - links to previous incident reports covering this situationincidentClassifiers - initial classifiers for the incident reportadditionalProperties - additional arbitrary properties for the incident reportsInvalidParameterException - null or non-unique qualified name for the incident reportUserNotAuthorizedException - this governance action service is not authorized to create a incident reportPropertyServerException - there is a problem with the metadata storepublic abstract void registerListener(WatchdogGovernanceListener listener, List<WatchdogEventType> interestingEventTypes, List<String> interestingMetadataTypes, String specificInstance) throws InvalidParameterException
listener - listener object to receive eventsinterestingEventTypes - types of events that should be passed to the listenerinterestingMetadataTypes - types of elements that are the subject of the interesting event typesspecificInstance - unique identifier of a specific instance to watch forInvalidParameterException - one or more of the type names are unrecognizedpublic abstract void disconnectListener()
Copyright © 2018–2021 LF AI & Data Foundation. All rights reserved.