Class OpenMetadataGovernanceService
java.lang.Object
org.odpi.openmetadata.integrationservices.catalog.connector.OpenMetadataGovernanceService
OpenMetadataGovernanceService provides services for invoking metadata governance services in Egeria.
-
Method Summary
Modifier and TypeMethodDescriptionvoid
clearTranslation
(String elementGUID, String language, String locale) Remove the translation for a particular language/locale for a metadata element.void
clearValidMetadataMapName
(String typeName, String propertyName, String preferredValue) Remove a valid map name value for a property.void
clearValidMetadataMapValue
(String typeName, String propertyName, String mapName, String preferredValue) Remove a valid map name value for a property.void
clearValidMetadataValue
(String typeName, String propertyName, String preferredValue) Remove a valid value for a property.createIncidentReport
(String qualifiedName, int domainIdentifier, String background, List<IncidentImpactedElement> impactedResources, List<IncidentDependency> previousIncidents, Map<String, Integer> incidentClassifiers, Map<String, String> additionalProperties, String originatorGUID) Create an incident report to capture the situation detected by this governance action service.getTranslation
(String elementGUID, String language, String locale) Retrieve the translation for the matching language/locale.getTranslations
(String elementGUID, int startFrom, int pageSize) Retrieve all translations associated with a metadata element.getValidMetadataMapName
(String typeName, String propertyName, String preferredValue) Retrieve details of a specific valid name for a map property.getValidMetadataMapValue
(String typeName, String propertyName, String mapName, String preferredValue) Retrieve details of a specific valid value for a map name.getValidMetadataValue
(String typeName, String propertyName, String preferredValue) Retrieve details of a specific valid value for a property.getValidMetadataValues
(String typeName, String propertyName, int startFrom, int pageSize) Retrieve all the valid values for the requested property.openToDo
(String qualifiedName, String title, String instructions, String todoCategory, int priority, Date dueDate, Map<String, String> additionalProperties, String assignTo, String sponsorGUID, List<NewActionTarget> actionTargets) Create a "To Do" request for someone to work on.registerContextEvent
(String anchorGUID, Map<String, DependentContextEventProperties> parentContextEvents, Map<String, DependentContextEventProperties> childContextEvents, Map<String, RelatedContextEventProperties> relatedContextEvents, Map<String, ContextEventImpactProperties> impactedElements, Map<String, RelationshipProperties> effectedDataResourceGUIDs, Map<String, RelationshipProperties> contextEventEvidenceGUIDs, ContextEventProperties contextEventProperties) Create a new context eventvoid
setTranslation
(String elementGUID, TranslationDetail translationDetail) Create or update the translation for a particular language/locale for a metadata element.void
setUpValidMetadataMapName
(String typeName, String propertyName, ValidMetadataValue validMetadataValue) Create or update the valid value for a name that can be stored in a particular open metadata property name.void
setUpValidMetadataMapValue
(String typeName, String propertyName, String mapName, ValidMetadataValue validMetadataValue) Create or update the valid value for a name that can be stored in a particular open metadata property name.void
setUpValidMetadataValue
(String typeName, String propertyName, ValidMetadataValue validMetadataValue) Create or update the valid value for a particular open metadata property name.boolean
validateMetadataMapName
(String typeName, String propertyName, String actualValue) Validate whether the name found in an open metadata map property is valid.boolean
validateMetadataMapValue
(String typeName, String propertyName, String mapName, String actualValue) Validate whether the name found in an open metadata map property is valid.boolean
validateMetadataValue
(String typeName, String propertyName, String actualValue) Validate whether the value found in an open metadata property is valid.
-
Method Details
-
createIncidentReport
public String createIncidentReport(String qualifiedName, int domainIdentifier, String background, List<IncidentImpactedElement> impactedResources, List<IncidentDependency> previousIncidents, Map<String, Integer> incidentClassifiers, Map<String, throws InvalidParameterException, UserNotAuthorizedException, PropertyServerExceptionString> additionalProperties, String originatorGUID) 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 reportsoriginatorGUID
- the unique identifier of the person or process that created the incident- 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 an incident reportPropertyServerException
- there is a problem with the metadata store
-
openToDo
public String openToDo(String qualifiedName, String title, String instructions, String todoCategory, int priority, Date dueDate, Map<String, String> additionalProperties, String assignTo, String sponsorGUID, List<NewActionTarget> actionTargets) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerExceptionCreate a "To Do" request for someone to work on.- Parameters:
qualifiedName
- unique name for the to do. (Could be the engine name and a guid?)title
- short meaningful phrase for the person receiving the requestinstructions
- further details on what to dotodoCategory
- a category of to dos (for example, "data error", "access request")priority
- priority value (based on organization's scale)dueDate
- date/time this needs to be completedadditionalProperties
- additional arbitrary properties for the incident reportsassignTo
- qualified name of the Actor element for the recipientsponsorGUID
- unique identifier of the element that describes the rule, project that this is on behalf ofactionTargets
- the list of elements that should be acted upon- Returns:
- unique identifier of new to do element
- Throws:
InvalidParameterException
- either todoQualifiedName or assignedTo are null or not recognizedUserNotAuthorizedException
- the governance action service is not authorized to create a "to do" entityPropertyServerException
- there is a problem connecting to (or inside) the metadata store
-
registerContextEvent
public String registerContextEvent(String anchorGUID, Map<String, DependentContextEventProperties> parentContextEvents, Map<String, throws InvalidParameterException, UserNotAuthorizedException, PropertyServerExceptionDependentContextEventProperties> childContextEvents, Map<String, RelatedContextEventProperties> relatedContextEvents, Map<String, ContextEventImpactProperties> impactedElements, Map<String, RelationshipProperties> effectedDataResourceGUIDs, Map<String, RelationshipProperties> contextEventEvidenceGUIDs, ContextEventProperties contextEventProperties) Create a new context event- Parameters:
anchorGUID
- unique identifier for the context event's anchor elementparentContextEvents
- which context events should be linked as parents (guid->relationship properties)childContextEvents
- which context events should be linked as children (guid->relationship properties)relatedContextEvents
- which context events should be linked as related (guid->relationship properties)impactedElements
- which elements are impacted by this context event (guid->relationship properties)effectedDataResourceGUIDs
- which data resources are effected by this context event (asset guid->relationship properties)contextEventEvidenceGUIDs
- which elements provide evidence that the context event is happening (element GUIDs)contextEventProperties
- properties for the context event itself- Returns:
- guid of the new context event
- Throws:
InvalidParameterException
- one of the properties are invalidUserNotAuthorizedException
- the userId is not permitted to perform this operationPropertyServerException
- there is a problem connecting to (or inside) the metadata store
-
setTranslation
public void setTranslation(String elementGUID, TranslationDetail translationDetail) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException Create or update the translation for a particular language/locale for a metadata element.- Parameters:
elementGUID
- unique identifier of the element that this translation is related totranslationDetail
- properties of the translation- Throws:
InvalidParameterException
- the unique identifier is null or not known.UserNotAuthorizedException
- the service is not able to access the elementPropertyServerException
- there is a problem accessing the metadata store
-
clearTranslation
public void clearTranslation(String elementGUID, String language, String locale) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException Remove the translation for a particular language/locale for a metadata element.- Parameters:
elementGUID
- unique identifier of the element that this translation is related tolanguage
- language requestedlocale
- optional locale to qualify which translation if there are multiple translations for the language.- Throws:
InvalidParameterException
- the language is null or not known or not unique (add locale)UserNotAuthorizedException
- the service is not able to access the elementPropertyServerException
- there is a problem accessing the metadata store
-
getTranslation
public TranslationDetail getTranslation(String elementGUID, String language, String locale) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException Retrieve the translation for the matching language/locale.- Parameters:
elementGUID
- unique identifier of the element that this translation is related tolanguage
- language requestedlocale
- optional locale to qualify which translation if there are multiple translations for the language.- Returns:
- the properties of the translation or null if there is none
- Throws:
InvalidParameterException
- the unique identifier is null or not known.UserNotAuthorizedException
- the service is not able to access the elementPropertyServerException
- there is a problem accessing the metadata store
-
getTranslations
public List<TranslationDetail> getTranslations(String elementGUID, int startFrom, int pageSize) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException Retrieve all translations associated with a metadata element.- Parameters:
elementGUID
- unique identifier of the element that this translation is related tostartFrom
- index of the list to start from (0 for start)pageSize
- maximum number of elements to return- Returns:
- list of translation properties or null if there are none
- Throws:
InvalidParameterException
- the unique identifier is null or not known.UserNotAuthorizedException
- the service is not able to access the elementPropertyServerException
- there is a problem accessing the metadata store
-
setUpValidMetadataValue
public void setUpValidMetadataValue(String typeName, String propertyName, ValidMetadataValue validMetadataValue) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException Create or update the valid value for a particular open metadata property name. If the typeName is null, this valid value applies to properties of this name from all types. The valid value is stored in the preferredValue property. If a valid value is already set up for this property (with overlapping effective dates) then the valid value is updated.- Parameters:
typeName
- type name if this is valid value is specific for a type, or null if this valid value if for the property name for all typespropertyName
- name of property that this valid value appliesvalidMetadataValue
- preferred value to use in the open metadata types plus additional descriptive values.- Throws:
InvalidParameterException
- the property name is null or not known.UserNotAuthorizedException
- the service is not able to create/access the elementPropertyServerException
- there is a problem accessing the metadata store
-
setUpValidMetadataMapName
public void setUpValidMetadataMapName(String typeName, String propertyName, ValidMetadataValue validMetadataValue) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException Create or update the valid value for a name that can be stored in a particular open metadata property name. This property is of type map from name to string. The valid value is stored in the preferredValue property of validMetadataValue. If the typeName is null, this valid value applies to properties of this name from any open metadata type. If a valid value is already set up for this property (with overlapping effective dates) then the valid value is updated.- Parameters:
typeName
- type name if this is valid value is specific for a type, or null if this valid value if for the property name for all typespropertyName
- name of property that this valid value appliesvalidMetadataValue
- preferred value to use in the open metadata types plus additional descriptive values.- Throws:
InvalidParameterException
- the property name is null or not known.UserNotAuthorizedException
- the service is not able to create/access the elementPropertyServerException
- there is a problem accessing the metadata store
-
setUpValidMetadataMapValue
public void setUpValidMetadataMapValue(String typeName, String propertyName, String mapName, ValidMetadataValue validMetadataValue) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException Create or update the valid value for a name that can be stored in a particular open metadata property name. This property is of type map from name to string. The valid value is stored in the preferredValue property of validMetadataValue. If the typeName is null, this valid value applies to properties of this name from any open metadata type. If a valid value is already set up for this property (with overlapping effective dates) then the valid value is updated.- Parameters:
typeName
- type name if this is valid value is specific for a type, or null if this valid value if for the property name for all typespropertyName
- name of property that this valid value appliesmapName
- name in the map that this valid value applies. If null then the value can be used for any name in the map.validMetadataValue
- preferred value to use in the open metadata types plus additional descriptive values.- Throws:
InvalidParameterException
- the property name is null or not known.UserNotAuthorizedException
- the service is not able to create/access the elementPropertyServerException
- there is a problem accessing the metadata store
-
clearValidMetadataValue
public void clearValidMetadataValue(String typeName, String propertyName, String preferredValue) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException Remove a valid value for a property.- Parameters:
typeName
- type name if this is valid value is specific for a type, or null if this valid value if for the property name for all typespropertyName
- name of property that this valid value appliespreferredValue
- specific valid value to remove- Throws:
InvalidParameterException
- the property name is null or not known.UserNotAuthorizedException
- the service is not able to create/access the elementPropertyServerException
- there is a problem accessing the metadata store
-
clearValidMetadataMapName
public void clearValidMetadataMapName(String typeName, String propertyName, String preferredValue) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException Remove a valid map name value for a property. The match is done on preferred name.- Parameters:
typeName
- type name if this is valid value is specific for a type, or null if this valid value if for the property name for all typespropertyName
- name of property that this valid value appliespreferredValue
- specific valid value to remove- Throws:
InvalidParameterException
- the property name is null or not known.UserNotAuthorizedException
- the service is not able to create/access the elementPropertyServerException
- there is a problem accessing the metadata store
-
clearValidMetadataMapValue
public void clearValidMetadataMapValue(String typeName, String propertyName, String mapName, String preferredValue) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException Remove a valid map name value for a property. The match is done on preferred name.- Parameters:
typeName
- type name if this is valid value is specific for a type, or null if this valid value if for the property name for all typespropertyName
- name of property that this valid value appliesmapName
- name in the map that this valid value applies. If null then the value can be used for any name in the map.preferredValue
- specific valid value to remove- Throws:
InvalidParameterException
- the property name is null or not known.UserNotAuthorizedException
- the service is not able to create/access the elementPropertyServerException
- there is a problem accessing the metadata store
-
validateMetadataValue
public boolean validateMetadataValue(String typeName, String propertyName, String actualValue) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException Validate whether the value found in an open metadata property is valid.- Parameters:
typeName
- type name if this is valid value is specific for a type, or null if this valid value if for the property name for all typespropertyName
- name of property that this valid value appliesactualValue
- value stored in the property - if this is null, true is only returned if null is set up as a valid value.- Returns:
- boolean flag - true if the value is one of the defined valid values or there are no valid values set up for the property (and so any value is value).
- Throws:
InvalidParameterException
- the property name is null or not known.UserNotAuthorizedException
- the service is not able to create/access the elementPropertyServerException
- there is a problem accessing the metadata store
-
validateMetadataMapName
public boolean validateMetadataMapName(String typeName, String propertyName, String actualValue) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException Validate whether the name found in an open metadata map property is valid.- Parameters:
typeName
- type name if this is valid value is specific for a type, or null if this valid value if for the property name for all typespropertyName
- name of property that this valid value appliesactualValue
- value stored in the property - if this is null, true is only returned if null is set up as a valid value.- Returns:
- boolean flag - true if the value is one of the defined valid values or there are no valid values set up for the property (and so any value is value).
- Throws:
InvalidParameterException
- the property name is null or not known.UserNotAuthorizedException
- the service is not able to create/access the elementPropertyServerException
- there is a problem accessing the metadata store
-
validateMetadataMapValue
public boolean validateMetadataMapValue(String typeName, String propertyName, String mapName, String actualValue) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException Validate whether the name found in an open metadata map property is valid.- Parameters:
typeName
- type name if this is valid value is specific for a type, or null if this valid value if for the property name for all typespropertyName
- name of property that this valid value appliesmapName
- name in the map that this valid value applies. If null then the value can be used for any name in the map.actualValue
- value stored in the property - if this is null, true is only returned if null is set up as a valid value.- Returns:
- boolean flag - true if the value is one of the defined valid values or there are no valid values set up for the property (and so any value is value).
- Throws:
InvalidParameterException
- the property name is null or not known.UserNotAuthorizedException
- the service is not able to create/access the elementPropertyServerException
- there is a problem accessing the metadata store
-
getValidMetadataValue
public ValidMetadataValue getValidMetadataValue(String typeName, String propertyName, String preferredValue) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException Retrieve details of a specific valid value for a property.- Parameters:
typeName
- type name if this is valid value is specific for a type, or null if this valid value if for the property name for all typespropertyName
- name of property that this valid value appliespreferredValue
- valid value to match- Returns:
- specific valid value definition or none if there is no definition stored
- Throws:
InvalidParameterException
- the property name is null or not known.UserNotAuthorizedException
- the service is not able to create/access the elementPropertyServerException
- there is a problem accessing the metadata store
-
getValidMetadataMapName
public ValidMetadataValue getValidMetadataMapName(String typeName, String propertyName, String preferredValue) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException Retrieve details of a specific valid name for a map property.- Parameters:
typeName
- type name if this is valid value is specific for a type, or null if this valid value if for the property name for all typespropertyName
- name of property that this valid value appliespreferredValue
- valid value to match- Returns:
- specific valid value definition or none if there is no definition stored
- Throws:
InvalidParameterException
- the property name is null or not known.UserNotAuthorizedException
- the service is not able to create/access the elementPropertyServerException
- there is a problem accessing the metadata store
-
getValidMetadataMapValue
public ValidMetadataValue getValidMetadataMapValue(String typeName, String propertyName, String mapName, String preferredValue) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException Retrieve details of a specific valid value for a map name.- Parameters:
typeName
- type name if this is valid value is specific for a type, or null if this valid value if for the property name for all typespropertyName
- name of property that this valid value appliesmapName
- name in the map that this valid value applies. If null then the value can be used for any name in the map.preferredValue
- valid value to match- Returns:
- specific valid value definition or none if there is no definition stored
- Throws:
InvalidParameterException
- the property name is null or not known.UserNotAuthorizedException
- the service is not able to create/access the elementPropertyServerException
- there is a problem accessing the metadata store
-
getValidMetadataValues
public List<ValidMetadataValueDetail> getValidMetadataValues(String typeName, String propertyName, int startFrom, int pageSize) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException Retrieve all the valid values for the requested property.- Parameters:
typeName
- type name if this is valid value is specific for a type, or null if this valid value if for the property name for all typespropertyName
- name of property that this valid value appliesstartFrom
- paging start pointpageSize
- maximum results that can be returned- Returns:
- list of valid values defined for the property
- Throws:
InvalidParameterException
- the property name is null or not known.UserNotAuthorizedException
- the service is not able to create/access the elementPropertyServerException
- there is a problem accessing the metadata store
-