Class ConnectionExchangeService

java.lang.Object
org.odpi.openmetadata.integrationservices.catalog.connector.ConnectionExchangeService

public class ConnectionExchangeService extends Object
ConnectionExchangeService is the context for managing connections and associated elements such as connector types and endpoints.
  • Method Details

    • isForLineage

      public boolean isForLineage()
      Return whether retrieval requests from this service are to include elements with the Memento classification attached or not.
      Returns:
      boolean flag
    • setForLineage

      public void setForLineage(boolean forLineage)
      Set up whether retrieval requests from this service are to include elements with the Memento classification attached or not.
      Parameters:
      forLineage - boolean flag
    • createConnection

      public String createConnection(boolean externalSourceIsHome, ExternalIdentifierProperties externalIdentifierProperties, ConnectionProperties connectionProperties) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException
      Create a new metadata element to represent the root of a connection.
      Parameters:
      externalSourceIsHome - ensure that only the external source can update this connection
      externalIdentifierProperties - optional properties used to define an external identifier
      connectionProperties - 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)
    • createConnectionFromTemplate

      public String createConnectionFromTemplate(boolean externalSourceIsHome, String templateGUID, ExternalIdentifierProperties externalIdentifierProperties, TemplateProperties templateProperties) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException
      Create a new metadata element to represent a connection using an existing metadata element as a template. The template defines additional classifications and relationships that should be added to the new connection.
      Parameters:
      externalSourceIsHome - ensure that only the external source can update this process
      externalIdentifierProperties - optional properties used to define an external identifier
      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)
    • updateConnection

      public void updateConnection(String connectionGUID, String connectionExternalIdentifier, boolean isMergeUpdate, ConnectionProperties connectionProperties, Date effectiveTime) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException
      Update the metadata element representing an connection.
      Parameters:
      connectionGUID - unique identifier of the metadata element to update
      connectionExternalIdentifier - unique identifier of the connection in the external source
      isMergeUpdate - should the new properties be merged with existing properties (true) or completely replace them (false)?
      connectionProperties - new properties for this element
      effectiveTime - optional date for effective time of the query. Null means any effective time
      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)
    • setupConnectorType

      public void setupConnectorType(boolean externalSourceIsHome, String connectionGUID, String connectorTypeGUID, Date effectiveFrom, Date effectiveTo, Date effectiveTime) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException
      Create a relationship between a connection and a connector type.
      Parameters:
      externalSourceIsHome - ensure that only the asset manager can update this relationship
      connectionGUID - unique identifier of the connection in the external asset manager
      connectorTypeGUID - unique identifier of the connector type in the external asset manager
      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 - optional date for effective time of the query. Null means any effective time
      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)
    • clearConnectorType

      public void clearConnectorType(String connectionGUID, String connectorTypeGUID, Date effectiveTime) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException
      Remove a relationship between a connection and a connector type.
      Parameters:
      connectionGUID - unique identifier of the connection in the external asset manager
      connectorTypeGUID - unique identifier of the connector type in the external asset manager
      effectiveTime - optional date for effective time of the query. Null means any effective time
      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)
    • setupEndpoint

      public void setupEndpoint(boolean externalSourceIsHome, String connectionGUID, String endpointGUID, Date effectiveFrom, Date effectiveTo, Date effectiveTime) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException
      Create a relationship between a connection and an endpoint.
      Parameters:
      externalSourceIsHome - ensure that only the asset manager can update this relationship
      connectionGUID - unique identifier of the connection in the external asset manager
      endpointGUID - unique identifier of the endpoint in the external asset manager
      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 - optional date for effective time of the query. Null means any effective time
      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)
    • clearEndpoint

      public void clearEndpoint(String connectionGUID, String endpointGUID, Date effectiveTime) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException
      Remove a relationship between a connection and an endpoint.
      Parameters:
      connectionGUID - unique identifier of the connection in the external asset manager
      endpointGUID - unique identifier of the endpoint in the external asset manager
      effectiveTime - optional date for effective time of the query. Null means any effective time
      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)
    • setupEmbeddedConnection

      public void setupEmbeddedConnection(boolean externalSourceIsHome, String connectionGUID, String embeddedConnectionGUID, EmbeddedConnectionProperties properties, Date effectiveTime) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException
      Create a relationship between a virtual connection and an embedded connection.
      Parameters:
      externalSourceIsHome - ensure that only the asset manager can update this relationship
      connectionGUID - unique identifier of the virtual connection in the external asset manager
      embeddedConnectionGUID - unique identifier of the embedded connection in the external asset manager
      properties - properties describing how to use the embedded connection such as: Which order should this connection be processed; What additional properties should be passed to the embedded connector via the configuration properties; What does this connector signify?
      effectiveTime - optional date for effective time of the query. Null means any effective time
      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)
    • clearEmbeddedConnection

      public void clearEmbeddedConnection(String connectionGUID, String embeddedConnectionGUID, Date effectiveTime) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException
      Remove a relationship between a virtual connection and an embedded connection.
      Parameters:
      connectionGUID - unique identifier of the virtual connection in the external asset manager
      embeddedConnectionGUID - unique identifier of the embedded connection in the external asset manager
      effectiveTime - optional date for effective time of the query. Null means any effective time
      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)
    • setupAssetConnection

      public void setupAssetConnection(boolean externalSourceIsHome, String assetGUID, String connectionGUID, AssetConnectionProperties properties, Date effectiveTime) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException
      Create a relationship between an asset and its connection.
      Parameters:
      externalSourceIsHome - ensure that only the asset manager can update this relationship
      assetGUID - unique identifier of the asset
      properties - summary of the asset that is stored in the relationship between the asset and the connection.
      connectionGUID - unique identifier of the connection
      effectiveTime - optional date for effective time of the query. Null means any effective time
      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)
    • clearAssetConnection

      public void clearAssetConnection(String assetGUID, String connectionGUID, Date effectiveTime) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException
      Remove a relationship between an asset and its connection.
      Parameters:
      assetGUID - unique identifier of the asset
      connectionGUID - unique identifier of the connection
      effectiveTime - optional date for effective time of the query. Null means any effective time
      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)
    • removeConnection

      public void removeConnection(String connectionGUID, String connectionExternalIdentifier, Date effectiveTime) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException
      Remove the metadata element representing a connection. This will delete the connection and all anchored elements such as schema and comments.
      Parameters:
      connectionGUID - unique identifier of the metadata element to remove
      connectionExternalIdentifier - unique identifier of the connection in the external source
      effectiveTime - optional date for effective time of the query. Null means any effective time
      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)
    • findConnections

      public List<ConnectionElement> findConnections(String searchString, int startFrom, int pageSize, Date effectiveTime) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException
      Retrieve the list of connection metadata elements that contain the search string. The search string is treated as a regular expression.
      Parameters:
      searchString - string to find in the properties
      startFrom - paging start point
      pageSize - maximum results that can be returned
      effectiveTime - when should the elements be effected for - null is anytime; new Date() is now
      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)
    • getConnectionsByName

      public List<ConnectionElement> getConnectionsByName(String name, int startFrom, int pageSize, Date effectiveTime) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException
      Retrieve the list of connection metadata elements with a matching qualified or display name. There are no wildcards supported on this request.
      Parameters:
      name - name to search for
      startFrom - paging start point
      pageSize - maximum results that can be returned
      effectiveTime - when should the elements be effected for - null is anytime; new Date() is now
      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)
    • getConnectionsForAssetManager

      public List<ConnectionElement> getConnectionsForAssetManager(int startFrom, int pageSize, Date effectiveTime) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException
      Retrieve the list of connections created on behalf of the named external source.
      Parameters:
      startFrom - paging start point
      pageSize - maximum results that can be returned
      effectiveTime - when should the elements be effected for - null is anytime; new Date() is now
      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)
    • getConnectionByGUID

      public ConnectionElement getConnectionByGUID(String connectionGUID, Date effectiveTime) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException
      Retrieve the connection metadata element with the supplied unique identifier.
      Parameters:
      connectionGUID - unique identifier of the requested metadata element
      effectiveTime - when should the elements be effected for - null is anytime; new Date() is now
      Returns:
      matching 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)
    • createEndpoint

      public String createEndpoint(boolean externalSourceIsHome, ExternalIdentifierProperties externalIdentifierProperties, EndpointProperties endpointProperties) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException
      Create a new metadata element to represent the root of an endpoint.
      Parameters:
      externalSourceIsHome - ensure that only the external source can update this endpoint
      externalIdentifierProperties - optional properties used to define an external identifier
      endpointProperties - 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)
    • createEndpointFromTemplate

      public String createEndpointFromTemplate(boolean externalSourceIsHome, String templateGUID, ExternalIdentifierProperties externalIdentifierProperties, TemplateProperties templateProperties) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException
      Create a new metadata element to represent an endpoint using an existing metadata element as a template. The template defines additional classifications and relationships that should be added to the new endpoint.
      Parameters:
      externalSourceIsHome - ensure that only the external source can update this process
      externalIdentifierProperties - optional properties used to define an external identifier
      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)
    • updateEndpoint

      public void updateEndpoint(String connectorTypeGUID, String endpointExternalIdentifier, boolean isMergeUpdate, EndpointProperties endpointProperties, Date effectiveTime) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException
      Update the metadata element representing an endpoint.
      Parameters:
      connectorTypeGUID - unique identifier of the metadata element to update
      endpointExternalIdentifier - unique identifier of the endpoint in the external source
      isMergeUpdate - should the new properties be merged with existing properties (true) or completely replace them (false)?
      endpointProperties - new properties for this element
      effectiveTime - optional date for effective time of the query. Null means any effective time
      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)
    • removeEndpoint

      public void removeEndpoint(String connectorTypeGUID, String endpointExternalIdentifier, Date effectiveTime) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException
      Remove the metadata element representing a connector type. This will delete the endpoint and all anchored elements such as schema and comments.
      Parameters:
      connectorTypeGUID - unique identifier of the metadata element to remove
      endpointExternalIdentifier - unique identifier of the endpoint in the external source
      effectiveTime - optional date for effective time of the query. Null means any effective time
      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)
    • findEndpoints

      public List<EndpointElement> findEndpoints(String searchString, int startFrom, int pageSize, Date effectiveTime) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException
      Retrieve the list of endpoint metadata elements that contain the search string. The search string is treated as a regular expression.
      Parameters:
      searchString - string to find in the properties
      startFrom - paging start point
      pageSize - maximum results that can be returned
      effectiveTime - when should the elements be effected for - null is anytime; new Date() is now
      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)
    • getEndpointsByName

      public List<EndpointElement> getEndpointsByName(String name, int startFrom, int pageSize, Date effectiveTime) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException
      Retrieve the list of endpoint metadata elements with a matching qualified or display name. There are no wildcards supported on this request.
      Parameters:
      name - name to search for
      startFrom - paging start point
      pageSize - maximum results that can be returned
      effectiveTime - when should the elements be effected for - null is anytime; new Date() is now
      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)
    • getEndpointsForAssetManager

      public List<EndpointElement> getEndpointsForAssetManager(int startFrom, int pageSize, Date effectiveTime) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException
      Retrieve the list of endpoints created on behalf of the named external source.
      Parameters:
      startFrom - paging start point
      pageSize - maximum results that can be returned
      effectiveTime - when should the elements be effected for - null is anytime; new Date() is now
      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)
    • getEndpointByGUID

      public EndpointElement getEndpointByGUID(String endpointGUID, Date effectiveTime) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException
      Retrieve the endpoint metadata element with the supplied unique identifier.
      Parameters:
      endpointGUID - unique identifier of the requested metadata element
      effectiveTime - when should the elements be effected for - null is anytime; new Date() is now
      Returns:
      matching 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)
    • createConnectorType

      public String createConnectorType(boolean externalSourceIsHome, ExternalIdentifierProperties externalIdentifierProperties, ConnectorTypeProperties connectorTypeProperties) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException
      Create a new metadata element to represent the root of a connector type.
      Parameters:
      externalSourceIsHome - ensure that only the connectorType manager can update this connectorType
      externalIdentifierProperties - optional properties used to define an external identifier
      connectorTypeProperties - 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)
    • createConnectorTypeFromTemplate

      public String createConnectorTypeFromTemplate(boolean externalSourceIsHome, String templateGUID, ExternalIdentifierProperties externalIdentifierProperties, TemplateProperties templateProperties) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException
      Create a new metadata element to represent a connector type using an existing metadata element as a template. The template defines additional classifications and relationships that should be added to the new connectorType.
      Parameters:
      externalSourceIsHome - ensure that only the connectorType manager can update this process
      externalIdentifierProperties - optional properties used to define an external identifier
      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)
    • updateConnectorType

      public void updateConnectorType(String connectorTypeGUID, String connectorTypeExternalIdentifier, boolean isMergeUpdate, ConnectorTypeProperties connectorTypeProperties, Date effectiveTime) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException
      Update the metadata element representing a connector type.
      Parameters:
      connectorTypeGUID - unique identifier of the metadata element to update
      connectorTypeExternalIdentifier - unique identifier of the connectorType in the external connectorType manager
      isMergeUpdate - should the new properties be merged with existing properties (true) or completely replace them (false)?
      connectorTypeProperties - new properties for this element
      effectiveTime - optional date for effective time of the query. Null means any effective time
      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)
    • removeConnectorType

      public void removeConnectorType(String connectorTypeGUID, String connectorTypeExternalIdentifier, Date effectiveTime) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException
      Remove the metadata element representing a connector type. This will delete the connectorType and all anchored elements such as schema and comments.
      Parameters:
      connectorTypeGUID - unique identifier of the metadata element to remove
      connectorTypeExternalIdentifier - unique identifier of the connectorType in the external connectorType manager
      effectiveTime - optional date for effective time of the query. Null means any effective time
      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)
    • findConnectorTypes

      public List<ConnectorTypeElement> findConnectorTypes(String searchString, int startFrom, int pageSize, Date effectiveTime) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException
      Retrieve the list of connectorType metadata elements that contain the search string. The search string is treated as a regular expression.
      Parameters:
      searchString - string to find in the properties
      startFrom - paging start point
      pageSize - maximum results that can be returned
      effectiveTime - when should the elements be effected for - null is anytime; new Date() is now
      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)
    • getConnectorTypesByName

      public List<ConnectorTypeElement> getConnectorTypesByName(String name, int startFrom, int pageSize, Date effectiveTime) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException
      Retrieve the list of connectorType metadata elements with a matching qualified or display name. There are no wildcards supported on this request.
      Parameters:
      name - name to search for
      startFrom - paging start point
      pageSize - maximum results that can be returned
      effectiveTime - when should the elements be effected for - null is anytime; new Date() is now
      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)
    • getConnectorTypesForAssetManager

      public List<ConnectorTypeElement> getConnectorTypesForAssetManager(int startFrom, int pageSize, Date effectiveTime) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException
      Retrieve the list of connectorTypes created on behalf of the named connectorType manager.
      Parameters:
      startFrom - paging start point
      pageSize - maximum results that can be returned
      effectiveTime - when should the elements be effected for - null is anytime; new Date() is now
      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)
    • getConnectorTypeByGUID

      public ConnectorTypeElement getConnectorTypeByGUID(String dataAssetGUID, Date effectiveTime) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException
      Retrieve the connectorType metadata element with the supplied unique identifier.
      Parameters:
      dataAssetGUID - unique identifier of the requested metadata element
      effectiveTime - when should the elements be effected for - null is anytime; new Date() is now
      Returns:
      matching 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)