Class MetadataElementHandler<B>


public class MetadataElementHandler<B> extends ReferenceableHandler<B>
MetadataElementHandler manages MetadataElement objects from the Governance Action Framework (GAF). These objects are 1-1 with an open metadata entity.
  • Constructor Details

    • MetadataElementHandler

      public MetadataElementHandler(OpenMetadataAPIGenericConverter<B> converter, Class<B> beanClass, String serviceName, String serverName, InvalidParameterHandler invalidParameterHandler, RepositoryHandler repositoryHandler, OMRSRepositoryHelper repositoryHelper, String localServerUserId, OpenMetadataServerSecurityVerifier securityVerifier, List<String> supportedZones, List<String> defaultZones, List<String> publishZones, AuditLog auditLog)
      Construct the handler for metadata elements.
      Parameters:
      converter - specific converter for this bean class
      beanClass - name of bean class that is represented by the generic class B
      serviceName - name of this service
      serverName - name of the local server
      invalidParameterHandler - handler for managing parameter errors
      repositoryHandler - manages calls to the repository services
      repositoryHelper - provides utilities for manipulating the repository services objects
      localServerUserId - userId for this server
      securityVerifier - open metadata security services verifier
      supportedZones - list of zones that the access service is allowed to serve Asset instances from.
      defaultZones - list of zones that the access service should set in all new Asset instances.
      publishZones - list of zones that the access service sets up in published Asset instances.
      auditLog - destination for audit log events.
  • Method Details

    • getMetadataElementByGUID

      public B getMetadataElementByGUID(String userId, String elementGUID, boolean forLineage, boolean forDuplicateProcessing, List<String> serviceSupportedZones, Date effectiveTime, String methodName) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException
      Retrieve the metadata element using its unique identifier.
      Parameters:
      userId - caller's userId
      elementGUID - unique identifier for the metadata element
      forLineage - the retrieved element is for lineage processing so include archived elements
      forDuplicateProcessing - the retrieved element is for duplicate processing so do not combine results from known duplicates.
      serviceSupportedZones - list of supported zones for this service
      effectiveTime - only return the element if it is effective at this time. Null means anytime. Use "new Date()" for now.
      methodName - calling method
      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 element
      PropertyServerException - there is a problem accessing the metadata store
    • getMetadataElementByUniqueName

      public B getMetadataElementByUniqueName(String userId, String uniqueName, String uniqueNameParameterName, String uniqueNamePropertyName, boolean forLineage, boolean forDuplicateProcessing, List<String> serviceSupportedZones, Date effectiveTime, String methodName) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException
      Retrieve the metadata element using its unique name (typically the qualified name).
      Parameters:
      userId - caller's userId
      uniqueName - unique name for the metadata element
      uniqueNameParameterName - name of the parameter that passed the unique name (optional)
      uniqueNamePropertyName - name of the property from the open types to use in the lookup
      forLineage - the retrieved element is for lineage processing so include archived elements
      forDuplicateProcessing - the retrieved element is for duplicate processing so do not combine results from known duplicates.
      serviceSupportedZones - list of supported zones for this service
      effectiveTime - only return the element if it is effective at this time. Null means anytime. Use "new Date()" for now.
      methodName - calling method
      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 element
      PropertyServerException - there is a problem accessing the metadata store
    • getMetadataElementGUIDByUniqueName

      public String getMetadataElementGUIDByUniqueName(String userId, String uniqueName, String uniqueNameParameterName, String uniqueNamePropertyName, boolean forLineage, boolean forDuplicateProcessing, List<String> serviceSupportedZones, Date effectiveTime, String methodName) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException
      Retrieve the unique identifier of a metadata element using its unique name (typically the qualified name).
      Parameters:
      userId - caller's userId
      uniqueName - unique name for the metadata element
      uniqueNameParameterName - name of the parameter that passed the unique name (optional)
      uniqueNamePropertyName - name of the property from the open types to use in the lookup
      forLineage - the retrieved element is for lineage processing so include archived elements
      forDuplicateProcessing - the retrieved element is for duplicate processing so do not combine results from known duplicates.
      serviceSupportedZones - list of supported zones for this service
      effectiveTime - only return the element if it is effective at this time. Null means anytime. Use "new Date()" for now.
      methodName - calling method
      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 element
      PropertyServerException - there is a problem accessing the metadata store
    • findMetadataElementsWithString

      public List<B> findMetadataElementsWithString(String userId, String searchString, String typeName, boolean forLineage, boolean forDuplicateProcessing, List<String> serviceSupportedZones, Date effectiveTime, int startFrom, int pageSize, String methodName) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException
      Retrieve the metadata elements that contain the requested string.
      Parameters:
      userId - caller's userId
      searchString - name to retrieve
      typeName - optional type name to restrict search to a specific type of element (and their subtypes)
      forLineage - the retrieved element is for lineage processing so include archived elements
      forDuplicateProcessing - the retrieved element is for duplicate processing so do not combine results from known duplicates.
      serviceSupportedZones - list of supported zones for this service
      effectiveTime - only return the element if it is effective at this time. Null means anytime. Use "new Date()" for now.
      startFrom - paging start point
      pageSize - maximum results that can be returned
      methodName - calling method
      Returns:
      list of matching metadata elements (or null if no elements match the name)
      Throws:
      InvalidParameterException - the qualified name is null
      UserNotAuthorizedException - the governance action service is not able to access the element
      PropertyServerException - there is a problem accessing the metadata store
    • getMetadataElementsByType

      public List<B> getMetadataElementsByType(String userId, String typeName, boolean forLineage, boolean forDuplicateProcessing, List<ElementStatus> limitResultsByStatus, Date asOfTime, String sequencingProperty, SequencingOrder sequencingOrder, List<String> serviceSupportedZones, Date effectiveTime, int startFrom, int pageSize, String methodName) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException
      Retrieve the metadata elements that are of the correct type.
      Parameters:
      userId - caller's userId
      typeName - specific type of element (and their subtypes) to retrieve
      forLineage - the retrieved element is for lineage processing so include archived elements
      forDuplicateProcessing - the retrieved element is for duplicate processing so do not combine results from known duplicates.
      limitResultsByStatus - By default, relationships in all non-DELETED statuses are returned. However, it is possible to specify a list of statuses (eg ACTIVE) to restrict the results to. Null means all status values except DELETED.
      asOfTime - Requests a historical query of the entity. Null means return the present values.
      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.
      serviceSupportedZones - list of supported zones for this service
      effectiveTime - only return the element if it is effective at this time. Null means anytime. Use "new Date()" for now.
      startFrom - paging start point
      pageSize - maximum results that can be returned
      methodName - calling method
      Returns:
      list of matching metadata elements (or null if no elements match the name)
      Throws:
      InvalidParameterException - the qualified name is null
      UserNotAuthorizedException - the governance action service is not able to access the element
      PropertyServerException - there is a problem accessing the metadata store
    • getRelatedMetadataElements

      public List<RelatedMetadataElement> getRelatedMetadataElements(String userId, String elementGUID, int startingAtEnd, String relationshipTypeName, boolean forLineage, boolean forDuplicateProcessing, List<String> serviceSupportedZones, Date effectiveTime, int startFrom, int pageSize, String methodName) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException
      Retrieve the metadata elements connected to the supplied element.
      Parameters:
      userId - caller's userId
      elementGUID - unique identifier for the starting metadata element
      startingAtEnd - 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)
      forLineage - the retrieved element is for lineage processing so include archived elements
      forDuplicateProcessing - the retrieved element is for duplicate processing so do not combine results from known duplicates.
      serviceSupportedZones - list of supported zones for this service
      effectiveTime - only return the element if it is effective at this time. Null means anytime. Use "new Date()" for now.
      startFrom - paging start point
      pageSize - maximum results that can be returned
      methodName - calling method
      Returns:
      list of related elements
      Throws:
      InvalidParameterException - the unique identifier is null or not known; the relationship type is invalid
      UserNotAuthorizedException - the governance action service is not able to access the elements
      PropertyServerException - there is a problem accessing the metadata store
    • getMetadataElementRelationships

      public List<OpenMetadataRelationship> getMetadataElementRelationships(String userId, String metadataElementAtEnd1GUID, String relationshipTypeName, String metadataElementAtEnd2GUID, boolean forLineage, boolean forDuplicateProcessing, List<String> serviceSupportedZones, Date effectiveTime, int startFrom, int pageSize, String methodName) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException
      Retrieve the relationships linking to the supplied elements.
      Parameters:
      userId - caller's userId
      metadataElementAtEnd1GUID - unique identifier of the metadata element at end 1 of the relationship
      metadataElementAtEnd2GUID - unique identifier of the metadata element at end 2 of the relationship
      relationshipTypeName - type name of relationships to follow (or null for all)
      forLineage - the retrieved element is for lineage processing so include archived elements
      forDuplicateProcessing - the retrieved elements are for duplicate processing so do not combine results from known duplicates.
      serviceSupportedZones - list of zones
      effectiveTime - only return an element if it is effective at this time. Null means anytime. Use "new Date()" for now.
      startFrom - paging start point
      pageSize - maximum results that can be returned
      methodName - calling method
      Returns:
      list of related elements
      Throws:
      InvalidParameterException - the unique identifier is null or not known; the relationship type is invalid
      UserNotAuthorizedException - the governance action service is not able to access the elements
      PropertyServerException - there is a problem accessing the metadata store
    • findMetadataElements

      public List<B> findMetadataElements(String userId, String metadataElementTypeName, List<String> metadataElementSubtypeName, SearchProperties searchProperties, List<ElementStatus> limitResultsByStatus, SearchClassifications searchClassifications, Date asOfTime, String sequencingProperty, SequencingOrder sequencingOrder, boolean forLineage, boolean forDuplicateProcessing, List<String> serviceSupportedZones, Date effectiveTime, int startingFrom, int pageSize, String methodName) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException
      Return a list of metadata elements that match the supplied criteria. The results can be returned over many pages.
      Parameters:
      userId - caller's userId
      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 (for example ACTIVE) to restrict the results to. Null means all status values.
      searchClassifications - Optional list of classifications to match.
      asOfTime - Requests a historical query of the entity. Null means return the present values.
      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.
      forLineage - the retrieved element is for lineage processing so include archived elements
      forDuplicateProcessing - the retrieved element is for duplicate processing so do not combine results from known duplicates.
      serviceSupportedZones - list of supported zones for this service
      effectiveTime - only return the element if it is effective at this time. Null means anytime. Use "new Date()" for now.
      startingFrom - paging start point
      pageSize - maximum results that can be returned
      methodName - calling method
      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 is invalid
      UserNotAuthorizedException - the governance action service is not able to access the elements
      PropertyServerException - there is a problem accessing the metadata store
    • findRelationshipsBetweenMetadataElements

      public List<OpenMetadataRelationship> findRelationshipsBetweenMetadataElements(String userId, String relationshipTypeName, SearchProperties searchProperties, List<ElementStatus> limitResultsByStatus, Date asOfTime, String sequencingProperty, SequencingOrder sequencingOrder, boolean forLineage, boolean forDuplicateProcessing, List<String> serviceSupportedZones, Date effectiveTime, int startFrom, int pageSize, String methodName) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException
      Return a list of relationships that match the requested conditions. The results can be received as a series of pages.
      Parameters:
      userId - caller's userId
      relationshipTypeName - relationship's type. Null means all types (but may be slow so not recommended).
      limitResultsByStatus - By default, relationships in all statuses (other than DELETE) are returned. However, it is possible to specify a list of statuses (for example ACTIVE) to restrict the results to. Null means all status values.
      asOfTime - Requests a historical query of the entity. Null means return the present values.
      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.
      forLineage - the retrieved elements are for lineage processing so include archived elements
      forDuplicateProcessing - the retrieved element is for duplicate processing so do not combine results from known duplicates.
      serviceSupportedZones - list of supported zones for this service
      effectiveTime - only return an element if it is effective at this time. Null means anytime. Use "new Date()" for now.
      startFrom - paging start point
      pageSize - maximum results that can be returned
      methodName - calling method
      Returns:
      a list of relationships. Null means no matching relationships.
      Throws:
      InvalidParameterException - one of the search parameters are is invalid
      UserNotAuthorizedException - the governance action service is not able to access the elements
      PropertyServerException - there is a problem accessing the metadata store
    • getRelationshipsByType

      public List<OpenMetadataRelationship> getRelationshipsByType(String userId, String typeName, boolean forLineage, boolean forDuplicateProcessing, List<ElementStatus> limitResultsByStatus, Date asOfTime, String sequencingProperty, SequencingOrder sequencingOrder, List<String> serviceSupportedZones, Date effectiveTime, int startFrom, int pageSize, String methodName) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException
      Retrieve the relationships that are of the correct type.
      Parameters:
      userId - caller's userId
      typeName - specific type of element (and their subtypes) to retrieve
      limitResultsByStatus - By default, relationships in all non-DELETED statuses are returned. However, it is possible to specify a list of statuses (eg ACTIVE) to restrict the results to. Null means all status values except DELETED.
      forLineage - the retrieved element is for lineage processing so include archived elements
      forDuplicateProcessing - the retrieved element is for duplicate processing so do not combine results from known duplicates.
      asOfTime - Requests a historical query of the entity. Null means return the present values.
      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.
      serviceSupportedZones - list of supported zones for this service
      effectiveTime - only return the element if it is effective at this time. Null means anytime. Use "new Date()" for now.
      startFrom - paging start point
      pageSize - maximum results that can be returned
      methodName - calling method
      Returns:
      list of matching metadata elements (or null if no elements match the name)
      Throws:
      InvalidParameterException - the qualified name is null
      UserNotAuthorizedException - the governance action service is not able to access the element
      PropertyServerException - there is a problem accessing the metadata store
    • createMetadataElementInStore

      public String createMetadataElementInStore(String userId, String externalSourceGUID, String externalSourceName, String metadataElementTypeName, ElementStatus initialStatus, Map<String,ElementProperties> initialClassifications, String anchorGUID, boolean isOwnAnchor, Date effectiveFrom, Date effectiveTo, ElementProperties properties, String parentGUID, String parentRelationshipTypeName, ElementProperties parentRelationshipProperties, boolean parentAtEnd1, List<String> serviceSupportedZones, Date effectiveTime, String methodName) 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:
      userId - caller's userId
      externalSourceGUID - unique identifier of the software capability that owns this collection
      externalSourceName - unique name of the software capability that owns this collection
      metadataElementTypeName - type name of the new metadata element
      initialStatus - initial status of the metadata element
      initialClassifications - map of classification names to classification properties to include in the entity creation request
      anchorGUID - unique identifier of the element that should be the anchor for the new element. Set to null if no anchor, or the Anchors classification is included in the initial classifications.
      isOwnAnchor - flag to indicate if the new entity should be anchored to itself
      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
      parentGUID - unique identifier of optional parent entity
      parentRelationshipTypeName - type of relationship to connect the new element to the parent
      parentRelationshipProperties - properties to include in parent relationship
      parentAtEnd1 - which end should the parent GUID go in the relationship
      serviceSupportedZones - list of supported zones for this service
      effectiveTime - the time that the retrieved elements must be effective for
      methodName - calling method
      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
    • createMetadataElementFromTemplate

      public String createMetadataElementFromTemplate(String userId, String externalSourceGUID, String externalSourceName, String suppliedMetadataElementTypeName, String anchorGUID, boolean isOwnAnchor, boolean allowRetrieve, Date effectiveFrom, Date effectiveTo, String templateGUID, ElementProperties templateProperties, Map<String,String> placeholderPropertyValues, String parentGUID, String parentRelationshipTypeName, ElementProperties parentRelationshipProperties, boolean parentAtEnd1, List<String> serviceSupportedZones, Date effectiveTime, String methodName) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException
      Create a new metadata element in the metadata store from a template. 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:
      userId - caller's userId
      externalSourceGUID - unique identifier of the software capability that owns this collection
      externalSourceName - unique name of the software capability that owns this collection
      suppliedMetadataElementTypeName - type name of the new metadata element
      anchorGUID - unique identifier of the element that should be the anchor for the new element. Set to null if no anchor, or the Anchors classification is included in the initial classifications.
      isOwnAnchor - flag to indicate if the new entity should be anchored to itself
      allowRetrieve - can an existing element be returned if it exists
      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
      templateGUID - the unique identifier of the existing asset to copy (this will copy all the attachments such as nested content, schema connection etc.)
      templateProperties - properties of the new metadata element
      placeholderPropertyValues - values to override placeholder variables in the template
      parentGUID - unique identifier of optional parent entity
      parentRelationshipTypeName - type of relationship to connect the new element to the parent
      parentRelationshipProperties - properties to include in parent relationship
      parentAtEnd1 - which end should the parent GUID go in the relationship
      serviceSupportedZones - list of supported zones for this service
      effectiveTime - the time that the retrieved elements must be effective for
      methodName - calling method
      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
    • updateMetadataElementInStore

      public void updateMetadataElementInStore(String userId, String externalSourceGUID, String externalSourceName, String metadataElementGUID, boolean replaceProperties, boolean forLineage, boolean forDuplicateProcessing, ElementProperties properties, List<String> serviceSupportedZones, Date effectiveTime, String methodName) 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:
      userId - caller's userId
      externalSourceGUID - unique identifier of the software capability that owns this collection
      externalSourceName - unique name of the software capability that owns this collection
      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 retrieved elements are for lineage processing so include archived elements
      forDuplicateProcessing - the retrieved element is for duplicate processing so do not combine results from known duplicates.
      properties - new properties for the metadata element
      serviceSupportedZones - list of supported zones for this service
      effectiveTime - only return an element if it is effective at this time. Null means anytime. Use "new Date()" for now.
      methodName - calling method
      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
    • updateMetadataElementStatusInStore

      public void updateMetadataElementStatusInStore(String userId, String externalSourceGUID, String externalSourceName, String metadataElementGUID, ElementStatus newElementStatus, boolean forLineage, boolean forDuplicateProcessing, List<String> serviceSupportedZones, Date effectiveTime, String methodName) 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.
      Parameters:
      userId - caller's userId
      externalSourceGUID - unique identifier of the software capability that owns this collection
      externalSourceName - unique name of the software capability that owns this collection
      metadataElementGUID - unique identifier of the metadata element to update
      newElementStatus - new status value - or null to leave as is
      forLineage - the request is to support lineage retrieval this means entities with the Memento classification can be returned
      forDuplicateProcessing - the request is for duplicate processing and so must not deduplicate
      serviceSupportedZones - list of supported zones for this service
      effectiveTime - the time that the retrieved elements must be effective for (null for any time, new Date() for now)
      methodName - calling method
      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
    • updateMetadataElementEffectivityInStore

      public void updateMetadataElementEffectivityInStore(String userId, String externalSourceGUID, String externalSourceName, String metadataElementGUID, boolean forLineage, boolean forDuplicateProcessing, Date effectiveFrom, Date effectiveTo, List<String> serviceSupportedZones, Date effectiveTime, String methodName) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException
      Update the effectivity dates control the visibility of the element through specific APIs.
      Parameters:
      userId - caller's userId
      externalSourceGUID - unique identifier of the software capability that owns this collection
      externalSourceName - unique name of the software capability that owns this collection
      metadataElementGUID - unique identifier of the metadata element to update
      forLineage - the request is to support lineage retrieval this means entities with the Memento classification can be returned
      forDuplicateProcessing - the request 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
      serviceSupportedZones - list of supported zones for this service
      effectiveTime - the time that the retrieved elements must be effective for (null for any time, new Date() for now)
      methodName - calling method
      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
    • deleteMetadataElementInStore

      public void deleteMetadataElementInStore(String userId, String externalSourceGUID, String externalSourceName, String metadataElementGUID, boolean forLineage, boolean forDuplicateProcessing, List<String> serviceSupportedZones, Date effectiveTime, String methodName) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException
      Delete a specific metadata element.
      Parameters:
      userId - caller's userId
      externalSourceGUID - unique identifier of the software capability that owns this collection
      externalSourceName - unique name of the software capability that owns this collection
      metadataElementGUID - unique identifier of the metadata element to update
      forLineage - the request is to support lineage retrieval this means entities with the Memento classification can be returned
      forDuplicateProcessing - the request is for duplicate processing and so must not deduplicate
      serviceSupportedZones - list of supported zones for this service
      effectiveTime - the time that the retrieved elements must be effective for (null for any time, new Date() for now)
      methodName - calling method
      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
    • archiveMetadataElementInStore

      public void archiveMetadataElementInStore(String userId, String externalSourceGUID, String externalSourceName, String metadataElementGUID, ArchiveProperties archiveProperties, boolean forLineage, boolean forDuplicateProcessing, List<String> serviceSupportedZones, Date effectiveTime, String methodName) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException
      Archive a specific metadata element.
      Parameters:
      userId - caller's userId
      externalSourceGUID - unique identifier of the software capability that owns this collection
      externalSourceName - unique name of the software capability that owns this collection
      metadataElementGUID - unique identifier of the metadata element to update
      archiveProperties - description of the archiving process
      forLineage - the request is to support lineage retrieval this means entities with the Memento classification can be returned
      forDuplicateProcessing - the request is for duplicate processing and so must not deduplicate
      serviceSupportedZones - list of supported zones for this service
      effectiveTime - the time that the retrieved elements must be effective for (null for any time, new Date() for now)
      methodName - calling method
      Throws:
      InvalidParameterException - the unique identifier is null or invalid in some way
      UserNotAuthorizedException - the governance action service is not authorized to archive this element
      PropertyServerException - there is a problem with the metadata store
    • classifyMetadataElementInStore

      public void classifyMetadataElementInStore(String userId, String externalSourceGUID, String externalSourceName, String metadataElementGUID, String classificationName, boolean forLineage, boolean forDuplicateProcessing, Date effectiveFrom, Date effectiveTo, ElementProperties properties, List<String> serviceSupportedZones, Date effectiveTime, String methodName) 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:
      userId - caller's userId
      externalSourceGUID - unique identifier of the software capability that owns this collection
      externalSourceName - unique name of the software capability that owns this collection
      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)
      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
      forLineage - the request is to support lineage retrieval this means entities with the Memento classification can be returned
      forDuplicateProcessing - the request is for duplicate processing and so must not deduplicate
      serviceSupportedZones - list of supported zones for this service
      effectiveTime - the time that the retrieved elements must be effective for (null for any time, new Date() for now)
      methodName - calling method
      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
    • reclassifyMetadataElementInStore

      public void reclassifyMetadataElementInStore(String userId, String externalSourceGUID, String externalSourceName, String metadataElementGUID, String classificationName, boolean replaceProperties, boolean forLineage, boolean forDuplicateProcessing, ElementProperties properties, List<String> serviceSupportedZones, Date effectiveTime, String methodName) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException
      Update the properties of a classification that is currently attached to a specific metadata element.
      Parameters:
      userId - caller's userId
      externalSourceGUID - unique identifier of the software capability that owns this collection
      externalSourceName - unique name of the software capability that owns this collection
      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.
      properties - new properties for the classification
      forLineage - the query is to support lineage retrieval
      forDuplicateProcessing - the query is for duplicate processing and so must not deduplicate
      serviceSupportedZones - list of supported zones for this service
      effectiveTime - the time that the retrieved elements must be effective for (null for any time, new Date() for now)
      methodName - calling method
      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
    • updateClassificationStatusInStore

      public void updateClassificationStatusInStore(String userId, String externalSourceGUID, String externalSourceName, String metadataElementGUID, String classificationName, boolean forLineage, boolean forDuplicateProcessing, Date effectiveFrom, Date effectiveTo, List<String> serviceSupportedZones, Date effectiveTime, String methodName) 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:
      userId - caller's userId
      externalSourceGUID - unique identifier of the software capability that owns this collection
      externalSourceName - unique name of the software capability that owns this collection
      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
      serviceSupportedZones - list of supported zones for this service
      effectiveTime - the time that the retrieved elements must be effective for (null for any time, new Date() for now)
      methodName - calling method
      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
    • declassifyMetadataElementInStore

      public void declassifyMetadataElementInStore(String userId, String externalSourceGUID, String externalSourceName, String metadataElementGUID, String metadataElementGUIDParameterName, String metadataElementTypeName, String classificationName, boolean forLineage, boolean forDuplicateProcessing, List<String> serviceSupportedZones, Date effectiveTime, String methodName) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException
      Remove the named classification from a specific metadata element.
      Parameters:
      userId - caller's userId
      externalSourceGUID - unique identifier of the software capability that owns this collection
      externalSourceName - unique name of the software capability that owns this collection
      metadataElementGUID - unique identifier of the metadata element to update
      metadataElementGUIDParameterName - name of parameter for GUID
      metadataElementTypeName - type of the metadata element
      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
      serviceSupportedZones - list of supported zones for this service
      effectiveTime - the time that the retrieved elements must be effective for (null for any time, new Date() for now)
      methodName - calling method
      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
    • createRelatedElementsInStore

      public String createRelatedElementsInStore(String userId, String externalSourceGUID, String externalSourceName, String relationshipTypeName, String metadataElement1GUID, String metadataElement2GUID, boolean forLineage, boolean forDuplicateProcessing, Date effectiveFrom, Date effectiveTo, ElementProperties properties, List<String> serviceSupportedZones, Date effectiveTime, String methodName) 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:
      userId - caller's userId
      externalSourceGUID - unique identifier of the software capability that owns this collection
      externalSourceName - unique name of the software capability that owns this collection
      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
      serviceSupportedZones - list of supported zones for this service
      effectiveTime - the time that the retrieved elements must be effective for (null for any time, new Date() for now)
      methodName - calling method
      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
    • getElementPropertiesAsOMRSMap

      public Map<String,InstancePropertyValue> getElementPropertiesAsOMRSMap(ElementProperties properties) throws InvalidParameterException
      Convert an element properties object into a map.
      Parameters:
      properties - packed properties
      Returns:
      properties stored in Java map
      Throws:
      InvalidParameterException - the properties are invalid in some way
    • updateRelatedElementsInStore

      public void updateRelatedElementsInStore(String userId, String externalSourceGUID, String externalSourceName, String relationshipGUID, boolean replaceProperties, boolean forLineage, boolean forDuplicateProcessing, ElementProperties properties, List<String> serviceSupportedZones, Date effectiveTime, String methodName) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException
      Update the properties associated with a relationship.
      Parameters:
      userId - caller's userId
      externalSourceGUID - unique identifier of the software capability that owns this collection
      externalSourceName - unique name of the software capability that owns this collection
      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.
      properties - new properties for the relationship
      forLineage - return elements marked with the Memento classification?
      forDuplicateProcessing - do not merge elements marked as duplicates?
      serviceSupportedZones - list of supported zones for this service
      effectiveTime - optional date for effective time of the query. Null means any effective time
      methodName - calling method
      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
    • updateRelatedElementsStatusInStore

      public void updateRelatedElementsStatusInStore(String userId, String externalSourceGUID, String externalSourceName, String relationshipGUID, Date effectiveFrom, Date effectiveTo, boolean forLineage, boolean forDuplicateProcessing, List<String> serviceSupportedZones, Date effectiveTime, String methodName) 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:
      userId - caller's userId
      externalSourceGUID - unique identifier of the software capability that owns this collection
      externalSourceName - unique name of the software capability that owns this collection
      relationshipGUID - unique identifier of the relationship to update
      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
      forLineage - return elements marked with the Memento classification?
      forDuplicateProcessing - do not merge elements marked as duplicates?
      serviceSupportedZones - list of supported zones for this service
      effectiveTime - the time that the retrieved elements must be effective for
      methodName - calling method
      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
    • deleteRelatedElementsInStore

      public void deleteRelatedElementsInStore(String userId, String externalSourceGUID, String externalSourceName, String relationshipGUID, boolean forLineage, boolean forDuplicateProcessing, List<String> serviceSupportedZones, Date effectiveTime, String methodName) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException
      Delete a relationship between two metadata elements.
      Parameters:
      userId - caller's userId
      externalSourceGUID - unique identifier of the software capability that owns this collection
      externalSourceName - unique name of the software capability that owns this collection
      relationshipGUID - unique identifier of the relationship to delete
      forLineage - return elements marked with the Memento classification?
      forDuplicateProcessing - do not merge elements marked as duplicates?
      serviceSupportedZones - list of supported zones for this service
      effectiveTime - the time that the retrieved elements must be effective for (null for any time, new Date() for now)
      methodName - calling method
      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