Class DiscoveryAssetStoreClient

java.lang.Object
org.odpi.openmetadata.frameworks.discovery.DiscoveryAssetStore
org.odpi.openmetadata.accessservices.discoveryengine.client.DiscoveryAssetStoreClient

public class DiscoveryAssetStoreClient extends org.odpi.openmetadata.frameworks.discovery.DiscoveryAssetStore
DiscoveryAssetStoreClient provides the client-side library for the Open Discovery Framework (ODF)'s Discovery Asset Store that provides a Discovery service with access to the connector for the asset to be discovered. From the connector, the Discovery service is able to extract the known properties about the asset and access its data. An instance of this client is created for each discovery service instance that runs. This is why the REST client is passed in on the constructor (since creating a new RestTemplate object is very expensive).
  • Field Summary

    Fields inherited from class org.odpi.openmetadata.frameworks.discovery.DiscoveryAssetStore

    assetConnection, assetGUID, userId
  • Constructor Summary

    Constructors
    Constructor
    Description
    DiscoveryAssetStoreClient(String assetGUID, String userId, DiscoveryEngineClient discoveryEngineClient)
    Constructor sets up the key parameters for accessing the asset store.
  • Method Summary

    Modifier and Type
    Method
    Description
    org.odpi.openmetadata.frameworks.connectors.properties.AssetUniverse
    Returns a comprehensive collection of properties about the requested asset.
    protected org.odpi.openmetadata.frameworks.connectors.properties.beans.Connection
    Return the connection information for the asset.
    org.odpi.openmetadata.frameworks.connectors.Connector
    getConnectorByConnection(org.odpi.openmetadata.frameworks.connectors.properties.beans.Connection connection)
    Returns the connector corresponding to the supplied connection.
    void
    logAssetAuditMessage(String discoveryService, String message)
    Log an audit message about this asset.

    Methods inherited from class org.odpi.openmetadata.frameworks.discovery.DiscoveryAssetStore

    getAssetGUID, getConnectorToAsset

    Methods inherited from class java.lang.Object

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

    • DiscoveryAssetStoreClient

      public DiscoveryAssetStoreClient(String assetGUID, String userId, DiscoveryEngineClient discoveryEngineClient)
      Constructor sets up the key parameters for accessing the asset store.
      Parameters:
      userId - calling user
      assetGUID - unique identifier of the asset that the annotations should be attached to
      discoveryEngineClient - client for calling REST APIs
  • Method Details

    • getConnectionForAsset

      protected org.odpi.openmetadata.frameworks.connectors.properties.beans.Connection getConnectionForAsset() throws org.odpi.openmetadata.frameworks.connectors.ffdc.InvalidParameterException, org.odpi.openmetadata.frameworks.connectors.ffdc.UserNotAuthorizedException, org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException
      Return the connection information for the asset. This is used to create the connector. The connector is an Open Connector Framework (OCF) connector that provides access to the asset's data and metadata properties.
      Specified by:
      getConnectionForAsset in class org.odpi.openmetadata.frameworks.discovery.DiscoveryAssetStore
      Returns:
      Connection bean
      Throws:
      org.odpi.openmetadata.frameworks.connectors.ffdc.InvalidParameterException - the asset guid is not recognized
      org.odpi.openmetadata.frameworks.connectors.ffdc.UserNotAuthorizedException - the user is not authorized to access the asset and/or connection
      org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException - there was a problem in the store whether the asset/connection properties are kept.
    • getConnectorByConnection

      public org.odpi.openmetadata.frameworks.connectors.Connector getConnectorByConnection(org.odpi.openmetadata.frameworks.connectors.properties.beans.Connection connection) throws org.odpi.openmetadata.frameworks.connectors.ffdc.InvalidParameterException, org.odpi.openmetadata.frameworks.connectors.ffdc.ConnectionCheckedException, org.odpi.openmetadata.frameworks.connectors.ffdc.ConnectorCheckedException
      Returns the connector corresponding to the supplied connection.
      Specified by:
      getConnectorByConnection in class org.odpi.openmetadata.frameworks.discovery.DiscoveryAssetStore
      Parameters:
      connection - the connection object that contains the properties needed to create the connection.
      Returns:
      Connector connector instance
      Throws:
      org.odpi.openmetadata.frameworks.connectors.ffdc.InvalidParameterException - one of the parameters is null or invalid.
      org.odpi.openmetadata.frameworks.connectors.ffdc.ConnectionCheckedException - there are errors in the configuration of the connection which is preventing the creation of a connector.
      org.odpi.openmetadata.frameworks.connectors.ffdc.ConnectorCheckedException - there are errors in the initialization of the connector.
    • getAssetProperties

      public org.odpi.openmetadata.frameworks.connectors.properties.AssetUniverse getAssetProperties() throws org.odpi.openmetadata.frameworks.connectors.ffdc.InvalidParameterException, org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException, org.odpi.openmetadata.frameworks.connectors.ffdc.UserNotAuthorizedException
      Returns a comprehensive collection of properties about the requested asset.
      Specified by:
      getAssetProperties in class org.odpi.openmetadata.frameworks.discovery.DiscoveryAssetStore
      Returns:
      a comprehensive collection of properties about the asset.
      Throws:
      org.odpi.openmetadata.frameworks.connectors.ffdc.InvalidParameterException - one of the parameters is null or invalid.
      org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException - there is a problem retrieving the asset properties from the property servers).
      org.odpi.openmetadata.frameworks.connectors.ffdc.UserNotAuthorizedException - the requesting user is not authorized to issue this request.
    • logAssetAuditMessage

      public void logAssetAuditMessage(String discoveryService, String message) throws org.odpi.openmetadata.frameworks.connectors.ffdc.InvalidParameterException, org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException, org.odpi.openmetadata.frameworks.connectors.ffdc.UserNotAuthorizedException
      Log an audit message about this asset.
      Specified by:
      logAssetAuditMessage in class org.odpi.openmetadata.frameworks.discovery.DiscoveryAssetStore
      Parameters:
      discoveryService - name of discovery service
      message - message to log
      Throws:
      org.odpi.openmetadata.frameworks.connectors.ffdc.InvalidParameterException - one of the parameters is null or invalid.
      org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException - there is a problem retrieving the asset properties from the property servers).
      org.odpi.openmetadata.frameworks.connectors.ffdc.UserNotAuthorizedException - the requesting user is not authorized to issue this request.