Class DataAssetExchangeService


  • public class DataAssetExchangeService
    extends SchemaExchangeService
    DataAssetExchangeService is the context for managing data assets and associated elements such as schemas.
    • Method Detail

      • createDataAsset

        public String createDataAsset​(boolean assetManagerIsHome,
                                      String assetExternalIdentifier,
                                      String assetExternalIdentifierName,
                                      String assetExternalIdentifierUsage,
                                      KeyPattern assetExternalIdentifierKeyPattern,
                                      Map<String,​String> mappingProperties,
                                      DataAssetProperties assetProperties)
                               throws InvalidParameterException,
                                      UserNotAuthorizedException,
                                      PropertyServerException
        Create a new metadata element to represent the root of an asset.
        Parameters:
        assetManagerIsHome - ensure that only the asset manager can update this asset
        assetExternalIdentifier - unique identifier of the asset in the external asset manager
        assetExternalIdentifierName - name of property for the external identifier in the external asset manager
        assetExternalIdentifierUsage - optional usage description for the external identifier when calling the external asset manager
        assetExternalIdentifierKeyPattern - pattern for the external identifier within the external asset manager (default is LOCAL_KEY)
        mappingProperties - additional properties to help with the mapping of the elements in the external asset manager and open metadata
        assetProperties - properties to store
        Returns:
        unique identifier of the new metadata element
        Throws:
        InvalidParameterException - one of the parameters is invalid
        UserNotAuthorizedException - the user is not authorized to issue this request
        PropertyServerException - there is a problem reported in the open metadata server(s)
      • createDataAssetFromTemplate

        public String createDataAssetFromTemplate​(boolean assetManagerIsHome,
                                                  String templateGUID,
                                                  String assetExternalIdentifier,
                                                  String assetExternalIdentifierName,
                                                  String assetExternalIdentifierUsage,
                                                  KeyPattern assetExternalIdentifierKeyPattern,
                                                  Map<String,​String> mappingProperties,
                                                  TemplateProperties templateProperties)
                                           throws InvalidParameterException,
                                                  UserNotAuthorizedException,
                                                  PropertyServerException
        Create a new metadata element to represent an asset using an existing metadata element as a template. The template defines additional classifications and relationships that should be added to the new asset.
        Parameters:
        assetManagerIsHome - ensure that only the asset manager can update this process
        assetExternalIdentifier - unique identifier of the asset in the external asset manager
        assetExternalIdentifierName - name of property for the external identifier in the external asset manager
        assetExternalIdentifierUsage - optional usage description for the external identifier when calling the external asset manager
        assetExternalIdentifierKeyPattern - pattern for the external identifier within the external asset manager (default is LOCAL_KEY)
        mappingProperties - additional properties to help with the mapping of the elements in the external asset manager and open metadata
        templateGUID - unique identifier of the metadata element to copy
        templateProperties - properties that override the template
        Returns:
        unique identifier of the new metadata element
        Throws:
        InvalidParameterException - one of the parameters is invalid
        UserNotAuthorizedException - the user is not authorized to issue this request
        PropertyServerException - there is a problem reported in the open metadata server(s)
      • updateDataAsset

        public void updateDataAsset​(String userId,
                                    String assetManagerGUID,
                                    String assetManagerName,
                                    String assetGUID,
                                    String assetExternalIdentifier,
                                    boolean isMergeUpdate,
                                    DataAssetProperties assetProperties)
                             throws InvalidParameterException,
                                    UserNotAuthorizedException,
                                    PropertyServerException
        Update the metadata element representing an asset.
        Parameters:
        userId - calling user
        assetManagerGUID - unique identifier of software server capability representing the caller
        assetManagerName - unique name of software server capability representing the caller
        assetGUID - unique identifier of the metadata element to update
        assetExternalIdentifier - unique identifier of the asset in the external asset manager
        isMergeUpdate - should the new properties be merged with existing properties (true) or completely replace them (false)?
        assetProperties - new properties for this element
        Throws:
        InvalidParameterException - one of the parameters is invalid
        UserNotAuthorizedException - the user is not authorized to issue this request
        PropertyServerException - there is a problem reported in the open metadata server(s)
      • removeDataAsset

        public void removeDataAsset​(String userId,
                                    String assetManagerGUID,
                                    String assetManagerName,
                                    String assetGUID,
                                    String assetExternalIdentifier)
                             throws InvalidParameterException,
                                    UserNotAuthorizedException,
                                    PropertyServerException
        Remove the metadata element representing an asset. This will delete the asset and all anchored elements such as schema and comments.
        Parameters:
        userId - calling user
        assetManagerGUID - unique identifier of software server capability representing the caller
        assetManagerName - unique name of software server capability representing the caller
        assetGUID - unique identifier of the metadata element to remove
        assetExternalIdentifier - unique identifier of the asset in the external asset manager
        Throws:
        InvalidParameterException - one of the parameters is invalid
        UserNotAuthorizedException - the user is not authorized to issue this request
        PropertyServerException - there is a problem reported in the open metadata server(s)
      • setDataAssetAsReferenceData

        public void setDataAssetAsReferenceData​(String userId,
                                                String assetManagerGUID,
                                                String assetManagerName,
                                                String assetGUID,
                                                String assetExternalIdentifier)
                                         throws InvalidParameterException,
                                                UserNotAuthorizedException,
                                                PropertyServerException
        Classify the asset to indicate that it can be used as reference data.
        Parameters:
        userId - calling user
        assetManagerGUID - unique identifier of software server capability representing the caller
        assetManagerName - unique name of software server capability representing the caller
        assetGUID - unique identifier of the metadata element to update
        assetExternalIdentifier - unique identifier of the asset in the external asset manager
        Throws:
        InvalidParameterException - one of the parameters is invalid
        UserNotAuthorizedException - the user is not authorized to issue this request
        PropertyServerException - there is a problem reported in the open metadata server(s)
      • clearDataAssetAsReferenceData

        public void clearDataAssetAsReferenceData​(String userId,
                                                  String assetManagerGUID,
                                                  String assetManagerName,
                                                  String assetGUID,
                                                  String assetExternalIdentifier)
                                           throws InvalidParameterException,
                                                  UserNotAuthorizedException,
                                                  PropertyServerException
        Remove the reference data designation from the asset.
        Parameters:
        userId - calling user
        assetManagerGUID - unique identifier of software server capability representing the caller
        assetManagerName - unique name of software server capability representing the caller
        assetGUID - unique identifier of the metadata element to update
        assetExternalIdentifier - unique identifier of the asset in the external asset manager
        Throws:
        InvalidParameterException - one of the parameters is invalid
        UserNotAuthorizedException - the user is not authorized to issue this request
        PropertyServerException - there is a problem reported in the open metadata server(s)