Interface RemediationGovernanceContext

All Superinterfaces:
GovernanceContext
All Known Implementing Classes:
GovernanceActionContext

public interface RemediationGovernanceContext extends GovernanceContext
RemediationGovernanceContext provides access to the remediation request along with access to the metadata store and APIs to enable changes to a wide range of metadata elements. A remediation service is typically making updates to the actionTargetElements. It may use information from the requestSourceElements to make the changes. For example, a remediation service that is correcting the schema elements for an asset element could find the asset to update in the actionTargetElements and maybe the schema elements in error. The requestSourceElements could then have the schema annotations created by a discovery service. These would guide the
  • Method Details

    • createMetadataElement

      String createMetadataElement(String metadataElementTypeName, ElementProperties properties) 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 metadata element will be given an initial status of ACTIVE which is sufficient for most types of elements.
      Parameters:
      metadataElementTypeName - type name of the new metadata element
      properties - properties of the new metadata element
      Returns:
      unique identifier of the new metadata element
      Throws:
      InvalidParameterException - the type name, status or one of the properties is invalid
      UserNotAuthorizedException - the governance action service is not authorized to create this type of element
      PropertyServerException - there is a problem with the metadata store
    • createMetadataElement

      String createMetadataElement(String metadataElementTypeName, ElementStatus initialStatus, Date effectiveFrom, Date effectiveTo, ElementProperties properties) 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 element
      initialStatus - initial status of the metadata element
      effectiveFrom - the date when this element is active - null for active on creation
      effectiveTo - the date when this element becomes inactive - null for active until deleted
      properties - properties of the new metadata element
      Returns:
      unique identifier of the new metadata element
      Throws:
      InvalidParameterException - the type name, status or one of the properties is invalid
      UserNotAuthorizedException - the governance action service is not authorized to create this type of element
      PropertyServerException - there is a problem with the metadata store
    • updateMetadataElement

      void updateMetadataElement(String metadataElementGUID, boolean replaceProperties, boolean forLineage, boolean forDuplicateProcessing, ElementProperties properties, Date effectiveTime) 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 them by the value used in the replaceProperties flag.
      Parameters:
      metadataElementGUID - unique identifier of the metadata element to update
      replaceProperties - flag to indicate whether to completely replace the existing properties with the new properties, or just update the individual properties specified on the request.
      forLineage - the query is to support lineage retrieval
      forDuplicateProcessing - the query is for duplicate processing and so must not deduplicate
      properties - new properties for the metadata element
      effectiveTime - the time that the retrieved elements must be effective for (null for any time, new Date() for now)
      Throws:
      InvalidParameterException - either the unique identifier or the properties are invalid in some way
      UserNotAuthorizedException - the governance action service is not authorized to update this element
      PropertyServerException - there is a problem with the metadata store
    • updateMetadataElementStatus

      void updateMetadataElementStatus(String metadataElementGUID, boolean forLineage, boolean forDuplicateProcessing, ElementStatus newElementStatus, Date effectiveTime) 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 update
      forLineage - the query is to support lineage retrieval
      forDuplicateProcessing - the query is for duplicate processing and so must not deduplicate
      newElementStatus - new status value - or null to leave as is
      effectiveTime - the time that the retrieved elements must be effective for (null for any time, new Date() for now)
      Throws:
      InvalidParameterException - either the unique identifier or the status are invalid in some way
      UserNotAuthorizedException - the governance action service is not authorized to update this element
      PropertyServerException - there is a problem with the metadata store
    • updateMetadataElementEffectivity

      void updateMetadataElementEffectivity(String metadataElementGUID, boolean forLineage, boolean forDuplicateProcessing, Date effectiveFrom, Date effectiveTo, Date effectiveTime) 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 update
      forLineage - the query is to support lineage retrieval
      forDuplicateProcessing - the query is for duplicate processing and so must not deduplicate
      effectiveFrom - the date when this element is active - null for active now
      effectiveTo - the date when this element becomes inactive - null for active until deleted
      effectiveTime - the time that the retrieved elements must be effective for (null for any time, new Date() for now)
      Throws:
      InvalidParameterException - either the unique identifier or the status are invalid in some way
      UserNotAuthorizedException - the governance action service is not authorized to update this element
      PropertyServerException - there is a problem with the metadata store
    • deleteMetadataElement

      void deleteMetadataElement(String metadataElementGUID, boolean forLineage, boolean forDuplicateProcessing, Date effectiveTime) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException
      Delete a specific metadata element.
      Parameters:
      metadataElementGUID - unique identifier of the metadata element to update
      forLineage - the query is to support lineage retrieval
      forDuplicateProcessing - the query is for duplicate processing and so must not deduplicate
      effectiveTime - the time that the retrieved elements must be effective for (null for any time, new Date() for now)
      Throws:
      InvalidParameterException - the unique identifier is null or invalid in some way
      UserNotAuthorizedException - the governance action service is not authorized to delete this element
      PropertyServerException - there is a problem with the metadata store
    • classifyMetadataElement

      void classifyMetadataElement(String metadataElementGUID, String classificationName, boolean forLineage, boolean forDuplicateProcessing, ElementProperties properties, Date effectiveTime) 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 update
      classificationName - name of the classification to add (if the classification is already present then use reclassify)
      forLineage - the query is to support lineage retrieval
      forDuplicateProcessing - the query is for duplicate processing and so must not deduplicate
      properties - properties to store in the new classification. These must conform to the valid properties associated with the classification name
      effectiveTime - the time that the retrieved elements must be effective for (null for any time, new Date() for now)
      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 definition
      UserNotAuthorizedException - the governance action service is not authorized to update this element
      PropertyServerException - there is a problem with the metadata store
    • classifyMetadataElement

      void classifyMetadataElement(String metadataElementGUID, String classificationName, boolean forLineage, boolean forDuplicateProcessing, Date effectiveFrom, Date effectiveTo, ElementProperties properties, Date effectiveTime) 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 update
      classificationName - name of the classification to add (if the classification is already present then use reclassify)
      forLineage - the query is to support lineage retrieval
      forDuplicateProcessing - the query is for duplicate processing and so must not deduplicate
      effectiveFrom - the date when this classification is active - null for active now
      effectiveTo - the date when this classification becomes inactive - null for active until deleted
      properties - properties to store in the new classification. These must conform to the valid properties associated with the classification name
      effectiveTime - the time that the retrieved elements must be effective for (null for any time, new Date() for now)
      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 definition
      UserNotAuthorizedException - the governance action service is not authorized to update this element
      PropertyServerException - there is a problem with the metadata store
    • reclassifyMetadataElement

      void reclassifyMetadataElement(String metadataElementGUID, String classificationName, boolean replaceProperties, boolean forLineage, boolean forDuplicateProcessing, ElementProperties properties, Date effectiveTime) 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 update
      classificationName - unique name of the classification to update
      replaceProperties - flag to indicate whether to completely replace the existing properties with the new properties, or just update the individual properties specified on the request.
      forLineage - the query is to support lineage retrieval
      forDuplicateProcessing - the query is for duplicate processing and so must not deduplicate
      properties - new properties for the classification
      effectiveTime - the time that the retrieved elements must be effective for (null for any time, new Date() for now)
      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 definition
      UserNotAuthorizedException - the governance action service is not authorized to update this element/classification
      PropertyServerException - there is a problem with the metadata store
    • updateClassificationStatus

      void updateClassificationStatus(String metadataElementGUID, String classificationName, boolean forLineage, boolean forDuplicateProcessing, Date effectiveFrom, Date effectiveTo, Date effectiveTime) 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 update
      classificationName - unique name of the classification to update
      forLineage - the query is to support lineage retrieval
      forDuplicateProcessing - the query is for duplicate processing and so must not deduplicate
      effectiveFrom - the date when this element is active - null for active now
      effectiveTo - the date when this element becomes inactive - null for active until deleted
      effectiveTime - the time that the retrieved elements must be effective for (null for any time, new Date() for now)
      Throws:
      InvalidParameterException - either the unique identifier or the status are invalid in some way
      UserNotAuthorizedException - the governance action service is not authorized to update this element
      PropertyServerException - there is a problem with the metadata store
    • declassifyMetadataElement

      void declassifyMetadataElement(String metadataElementGUID, String classificationName, boolean forLineage, boolean forDuplicateProcessing, Date effectiveTime) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException
      Remove the named classification from a specific metadata element.
      Parameters:
      metadataElementGUID - unique identifier of the metadata element to update
      classificationName - unique name of the classification to remove
      forLineage - the query is to support lineage retrieval
      forDuplicateProcessing - the query is for duplicate processing and so must not deduplicate
      effectiveTime - the time that the retrieved elements must be effective for (null for any time, new Date() for now)
      Throws:
      InvalidParameterException - the unique identifier or classification name is null or invalid in some way
      UserNotAuthorizedException - the governance action service is not authorized to remove this classification
      PropertyServerException - there is a problem with the metadata store
    • createRelatedElements

      String createRelatedElements(String relationshipTypeName, String metadataElement1GUID, String metadataElement2GUID, boolean forLineage, boolean forDuplicateProcessing, ElementProperties properties, Date effectiveTime) 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 relationship
      metadataElement2GUID - unique identifier of the metadata element at end 2 of the relationship
      forLineage - the query is to support lineage retrieval
      forDuplicateProcessing - the query is for duplicate processing and so must not deduplicate
      properties - the properties of the relationship
      effectiveTime - the time that the retrieved elements must be effective for (null for any time, new Date() for now)
      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 relationship
      UserNotAuthorizedException - the governance action service is not authorized to create this type of relationship
      PropertyServerException - there is a problem with the metadata store
    • createRelatedElements

      String createRelatedElements(String relationshipTypeName, String metadataElement1GUID, String metadataElement2GUID, boolean forLineage, boolean forDuplicateProcessing, Date effectiveFrom, Date effectiveTo, ElementProperties properties, Date effectiveTime) 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 relationship
      metadataElement2GUID - unique identifier of the metadata element at end 2 of the relationship
      forLineage - the query is to support lineage retrieval
      forDuplicateProcessing - the query is for duplicate processing and so must not deduplicate
      effectiveFrom - the date when this element is active - null for active now
      effectiveTo - the date when this element becomes inactive - null for active until deleted
      properties - the properties of the relationship
      effectiveTime - the time that the retrieved elements must be effective for (null for any time, new Date() for now)
      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 relationship
      UserNotAuthorizedException - the governance action service is not authorized to create this type of relationship
      PropertyServerException - there is a problem with the metadata store
    • updateRelatedElements

      void updateRelatedElements(String relationshipGUID, boolean replaceProperties, boolean forLineage, boolean forDuplicateProcessing, ElementProperties properties, Date effectiveTime) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException
      Update the properties associated with a relationship.
      Parameters:
      relationshipGUID - unique identifier of the relationship to update
      replaceProperties - flag to indicate whether to completely replace the existing properties with the new properties, or just update the individual properties specified on the request.
      forLineage - the query is to support lineage retrieval
      forDuplicateProcessing - the query is for duplicate processing and so must not deduplicate
      properties - new properties for the classification
      effectiveTime - the time that the retrieved elements must be effective for (null for any time, new Date() for now)
      Throws:
      InvalidParameterException - the unique identifier of the relationship is null or invalid in some way; the properties are not valid for this type of relationship
      UserNotAuthorizedException - the governance action service is not authorized to update this relationship
      PropertyServerException - there is a problem with the metadata store
    • updateRelatedElementsStatus

      void updateRelatedElementsStatus(String relationshipGUID, boolean forLineage, boolean forDuplicateProcessing, Date effectiveFrom, Date effectiveTo, Date effectiveTime) 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 update
      forLineage - the query is to support lineage retrieval
      forDuplicateProcessing - the query is for duplicate processing and so must not deduplicate
      effectiveFrom - the date when this element is active - null for active now
      effectiveTo - the date when this element becomes inactive - null for active until deleted
      effectiveTime - the time that the retrieved elements must be effective for (null for any time, new Date() for now)
      Throws:
      InvalidParameterException - either the unique identifier or the status are invalid in some way
      UserNotAuthorizedException - the governance action service is not authorized to update this element
      PropertyServerException - there is a problem with the metadata store
    • deleteRelatedElements

      void deleteRelatedElements(String relationshipGUID, boolean forLineage, boolean forDuplicateProcessing, Date effectiveTime) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException
      Delete a relationship between two metadata elements.
      Parameters:
      relationshipGUID - unique identifier of the relationship to delete
      forLineage - the query is to support lineage retrieval
      forDuplicateProcessing - the query is for duplicate processing and so must not deduplicate
      effectiveTime - the time that the retrieved elements must be effective for (null for any time, new Date() for now)
      Throws:
      InvalidParameterException - the unique identifier of the relationship is null or invalid in some way
      UserNotAuthorizedException - the governance action service is not authorized to delete this relationship
      PropertyServerException - there is a problem with the metadata store
    • linkElementsAsPeerDuplicates

      void linkElementsAsPeerDuplicates(String metadataElement1GUID, String metadataElement2GUID, int statusIdentifier, String steward, String stewardTypeName, String stewardPropertyName, String source, String notes, boolean setKnownDuplicate) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException
      Link elements as peer duplicates. Create a simple relationship between two elements. If the relationship already exists, the properties are updated.
      Parameters:
      metadataElement1GUID - unique identifier of the metadata element at end 1 of the relationship
      metadataElement2GUID - unique identifier of the metadata element at end 2 of the relationship
      statusIdentifier - what is the status of this relationship (negative means untrusted, 0 means unverified and positive means trusted)
      steward - identifier of the steward
      stewardTypeName - type of element used to identify the steward
      stewardPropertyName - property name used to identify steward
      source - source of the duplicate detection processing
      notes - notes for the steward
      setKnownDuplicate - boolean flag indicating whether the KnownDuplicate classification should be set on the linked entities.
      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 relationship
      UserNotAuthorizedException - the governance action service is not authorized to create this type of relationship
      PropertyServerException - there is a problem with the metadata store
    • linkConsolidatedDuplicate

      void linkConsolidatedDuplicate(String consolidatedElementGUID, int statusIdentifier, String steward, String stewardTypeName, String stewardPropertyName, String source, String notes, List<String> sourceElementGUIDs) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException
      Identify an element that acts as a consolidated version for a set of duplicate elements. (The consolidated element is created using createMetadataElement.) Creates a simple relationship between the elements. If the ConsolidatedDuplicate classification already exists, the properties are updated.
      Parameters:
      consolidatedElementGUID - unique identifier of the metadata element
      statusIdentifier - what is the status of this relationship (negative means untrusted, 0 means unverified and positive means trusted)
      steward - identifier of the steward
      stewardTypeName - type of element used to identify the steward
      stewardPropertyName - property name used to identify steward
      source - source of the duplicate detection processing
      notes - notes for the steward
      sourceElementGUIDs - List of the source elements that must be linked to the consolidated element. It is assumed that they already have the KnownDuplicateClassification.
      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 relationship
      UserNotAuthorizedException - the governance action service is not authorized to create this type of relationship
      PropertyServerException - there is a problem with the metadata store