Class ConnectionExchangeService


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

      • createConnection

        public String createConnection​(boolean externalSourceIsHome,
                                       String connectionExternalIdentifier,
                                       String connectionExternalIdentifierName,
                                       String connectionExternalIdentifierUsage,
                                       KeyPattern connectionExternalIdentifierKeyPattern,
                                       Map<String,​String> mappingProperties,
                                       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
        connectionExternalIdentifier - unique identifier of the connection in the external external source
        connectionExternalIdentifierName - name of property for the external identifier in the external external source
        connectionExternalIdentifierUsage - optional usage description for the external identifier when calling the external external source
        connectionExternalIdentifierKeyPattern - pattern for the external identifier within the external external source (default is LOCAL_KEY)
        mappingProperties - additional properties to help with the mapping of the elements in the external external source and open metadata
        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,
                                                   String connectionExternalIdentifier,
                                                   String connectionExternalIdentifierName,
                                                   String connectionExternalIdentifierUsage,
                                                   KeyPattern connectionExternalIdentifierKeyPattern,
                                                   Map<String,​String> mappingProperties,
                                                   TemplateProperties templateProperties)
                                            throws InvalidParameterException,
                                                   UserNotAuthorizedException,
                                                   PropertyServerException
        Create a new metadata element to represent an 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
        connectionExternalIdentifier - unique identifier of the connection in the external external source
        connectionExternalIdentifierName - name of property for the external identifier in the external external source
        connectionExternalIdentifierUsage - optional usage description for the external identifier when calling the external external source
        connectionExternalIdentifierKeyPattern - pattern for the external identifier within the external external source (default is LOCAL_KEY)
        mappingProperties - additional properties to help with the mapping of the elements in the external external source 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)
      • updateConnection

        public void updateConnection​(String userId,
                                     String externalSourceGUID,
                                     String externalSourceName,
                                     String connectionGUID,
                                     String connectionExternalIdentifier,
                                     boolean isMergeUpdate,
                                     ConnectionProperties connectionProperties)
                              throws InvalidParameterException,
                                     UserNotAuthorizedException,
                                     PropertyServerException
        Update the metadata element representing an connection.
        Parameters:
        userId - calling user
        externalSourceGUID - unique identifier of software server capability representing the caller
        externalSourceName - unique name of software server capability representing the caller
        connectionGUID - unique identifier of the metadata element to update
        connectionExternalIdentifier - unique identifier of the connection in the external external source
        isMergeUpdate - should the new properties be merged with existing properties (true) or completely replace them (false)?
        connectionProperties - 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)
      • setupConnectorType

        public void setupConnectorType​(String userId,
                                       boolean externalSourceIsHome,
                                       String connectionGUID,
                                       String connectorTypeGUID)
                                throws InvalidParameterException,
                                       UserNotAuthorizedException,
                                       PropertyServerException
        Create a relationship between a connection and a connector type.
        Parameters:
        userId - calling user
        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
        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 userId,
                                       String externalSourceGUID,
                                       String externalSourceName,
                                       String connectionGUID,
                                       String connectorTypeGUID)
                                throws InvalidParameterException,
                                       UserNotAuthorizedException,
                                       PropertyServerException
        Remove a relationship between a connection and a connector type.
        Parameters:
        userId - calling user
        externalSourceGUID - unique identifier of software server capability representing the caller
        externalSourceName - unique name of software server capability representing the caller
        connectionGUID - unique identifier of the connection in the external asset manager
        connectorTypeGUID - unique identifier of the connector type 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)
      • setupEndpoint

        public void setupEndpoint​(String userId,
                                  String externalSourceGUID,
                                  String externalSourceName,
                                  boolean externalSourceIsHome,
                                  String connectionGUID,
                                  String endpointGUID)
                           throws InvalidParameterException,
                                  UserNotAuthorizedException,
                                  PropertyServerException
        Create a relationship between a connection and an endpoint.
        Parameters:
        userId - calling user
        externalSourceGUID - unique identifier of software server capability representing the caller
        externalSourceName - unique name of software server capability representing the caller
        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
        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 userId,
                                  String externalSourceGUID,
                                  String externalSourceName,
                                  String connectionGUID,
                                  String endpointGUID)
                           throws InvalidParameterException,
                                  UserNotAuthorizedException,
                                  PropertyServerException
        Remove a relationship between a connection and an endpoint.
        Parameters:
        userId - calling user
        externalSourceGUID - unique identifier of software server capability representing the caller
        externalSourceName - unique name of software server capability representing the caller
        connectionGUID - unique identifier of the connection in the external asset manager
        endpointGUID - unique identifier of the endpoint 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)
      • setupEmbeddedConnection

        public void setupEmbeddedConnection​(String userId,
                                            String externalSourceGUID,
                                            String externalSourceName,
                                            boolean externalSourceIsHome,
                                            String connectionGUID,
                                            int position,
                                            String displayName,
                                            Map<String,​Object> arguments,
                                            String embeddedConnectionGUID)
                                     throws InvalidParameterException,
                                            UserNotAuthorizedException,
                                            PropertyServerException
        Create a relationship between a virtual connection and an embedded connection.
        Parameters:
        userId - calling user
        externalSourceGUID - unique identifier of software server capability representing the caller
        externalSourceName - unique name of software server capability representing the caller
        externalSourceIsHome - ensure that only the asset manager can update this relationship
        connectionGUID - unique identifier of the virtual connection in the external asset manager
        position - which order should this connection be processed
        arguments - What additional properties should be passed to the embedded connector via the configuration properties
        displayName - what does this connector signify?
        embeddedConnectionGUID - unique identifier of the embedded connection 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)
      • clearEmbeddedConnection

        public void clearEmbeddedConnection​(String userId,
                                            String externalSourceGUID,
                                            String externalSourceName,
                                            String connectionGUID,
                                            String embeddedConnectionGUID)
                                     throws InvalidParameterException,
                                            UserNotAuthorizedException,
                                            PropertyServerException
        Remove a relationship between a virtual connection and an embedded connection.
        Parameters:
        userId - calling user
        externalSourceGUID - unique identifier of software server capability representing the caller
        externalSourceName - unique name of software server capability representing the caller
        connectionGUID - unique identifier of the virtual connection in the external asset manager
        embeddedConnectionGUID - unique identifier of the embedded connection 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)
      • setupAssetConnection

        public void setupAssetConnection​(String userId,
                                         String externalSourceGUID,
                                         String externalSourceName,
                                         boolean externalSourceIsHome,
                                         String assetGUID,
                                         String assetSummary,
                                         String connectionGUID)
                                  throws InvalidParameterException,
                                         UserNotAuthorizedException,
                                         PropertyServerException
        Create a relationship between an asset and its connection.
        Parameters:
        userId - calling user
        externalSourceGUID - unique identifier of software server capability representing the caller
        externalSourceName - unique name of software server capability representing the caller
        externalSourceIsHome - ensure that only the asset manager can update this relationship
        assetGUID - unique identifier of the asset
        assetSummary - summary of the asset that is stored in the relationship between the asset and the connection.
        connectionGUID - unique identifier of the connection
        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 userId,
                                     String externalSourceGUID,
                                     String externalSourceName,
                                     String connectionGUID,
                                     String connectionExternalIdentifier)
                              throws InvalidParameterException,
                                     UserNotAuthorizedException,
                                     PropertyServerException
        Remove the metadata element representing an connection. This will delete the connection and all anchored elements such as schema and comments.
        Parameters:
        userId - calling user
        externalSourceGUID - unique identifier of software server capability representing the caller
        externalSourceName - unique name of software server capability representing the caller
        connectionGUID - unique identifier of the metadata element to remove
        connectionExternalIdentifier - unique identifier of the connection in the external external source
        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,
                                     String endpointExternalIdentifier,
                                     String endpointExternalIdentifierName,
                                     String endpointExternalIdentifierUsage,
                                     KeyPattern endpointExternalIdentifierKeyPattern,
                                     Map<String,​String> mappingProperties,
                                     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
        endpointExternalIdentifier - unique identifier of the endpoint in the external external source
        endpointExternalIdentifierName - name of property for the external identifier in the external external source
        endpointExternalIdentifierUsage - optional usage description for the external identifier when calling the external external source
        endpointExternalIdentifierKeyPattern - pattern for the external identifier within the external external source (default is LOCAL_KEY)
        mappingProperties - additional properties to help with the mapping of the elements in the external external source and open metadata
        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,
                                                 String endpointExternalIdentifier,
                                                 String endpointExternalIdentifierName,
                                                 String endpointExternalIdentifierUsage,
                                                 KeyPattern endpointExternalIdentifierKeyPattern,
                                                 Map<String,​String> mappingProperties,
                                                 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
        endpointExternalIdentifier - unique identifier of the endpoint in the external external source
        endpointExternalIdentifierName - name of property for the external identifier in the external external source
        endpointExternalIdentifierUsage - optional usage description for the external identifier when calling the external external source
        endpointExternalIdentifierKeyPattern - pattern for the external identifier within the external external source (default is LOCAL_KEY)
        mappingProperties - additional properties to help with the mapping of the elements in the external external source 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)
      • updateEndpoint

        public void updateEndpoint​(String userId,
                                   String externalSourceGUID,
                                   String externalSourceName,
                                   String connectorTypeGUID,
                                   String endpointExternalIdentifier,
                                   boolean isMergeUpdate,
                                   EndpointProperties endpointProperties)
                            throws InvalidParameterException,
                                   UserNotAuthorizedException,
                                   PropertyServerException
        Update the metadata element representing an endpoint.
        Parameters:
        userId - calling user
        externalSourceGUID - unique identifier of software server capability representing the caller
        externalSourceName - unique name of software server capability representing the caller
        connectorTypeGUID - unique identifier of the metadata element to update
        endpointExternalIdentifier - unique identifier of the endpoint in the external external source
        isMergeUpdate - should the new properties be merged with existing properties (true) or completely replace them (false)?
        endpointProperties - 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)
      • removeEndpoint

        public void removeEndpoint​(String userId,
                                   String externalSourceGUID,
                                   String externalSourceName,
                                   String connectorTypeGUID,
                                   String endpointExternalIdentifier)
                            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:
        userId - calling user
        externalSourceGUID - unique identifier of software server capability representing the caller
        externalSourceName - unique name of software server capability representing the caller
        connectorTypeGUID - unique identifier of the metadata element to remove
        endpointExternalIdentifier - unique identifier of the endpoint in the external external source
        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,
                                          String connectorTypeExternalIdentifier,
                                          String connectorTypeExternalIdentifierName,
                                          String connectorTypeExternalIdentifierUsage,
                                          KeyPattern connectorTypeExternalIdentifierKeyPattern,
                                          Map<String,​String> mappingProperties,
                                          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
        connectorTypeExternalIdentifier - unique identifier of the connectorType in the external connectorType manager
        connectorTypeExternalIdentifierName - name of property for the external identifier in the external connectorType manager
        connectorTypeExternalIdentifierUsage - optional usage description for the external identifier when calling the external connectorType manager
        connectorTypeExternalIdentifierKeyPattern - pattern for the external identifier within the external connectorType manager (default is LOCAL_KEY)
        mappingProperties - additional properties to help with the mapping of the elements in the external connectorType manager and open metadata
        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,
                                                      String connectorTypeExternalIdentifier,
                                                      String connectorTypeExternalIdentifierName,
                                                      String connectorTypeExternalIdentifierUsage,
                                                      KeyPattern connectorTypeExternalIdentifierKeyPattern,
                                                      Map<String,​String> mappingProperties,
                                                      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
        connectorTypeExternalIdentifier - unique identifier of the connectorType in the external connectorType manager
        connectorTypeExternalIdentifierName - name of property for the external identifier in the external connectorType manager
        connectorTypeExternalIdentifierUsage - optional usage description for the external identifier when calling the external connectorType manager
        connectorTypeExternalIdentifierKeyPattern - pattern for the external identifier within the external connectorType manager (default is LOCAL_KEY)
        mappingProperties - additional properties to help with the mapping of the elements in the external connectorType 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)
      • updateConnectorType

        public void updateConnectorType​(String userId,
                                        String externalSourceGUID,
                                        String externalSourceName,
                                        String connectorTypeGUID,
                                        String connectorTypeExternalIdentifier,
                                        boolean isMergeUpdate,
                                        ConnectorTypeProperties connectorTypeProperties)
                                 throws InvalidParameterException,
                                        UserNotAuthorizedException,
                                        PropertyServerException
        Update the metadata element representing a connector type.
        Parameters:
        userId - calling user
        externalSourceGUID - unique identifier of software server capability representing the caller
        externalSourceName - unique name of software server capability representing the caller
        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
        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 userId,
                                        String externalSourceGUID,
                                        String externalSourceName,
                                        String connectorTypeGUID,
                                        String connectorTypeExternalIdentifier)
                                 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:
        userId - calling user
        externalSourceGUID - unique identifier of software server capability representing the caller
        externalSourceName - unique name of software server capability representing the caller
        connectorTypeGUID - unique identifier of the metadata element to remove
        connectorTypeExternalIdentifier - unique identifier of the connectorType in the external connectorType 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)