Class DataAssetManagerClient

    • Constructor Summary

      Constructors 
      Constructor Description
      DataAssetManagerClient​(java.lang.String serverName, java.lang.String serverPlatformURLRoot)
      Create a new client with no authentication embedded in the HTTP request.
      DataAssetManagerClient​(java.lang.String serverName, java.lang.String serverPlatformURLRoot, java.lang.String userId, java.lang.String password)
      Create a new client that passes userId and password in each HTTP request.
      DataAssetManagerClient​(java.lang.String serverName, java.lang.String serverPlatformURLRoot, java.lang.String userId, java.lang.String password, AuditLog auditLog)
      Create a new client that passes userId and password in each HTTP request.
      DataAssetManagerClient​(java.lang.String serverName, java.lang.String serverPlatformURLRoot, ITInfrastructureRESTClient restClient, int maxPageSize)
      Create a new client that is going to be used in an OMAG Server.
      DataAssetManagerClient​(java.lang.String serverName, java.lang.String serverPlatformURLRoot, AuditLog auditLog)
      Create a new client with no authentication embedded in the HTTP request.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void clearDataAssetAsReferenceData​(java.lang.String userId, java.lang.String infrastructureManagerGUID, java.lang.String infrastructureManagerName, java.lang.String assetGUID, java.util.Date effectiveTime)
      Remove the reference data designation from the asset.
      java.lang.String createDataAsset​(java.lang.String userId, java.lang.String infrastructureManagerGUID, java.lang.String infrastructureManagerName, boolean infrastructureManagerIsHome, DataAssetProperties dataAssetProperties)
      Create a new metadata element to represent the root of an asset.
      java.lang.String createDataAssetFromTemplate​(java.lang.String userId, java.lang.String infrastructureManagerGUID, java.lang.String infrastructureManagerName, boolean infrastructureManagerIsHome, java.lang.String templateGUID, TemplateProperties templateProperties)
      Create a new metadata element to represent an asset using an existing metadata element as a template.
      java.util.List<DataAssetElement> findDataAssets​(java.lang.String userId, java.lang.String searchString, java.util.Date effectiveTime, int startFrom, int pageSize)
      Retrieve the list of asset metadata elements that contain the search string.
      DataAssetElement getDataAssetByGUID​(java.lang.String userId, java.lang.String guid)
      Retrieve the asset metadata element with the supplied unique identifier.
      java.util.List<DataAssetElement> getDataAssetsByName​(java.lang.String userId, java.lang.String name, java.util.Date effectiveTime, int startFrom, int pageSize)
      Retrieve the list of asset metadata elements with a matching qualified or display name.
      java.util.List<DataAssetElement> getDataAssetsForInfrastructureManager​(java.lang.String userId, java.lang.String infrastructureManagerGUID, java.lang.String infrastructureManagerName, java.util.Date effectiveTime, int startFrom, int pageSize)
      Retrieve the list of assets created on behalf of the named infrastructure manager.
      void publishDataAsset​(java.lang.String userId, java.lang.String assetGUID)
      Update the zones for the asset so that it becomes visible to consumers.
      void removeDataAsset​(java.lang.String userId, java.lang.String infrastructureManagerGUID, java.lang.String infrastructureManagerName, java.lang.String assetGUID)
      Remove the metadata element representing an asset.
      void setDataAssetAsReferenceData​(java.lang.String userId, java.lang.String infrastructureManagerGUID, java.lang.String infrastructureManagerName, java.lang.String assetGUID, java.util.Date effectiveFrom, java.util.Date effectiveTo)
      Classify the asset to indicate that it can be used as reference data.
      void updateDataAsset​(java.lang.String userId, java.lang.String infrastructureManagerGUID, java.lang.String infrastructureManagerName, java.lang.String assetGUID, boolean isMergeUpdate, DataAssetProperties dataAssetProperties)
      Update the metadata element representing an asset.
      void withdrawDataAsset​(java.lang.String userId, java.lang.String assetGUID)
      Update the zones for the asset so that it is no longer visible to consumers.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • DataAssetManagerClient

        public DataAssetManagerClient​(java.lang.String serverName,
                                      java.lang.String serverPlatformURLRoot,
                                      AuditLog auditLog)
                               throws InvalidParameterException
        Create a new client with no authentication embedded in the HTTP request.
        Parameters:
        serverName - name of the server to connect to
        serverPlatformURLRoot - the network address of the server running the OMAS REST servers
        auditLog - logging destination
        Throws:
        InvalidParameterException - there is a problem creating the client-side components to issue any REST API calls.
      • DataAssetManagerClient

        public DataAssetManagerClient​(java.lang.String serverName,
                                      java.lang.String serverPlatformURLRoot)
                               throws InvalidParameterException
        Create a new client with no authentication embedded in the HTTP request.
        Parameters:
        serverName - name of the server to connect to
        serverPlatformURLRoot - the network address of the server running the OMAS REST servers
        Throws:
        InvalidParameterException - there is a problem creating the client-side components to issue any REST API calls.
      • DataAssetManagerClient

        public DataAssetManagerClient​(java.lang.String serverName,
                                      java.lang.String serverPlatformURLRoot,
                                      java.lang.String userId,
                                      java.lang.String password)
                               throws InvalidParameterException
        Create a new client that passes userId and password in each HTTP request. This is the userId/password of the calling server. The end user's userId is sent on each request.
        Parameters:
        serverName - name of the server to connect to
        serverPlatformURLRoot - the network address of the server running the OMAS REST servers
        userId - caller's userId embedded in all HTTP requests
        password - caller's userId embedded in all HTTP requests
        Throws:
        InvalidParameterException - there is a problem creating the client-side components to issue any REST API calls.
      • DataAssetManagerClient

        public DataAssetManagerClient​(java.lang.String serverName,
                                      java.lang.String serverPlatformURLRoot,
                                      java.lang.String userId,
                                      java.lang.String password,
                                      AuditLog auditLog)
                               throws InvalidParameterException
        Create a new client that passes userId and password in each HTTP request. This is the userId/password of the calling server. The end user's userId is sent on each request.
        Parameters:
        serverName - name of the server to connect to
        serverPlatformURLRoot - the network address of the server running the OMAS REST servers
        userId - caller's userId embedded in all HTTP requests
        password - caller's userId embedded in all HTTP requests
        auditLog - logging destination
        Throws:
        InvalidParameterException - there is a problem creating the client-side components to issue any REST API calls.
      • DataAssetManagerClient

        public DataAssetManagerClient​(java.lang.String serverName,
                                      java.lang.String serverPlatformURLRoot,
                                      ITInfrastructureRESTClient restClient,
                                      int maxPageSize)
                               throws InvalidParameterException
        Create a new client that is going to be used in an OMAG Server.
        Parameters:
        serverName - name of the server to connect to
        serverPlatformURLRoot - the network address of the server running the OMAS REST servers
        restClient - client that issues the REST API calls
        maxPageSize - maximum number of results supported by this server
        Throws:
        InvalidParameterException - there is a problem creating the client-side components to issue any REST API calls.
    • Method Detail

      • createDataAsset

        public java.lang.String createDataAsset​(java.lang.String userId,
                                                java.lang.String infrastructureManagerGUID,
                                                java.lang.String infrastructureManagerName,
                                                boolean infrastructureManagerIsHome,
                                                DataAssetProperties dataAssetProperties)
                                         throws InvalidParameterException,
                                                UserNotAuthorizedException,
                                                PropertyServerException
        Create a new metadata element to represent the root of an asset.
        Specified by:
        createDataAsset in interface DataAssetManagerInterface
        Parameters:
        userId - calling user
        infrastructureManagerGUID - unique identifier of software server capability representing the caller
        infrastructureManagerName - unique name of software server capability representing the caller
        infrastructureManagerIsHome - ensure that only the infrastructure manager can update this asset
        dataAssetProperties - 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 java.lang.String createDataAssetFromTemplate​(java.lang.String userId,
                                                            java.lang.String infrastructureManagerGUID,
                                                            java.lang.String infrastructureManagerName,
                                                            boolean infrastructureManagerIsHome,
                                                            java.lang.String templateGUID,
                                                            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.
        Specified by:
        createDataAssetFromTemplate in interface DataAssetManagerInterface
        Parameters:
        userId - calling user
        infrastructureManagerGUID - unique identifier of software server capability representing the caller
        infrastructureManagerName - unique name of software server capability representing the caller
        infrastructureManagerIsHome - ensure that only the infrastructure manager can update this asset
        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​(java.lang.String userId,
                                    java.lang.String infrastructureManagerGUID,
                                    java.lang.String infrastructureManagerName,
                                    java.lang.String assetGUID,
                                    boolean isMergeUpdate,
                                    DataAssetProperties dataAssetProperties)
                             throws InvalidParameterException,
                                    UserNotAuthorizedException,
                                    PropertyServerException
        Update the metadata element representing an asset.
        Specified by:
        updateDataAsset in interface DataAssetManagerInterface
        Parameters:
        userId - calling user
        infrastructureManagerGUID - unique identifier of software server capability representing the caller
        infrastructureManagerName - unique name of software server capability representing the caller
        assetGUID - unique identifier of the metadata element to update
        isMergeUpdate - should the new properties be merged with existing properties (true) or completely replace them (false)?
        dataAssetProperties - 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)
      • setDataAssetAsReferenceData

        public void setDataAssetAsReferenceData​(java.lang.String userId,
                                                java.lang.String infrastructureManagerGUID,
                                                java.lang.String infrastructureManagerName,
                                                java.lang.String assetGUID,
                                                java.util.Date effectiveFrom,
                                                java.util.Date effectiveTo)
                                         throws InvalidParameterException,
                                                UserNotAuthorizedException,
                                                PropertyServerException
        Classify the asset to indicate that it can be used as reference data.
        Specified by:
        setDataAssetAsReferenceData in interface DataAssetManagerInterface
        Parameters:
        userId - calling user
        infrastructureManagerGUID - unique identifier of software server capability representing the caller
        infrastructureManagerName - unique name of software server capability representing the caller
        assetGUID - unique identifier of the metadata element to update
        effectiveFrom - when should classification be effective - null means immediately
        effectiveTo - when should classification no longer be effective - null means never
        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​(java.lang.String userId,
                                                  java.lang.String infrastructureManagerGUID,
                                                  java.lang.String infrastructureManagerName,
                                                  java.lang.String assetGUID,
                                                  java.util.Date effectiveTime)
                                           throws InvalidParameterException,
                                                  UserNotAuthorizedException,
                                                  PropertyServerException
        Remove the reference data designation from the asset.
        Specified by:
        clearDataAssetAsReferenceData in interface DataAssetManagerInterface
        Parameters:
        userId - calling user
        infrastructureManagerGUID - unique identifier of software server capability representing the caller
        infrastructureManagerName - unique name of software server capability representing the caller
        assetGUID - unique identifier of the metadata element to update
        effectiveTime - time when the classification is effective
        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​(java.lang.String userId,
                                    java.lang.String infrastructureManagerGUID,
                                    java.lang.String infrastructureManagerName,
                                    java.lang.String assetGUID)
                             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.
        Specified by:
        removeDataAsset in interface DataAssetManagerInterface
        Parameters:
        userId - calling user
        infrastructureManagerGUID - unique identifier of software server capability representing the caller
        infrastructureManagerName - unique name of software server capability representing the caller
        assetGUID - unique identifier of the metadata element to remove
        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)
      • getDataAssetsForInfrastructureManager

        public java.util.List<DataAssetElement> getDataAssetsForInfrastructureManager​(java.lang.String userId,
                                                                                      java.lang.String infrastructureManagerGUID,
                                                                                      java.lang.String infrastructureManagerName,
                                                                                      java.util.Date effectiveTime,
                                                                                      int startFrom,
                                                                                      int pageSize)
                                                                               throws InvalidParameterException,
                                                                                      UserNotAuthorizedException,
                                                                                      PropertyServerException
        Retrieve the list of assets created on behalf of the named infrastructure manager.
        Specified by:
        getDataAssetsForInfrastructureManager in interface DataAssetManagerInterface
        Parameters:
        userId - calling user
        infrastructureManagerGUID - unique identifier of software server capability representing the caller
        infrastructureManagerName - unique name of software server capability representing the caller
        effectiveTime - effective time for the query
        startFrom - paging start point
        pageSize - maximum results that can be returned
        Returns:
        list of matching metadata elements
        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)