Class OpenMetadataClient
- java.lang.Object
-
- org.odpi.openmetadata.frameworks.governanceaction.OpenMetadataClient
-
- All Implemented Interfaces:
OpenMetadataStore
public abstract class OpenMetadataClient extends Object implements OpenMetadataStore
OpenMetadataClient provides access to metadata elements stored in the metadata repositories. It is implemented by a metadata repository provider. In Egeria, this class is implemented in the Governance Action OMES server.
-
-
Constructor Summary
Constructors Constructor Description OpenMetadataClient(String serverPlatformURLRoot, String serverName)Simple constructor for the minimal toString implementation
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description abstract voidclassifyMetadataElementInStore(String metadataElementGUID, String classificationName, Date effectiveFrom, Date effectiveTo, ElementProperties properties)Add a new classification to the metadata element.abstract StringcreateIncidentReport(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 StringcreateMetadataElementInStore(String metadataElementTypeName, ElementStatus initialStatus, Date effectiveFrom, Date effectiveTo, ElementProperties properties, String templateGUID)Create a new metadata element in the metadata store.abstract StringcreateRelatedElementsInStore(String relationshipTypeName, String metadataElement1GUID, String metadataElement2GUID, Date effectiveFrom, Date effectiveTo, ElementProperties properties)Create a relationship between two metadata elements.abstract voiddeleteMetadataElementInStore(String metadataElementGUID)Delete a specific metadata element.abstract voiddeleteRelatedElementsInStore(String relationshipGUID)Delete a relationship between two metadata elements.abstract voiddisconnectListener()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 OpenMetadataElementgetMetadataElementByGUID(String elementGUID)Retrieve the metadata element using its unique identifier.abstract OpenMetadataElementgetMetadataElementByUniqueName(String uniqueName, String uniquePropertyName)Retrieve the metadata element using its unique name (typically the qualified name).abstract StringgetMetadataElementGUIDByUniqueName(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 StringinitiateGovernanceAction(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 StringinitiateGovernanceActionProcess(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 voidreclassifyMetadataElementInStore(String metadataElementGUID, String classificationName, boolean replaceProperties, ElementProperties properties)Update the properties of a classification that is currently attached to a specific metadata element.abstract voidrecordCompletionStatus(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 voidregisterListener(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.StringtoString()Standard toString method.abstract voidunclassifyMetadataElementInStore(String metadataElementGUID, String classificationName)Remove the named classification from a specific metadata element.abstract voidupdateActionTargetStatus(String actionTargetGUID, GovernanceActionStatus status, Date startDate, Date completionDate)Update the status of a specific action target.abstract voidupdateClassificationStatusInStore(String metadataElementGUID, String classificationName, Date effectiveFrom, Date effectiveTo)Update the effectivity dates of a specific classification attached to a metadata element.abstract voidupdateMetadataElementInStore(String metadataElementGUID, boolean replaceProperties, ElementProperties properties)Update the properties of a specific metadata element.abstract voidupdateMetadataElementStatusInStore(String metadataElementGUID, ElementStatus newElementStatus, Date effectiveFrom, Date effectiveTo)Update the status of specific metadata element.abstract voidupdateRelatedElementsInStore(String relationshipGUID, boolean replaceProperties, ElementProperties properties)Update the properties associated with a relationship.abstract voidupdateRelatedElementsStatusInStore(String relationshipGUID, Date effectiveFrom, Date effectiveTo)Update the effectivity dates of a specific relationship between metadata elements.
-
-
-
Constructor Detail
-
OpenMetadataClient
public OpenMetadataClient(String serverPlatformURLRoot, String serverName)
Simple constructor for the minimal toString implementation- Parameters:
serverPlatformURLRoot- network identifier for the platform where the metadata server is runningserverName- name of the server supporting the metadata store
-
-
Method Detail
-
getMetadataElementByGUID
public abstract OpenMetadataElement getMetadataElementByGUID(String elementGUID) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException
Retrieve the metadata element using its unique identifier.- Specified by:
getMetadataElementByGUIDin interfaceOpenMetadataStore- Parameters:
elementGUID- unique identifier for the metadata element- Returns:
- metadata element properties
- Throws:
InvalidParameterException- 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 store
-
getMetadataElementByUniqueName
public abstract OpenMetadataElement getMetadataElementByUniqueName(String uniqueName, String uniquePropertyName) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException
Retrieve the metadata element using its unique name (typically the qualified name).- Specified by:
getMetadataElementByUniqueNamein interfaceOpenMetadataStore- Parameters:
uniqueName- unique name for the metadata elementuniquePropertyName- name of property name to test in the open metadata element - if null "qualifiedName" is used- Returns:
- metadata element properties
- Throws:
InvalidParameterException- 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 store
-
getMetadataElementGUIDByUniqueName
public abstract String getMetadataElementGUIDByUniqueName(String uniqueName, String uniquePropertyName) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException
Retrieve the unique identifier of a metadata element using its unique name (typically the qualified name).- Specified by:
getMetadataElementGUIDByUniqueNamein interfaceOpenMetadataStore- Parameters:
uniqueName- unique name for the metadata elementuniquePropertyName- name of property name to test in the open metadata element - if null "qualifiedName" is used- Returns:
- metadata element unique identifier (guid)
- Throws:
InvalidParameterException- 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 store
-
findMetadataElementsWithString
public abstract List<OpenMetadataElement> findMetadataElementsWithString(String searchString, int startFrom, int pageSize) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException
Retrieve the metadata elements that contain the requested string.- Specified by:
findMetadataElementsWithStringin interfaceOpenMetadataStore- Parameters:
searchString- name to retrievestartFrom- paging start pointpageSize- maximum results that can be returned- Returns:
- list of matching metadata elements (or null if no elements match the name)
- Throws:
InvalidParameterException- the qualified name is nullUserNotAuthorizedException- the governance action service is not able to access the elementPropertyServerException- there is a problem accessing the metadata store
-
getRelatedMetadataElements
public abstract List<RelatedMetadataElement> getRelatedMetadataElements(String elementGUID, int startingAtEnd, String relationshipTypeName, int startFrom, int pageSize) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException
Retrieve the metadata elements connected to the supplied element.- Specified by:
getRelatedMetadataElementsin interfaceOpenMetadataStore- Parameters:
elementGUID- 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 returned- Returns:
- list of related elements
- Throws:
InvalidParameterException- 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 store
-
findMetadataElements
public 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
Return a list of metadata elements that match the supplied criteria. The results can be returned over many pages.- Specified by:
findMetadataElementsin interfaceOpenMetadataStore- Parameters:
metadataElementTypeName- 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 returned- Returns:
- a list of elements matching the supplied criteria; null means no matching elements in the metadata store.
- Throws:
InvalidParameterException- 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 store
-
findRelationshipsBetweenMetadataElements
public abstract List<RelatedMetadataElements> findRelationshipsBetweenMetadataElements(String relationshipTypeName, SearchProperties searchProperties, String sequencingProperty, SequencingOrder sequencingOrder, int startFrom, int pageSize) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException
Return a list of relationships that match the requested conditions. The results can be received as a series of pages.- Specified by:
findRelationshipsBetweenMetadataElementsin interfaceOpenMetadataStore- Parameters:
relationshipTypeName- 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 returned- Returns:
- a list of relationships. Null means no matching relationships.
- Throws:
InvalidParameterException- 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 store
-
createMetadataElementInStore
public abstract String createMetadataElementInStore(String metadataElementTypeName, ElementStatus initialStatus, Date effectiveFrom, Date effectiveTo, ElementProperties properties, String templateGUID) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException
Create a new metadata element in the metadata store. The type name comes from the open metadata types. The selected type also controls the names and types of the properties that are allowed. This version of the method allows access to advanced features such as multiple states and effectivity dates.- Parameters:
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)- Returns:
- unique identifier of the new metadata element
- Throws:
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 store
-
updateMetadataElementInStore
public abstract void updateMetadataElementInStore(String metadataElementGUID, boolean replaceProperties, ElementProperties properties) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException
Update the properties of a specific metadata element. The properties must match the type definition associated with the metadata element when it was created. However, it is possible to update a few properties, or replace all of them by the value used in the replaceProperties flag.- Parameters:
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 element- Throws:
InvalidParameterException- 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 store
-
updateMetadataElementStatusInStore
public abstract void updateMetadataElementStatusInStore(String metadataElementGUID, ElementStatus newElementStatus, Date effectiveFrom, Date effectiveTo) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException
Update the status of specific metadata element. The new status must match a status value that is defined for the element's type assigned when it was created. The effectivity dates control the visibility of the element through specific APIs.- Parameters:
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 deleted- Throws:
InvalidParameterException- 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 store
-
deleteMetadataElementInStore
public abstract void deleteMetadataElementInStore(String metadataElementGUID) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException
Delete a specific metadata element.- Parameters:
metadataElementGUID- unique identifier of the metadata element to update- Throws:
InvalidParameterException- 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 store
-
classifyMetadataElementInStore
public abstract void classifyMetadataElementInStore(String metadataElementGUID, String classificationName, Date effectiveFrom, Date effectiveTo, ElementProperties properties) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException
Add a new classification to the metadata element. Note that only one classification with the same name can be attached to a metadata element.- Parameters:
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 name- Throws:
InvalidParameterException- 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 store
-
reclassifyMetadataElementInStore
public abstract void reclassifyMetadataElementInStore(String metadataElementGUID, String classificationName, boolean replaceProperties, ElementProperties properties) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException
Update the properties of a classification that is currently attached to a specific metadata element.- Parameters:
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 classification- Throws:
InvalidParameterException- 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 store
-
updateClassificationStatusInStore
public abstract void updateClassificationStatusInStore(String metadataElementGUID, String classificationName, Date effectiveFrom, Date effectiveTo) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException
Update the effectivity dates of a specific classification attached to a metadata element. The effectivity dates control the visibility of the classification through specific APIs.- Parameters:
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 deleted- Throws:
InvalidParameterException- 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 store
-
unclassifyMetadataElementInStore
public abstract void unclassifyMetadataElementInStore(String metadataElementGUID, String classificationName) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException
Remove the named classification from a specific metadata element.- Parameters:
metadataElementGUID- unique identifier of the metadata element to updateclassificationName- unique name of the classification to remove- Throws:
InvalidParameterException- 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 store
-
createRelatedElementsInStore
public abstract String createRelatedElementsInStore(String relationshipTypeName, String metadataElement1GUID, String metadataElement2GUID, Date effectiveFrom, Date effectiveTo, ElementProperties properties) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException
Create a relationship between two metadata elements. It is important to put the right element at each end of the relationship according to the type definition since this will affect how the relationship is interpreted.- Parameters:
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 relationship- Returns:
- unique identifier of the new relationship
- Throws:
InvalidParameterException- 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 store
-
updateRelatedElementsInStore
public abstract void updateRelatedElementsInStore(String relationshipGUID, boolean replaceProperties, ElementProperties properties) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException
Update the properties associated with a relationship.- Parameters:
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 relationship- Throws:
InvalidParameterException- 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 store
-
updateRelatedElementsStatusInStore
public abstract void updateRelatedElementsStatusInStore(String relationshipGUID, Date effectiveFrom, Date effectiveTo) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException
Update the effectivity dates of a specific relationship between metadata elements. The effectivity dates control the visibility of the classification through specific APIs.- Parameters:
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 deleted- Throws:
InvalidParameterException- 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 store
-
deleteRelatedElementsInStore
public abstract void deleteRelatedElementsInStore(String relationshipGUID) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException
Delete a relationship between two metadata elements.- Parameters:
relationshipGUID- unique identifier of the relationship to delete- Throws:
InvalidParameterException- 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 store
-
updateActionTargetStatus
public abstract void updateActionTargetStatus(String actionTargetGUID, GovernanceActionStatus status, Date startDate, Date completionDate) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException
Update the status of a specific action target. By default, these values are derived from the values for the governance action service. However, if the governance action service has to process name target elements, then setting the status on each individual target will show the progress of the governance action service.- Parameters:
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.- Throws:
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 store
-
recordCompletionStatus
public abstract void recordCompletionStatus(CompletionStatus status, List<String> outputGuards, Map<String,String> requestParameters, List<NewActionTarget> newActionTargets) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException
Declare that all of the processing for the governance action service is finished and the status of the work.- Parameters:
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 service- Throws:
InvalidParameterException- 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 store
-
initiateGovernanceAction
public 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
Create a governance action in the metadata store which will trigger the governance action service associated with the supplied request type. The governance action remains to act as a record of the actions taken for auditing.- Parameters:
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 service- Returns:
- unique identifier of the governance action
- Throws:
InvalidParameterException- null qualified nameUserNotAuthorizedException- this governance action service is not authorized to create a governance actionPropertyServerException- there is a problem with the metadata store
-
initiateGovernanceActionProcess
public abstract String initiateGovernanceActionProcess(String processQualifiedName, Map<String,String> requestParameters, List<String> requestSourceGUIDs, List<NewActionTarget> actionTargets, Date startTime) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException
Using the named governance action process as a template, initiate a chain of governance actions.- Parameters:
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".- Returns:
- unique identifier of the first governance action of the process
- Throws:
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 store
-
createIncidentReport
public 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
Create an incident report to capture the situation detected by this governance action service. This incident report will be processed by other governance activities.- Parameters:
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 reports- Returns:
- unique identifier of the resulting incident report
- Throws:
InvalidParameterException- 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 store
-
registerListener
public abstract void registerListener(WatchdogGovernanceListener listener, List<WatchdogEventType> interestingEventTypes, List<String> interestingMetadataTypes, String specificInstance) throws InvalidParameterException
Register a listener to receive events about changes to metadata elements in the open metadata store. There can be only one registered listener. If this method is called more than once, the new parameters replace the existing parameters. This means the watchdog governance action service can change the listener and the parameters that control the types of events received while it is running. The types of events passed to the listener are controlled by the combination of the interesting event types and the interesting metadata types. That is an event is only passed to the listener if it matches both the interesting event types and the interesting metadata types. If specific instance, interestingEventTypes or interestingMetadataTypes are null, it defaults to "any". If the listener parameter is null, no more events are passed to the listener.- Parameters:
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 for- Throws:
InvalidParameterException- one or more of the type names are unrecognized
-
disconnectListener
public abstract void disconnectListener()
Unregister the listener from the event infrastructure.
-
-