Class ConnectionExchangeClient

    • Constructor Detail

      • ConnectionExchangeClient

        public ConnectionExchangeClient​(String serverName,
                                        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.
      • ConnectionExchangeClient

        public ConnectionExchangeClient​(String serverName,
                                        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.
      • ConnectionExchangeClient

        public ConnectionExchangeClient​(String serverName,
                                        String serverPlatformURLRoot,
                                        String userId,
                                        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.
      • ConnectionExchangeClient

        public ConnectionExchangeClient​(String serverName,
                                        String serverPlatformURLRoot,
                                        AssetManagerRESTClient restClient,
                                        int maxPageSize,
                                        AuditLog auditLog)
                                 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
        auditLog - logging destination
        Throws:
        InvalidParameterException - there is a problem creating the client-side components to issue any REST API calls.
      • ConnectionExchangeClient

        public ConnectionExchangeClient​(String serverName,
                                        String serverPlatformURLRoot,
                                        String userId,
                                        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.
    • Method Detail

      • createConnection

        public String createConnection​(String userId,
                                       String assetManagerGUID,
                                       String assetManagerName,
                                       boolean assetManagerIsHome,
                                       String connectionExternalIdentifier,
                                       String connectionExternalIdentifierName,
                                       String connectionExternalIdentifierUsage,
                                       String connectionExternalIdentifierSource,
                                       KeyPattern connectionExternalIdentifierKeyPattern,
                                       Map<String,​String> mappingProperties,
                                       ConnectionProperties connectionProperties)
                                throws InvalidParameterException,
                                       UserNotAuthorizedException,
                                       PropertyServerException
        Create a new metadata element to represent the root of an connection.
        Specified by:
        createConnection in interface ConnectionExchangeInterface
        Parameters:
        userId - calling user
        assetManagerGUID - unique identifier of software server capability representing the caller
        assetManagerName - unique name of software server capability representing the caller
        assetManagerIsHome - ensure that only the asset manager can update this connection
        connectionExternalIdentifier - unique identifier of the connection in the external asset manager
        connectionExternalIdentifierName - name of property for the external identifier in the external asset manager
        connectionExternalIdentifierUsage - optional usage description for the external identifier when calling the external asset manager
        connectionExternalIdentifierSource - component that issuing this request.
        connectionExternalIdentifierKeyPattern - pattern for the external identifier within the external asset manager (default is LOCAL_KEY)
        mappingProperties - additional properties to help with the mapping of the elements in the external asset manager and open metadata
        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​(String userId,
                                                   String assetManagerGUID,
                                                   String assetManagerName,
                                                   boolean assetManagerIsHome,
                                                   String templateGUID,
                                                   String connectionExternalIdentifier,
                                                   String connectionExternalIdentifierName,
                                                   String connectionExternalIdentifierUsage,
                                                   String connectionExternalIdentifierSource,
                                                   KeyPattern connectionExternalIdentifierKeyPattern,
                                                   Map<String,​String> mappingProperties,
                                                   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.
        Specified by:
        createConnectionFromTemplate in interface ConnectionExchangeInterface
        Parameters:
        userId - calling user
        assetManagerGUID - unique identifier of software server capability representing the caller
        assetManagerName - unique name of software server capability representing the caller
        assetManagerIsHome - ensure that only the asset manager can update this connection
        connectionExternalIdentifier - unique identifier of the connection in the external asset manager
        connectionExternalIdentifierName - name of property for the external identifier in the external asset manager
        connectionExternalIdentifierUsage - optional usage description for the external identifier when calling the external asset manager
        connectionExternalIdentifierSource - component that issuing this request.
        connectionExternalIdentifierKeyPattern - pattern for the external identifier within the external asset manager (default is LOCAL_KEY)
        mappingProperties - additional properties to help with the mapping of the elements in the external asset manager and open metadata
        templateGUID - unique identifier of the metadata element to copy
        templateProperties - properties that override the template
        Returns:
        unique identifier of the new metadata element
        Throws:
        InvalidParameterException - one of the parameters is invalid
        UserNotAuthorizedException - the user is not authorized to issue this request
        PropertyServerException - there is a problem reported in the open metadata server(s)
      • updateConnection

        public void updateConnection​(String userId,
                                     String assetManagerGUID,
                                     String assetManagerName,
                                     String connectorTypeGUID,
                                     String connectionExternalIdentifier,
                                     boolean isMergeUpdate,
                                     ConnectionProperties connectionProperties)
                              throws InvalidParameterException,
                                     UserNotAuthorizedException,
                                     PropertyServerException
        Update the metadata element representing an asset.
        Specified by:
        updateConnection in interface ConnectionExchangeInterface
        Parameters:
        userId - calling user
        assetManagerGUID - unique identifier of software server capability representing the caller
        assetManagerName - unique name of software server capability representing the caller
        connectorTypeGUID - unique identifier of the metadata element to update
        connectionExternalIdentifier - unique identifier of the connection in the external asset manager
        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,
                                       String assetManagerGUID,
                                       String assetManagerName,
                                       boolean assetManagerIsHome,
                                       String connectionGUID,
                                       String connectorTypeGUID)
                                throws InvalidParameterException,
                                       UserNotAuthorizedException,
                                       PropertyServerException
        Create a relationship between a connection and a connector type.
        Specified by:
        setupConnectorType in interface ConnectionExchangeInterface
        Parameters:
        userId - calling user
        assetManagerGUID - unique identifier of software server capability representing the caller
        assetManagerName - unique name of software server capability representing the caller
        assetManagerIsHome - 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)
      • setupEndpoint

        public void setupEndpoint​(String userId,
                                  String assetManagerGUID,
                                  String assetManagerName,
                                  boolean assetManagerIsHome,
                                  String connectionGUID,
                                  String endpointGUID)
                           throws InvalidParameterException,
                                  UserNotAuthorizedException,
                                  PropertyServerException
        Create a relationship between a connection and an endpoint.
        Specified by:
        setupEndpoint in interface ConnectionExchangeInterface
        Parameters:
        userId - calling user
        assetManagerGUID - unique identifier of software server capability representing the caller
        assetManagerName - unique name of software server capability representing the caller
        assetManagerIsHome - 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)
      • setupEmbeddedConnection

        public void setupEmbeddedConnection​(String userId,
                                            String assetManagerGUID,
                                            String assetManagerName,
                                            boolean assetManagerIsHome,
                                            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.
        Specified by:
        setupEmbeddedConnection in interface ConnectionExchangeInterface
        Parameters:
        userId - calling user
        assetManagerGUID - unique identifier of software server capability representing the caller
        assetManagerName - unique name of software server capability representing the caller
        assetManagerIsHome - 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)
      • setupAssetConnection

        public void setupAssetConnection​(String userId,
                                         String assetManagerGUID,
                                         String assetManagerName,
                                         boolean assetManagerIsHome,
                                         String assetGUID,
                                         String assetSummary,
                                         String connectionGUID)
                                  throws InvalidParameterException,
                                         UserNotAuthorizedException,
                                         PropertyServerException
        Create a relationship between an asset and its connection.
        Specified by:
        setupAssetConnection in interface ConnectionExchangeInterface
        Parameters:
        userId - calling user
        assetManagerGUID - unique identifier of software server capability representing the caller
        assetManagerName - unique name of software server capability representing the caller
        assetManagerIsHome - 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)
      • createEndpoint

        public String createEndpoint​(String userId,
                                     String assetManagerGUID,
                                     String assetManagerName,
                                     boolean assetManagerIsHome,
                                     String endpointExternalIdentifier,
                                     String endpointExternalIdentifierName,
                                     String endpointExternalIdentifierUsage,
                                     String endpointExternalIdentifierSource,
                                     KeyPattern endpointExternalIdentifierKeyPattern,
                                     Map<String,​String> mappingProperties,
                                     EndpointProperties endpointProperties)
                              throws InvalidParameterException,
                                     UserNotAuthorizedException,
                                     PropertyServerException
        Create a new metadata element to represent a network endpoint.
        Specified by:
        createEndpoint in interface ConnectionExchangeInterface
        Parameters:
        userId - calling user
        assetManagerGUID - unique identifier of software server capability representing the caller
        assetManagerName - unique name of software server capability representing the caller
        assetManagerIsHome - ensure that only the asset manager can update this endpoint
        endpointExternalIdentifier - unique identifier of the endpoint in the external asset manager
        endpointExternalIdentifierName - name of property for the external identifier in the external asset manager
        endpointExternalIdentifierUsage - optional usage description for the external identifier when calling the external asset manager
        endpointExternalIdentifierSource - component that issuing this request.
        endpointExternalIdentifierKeyPattern - pattern for the external identifier within the external asset manager (default is LOCAL_KEY)
        mappingProperties - additional properties to help with the mapping of the elements in the external asset manager and open metadata
        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​(String userId,
                                                 String assetManagerGUID,
                                                 String assetManagerName,
                                                 boolean assetManagerIsHome,
                                                 String templateGUID,
                                                 String endpointExternalIdentifier,
                                                 String endpointExternalIdentifierName,
                                                 String endpointExternalIdentifierUsage,
                                                 String endpointExternalIdentifierSource,
                                                 KeyPattern endpointExternalIdentifierKeyPattern,
                                                 Map<String,​String> mappingProperties,
                                                 TemplateProperties templateProperties)
                                          throws InvalidParameterException,
                                                 UserNotAuthorizedException,
                                                 PropertyServerException
        Create a new metadata element to represent a network endpoint using an existing metadata element as a template. The template defines additional classifications and relationships that should be added to the new endpoint.
        Specified by:
        createEndpointFromTemplate in interface ConnectionExchangeInterface
        Parameters:
        userId - calling user
        assetManagerGUID - unique identifier of software server capability representing the caller
        assetManagerName - unique name of software server capability representing the caller
        assetManagerIsHome - ensure that only the asset manager can update this endpoint
        endpointExternalIdentifier - unique identifier of the endpoint in the external asset manager
        endpointExternalIdentifierName - name of property for the external identifier in the external asset manager
        endpointExternalIdentifierUsage - optional usage description for the external identifier when calling the external asset manager
        endpointExternalIdentifierSource - component that issuing this request.
        endpointExternalIdentifierKeyPattern - pattern for the external identifier within the external asset manager (default is LOCAL_KEY)
        mappingProperties - additional properties to help with the mapping of the elements in the external asset manager and open metadata
        templateGUID - unique identifier of the metadata element to copy
        templateProperties - properties that override the template
        Returns:
        unique identifier of the new metadata element
        Throws:
        InvalidParameterException - one of the parameters is invalid
        UserNotAuthorizedException - the user is not authorized to issue this request
        PropertyServerException - there is a problem reported in the open metadata server(s)
      • updateEndpoint

        public void updateEndpoint​(String userId,
                                   String assetManagerGUID,
                                   String assetManagerName,
                                   String endpointGUID,
                                   String endpointExternalIdentifier,
                                   boolean isMergeUpdate,
                                   EndpointProperties endpointProperties)
                            throws InvalidParameterException,
                                   UserNotAuthorizedException,
                                   PropertyServerException
        Update the metadata element representing an asset.
        Specified by:
        updateEndpoint in interface ConnectionExchangeInterface
        Parameters:
        userId - calling user
        assetManagerGUID - unique identifier of software server capability representing the caller
        assetManagerName - unique name of software server capability representing the caller
        endpointGUID - unique identifier of the metadata element to update
        endpointExternalIdentifier - unique identifier of the endpoint in the external asset manager
        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)
      • createConnectorType

        public String createConnectorType​(String userId,
                                          String assetManagerGUID,
                                          String assetManagerName,
                                          boolean assetManagerIsHome,
                                          String connectorTypeExternalIdentifier,
                                          String connectorTypeExternalIdentifierName,
                                          String connectorTypeExternalIdentifierUsage,
                                          String connectorTypeExternalIdentifierSource,
                                          KeyPattern connectorTypeExternalIdentifierKeyPattern,
                                          Map<String,​String> mappingProperties,
                                          ConnectorTypeProperties assetProperties)
                                   throws InvalidParameterException,
                                          UserNotAuthorizedException,
                                          PropertyServerException
        Create a new metadata element to represent the root of an asset.
        Specified by:
        createConnectorType in interface ConnectionExchangeInterface
        Parameters:
        userId - calling user
        assetManagerGUID - unique identifier of software server capability representing the caller
        assetManagerName - unique name of software server capability representing the caller
        assetManagerIsHome - ensure that only the asset manager can update this asset
        connectorTypeExternalIdentifier - unique identifier of the asset in the external asset manager
        connectorTypeExternalIdentifierName - name of property for the external identifier in the external asset manager
        connectorTypeExternalIdentifierUsage - optional usage description for the external identifier when calling the external asset manager
        connectorTypeExternalIdentifierSource - component that issuing this request.
        connectorTypeExternalIdentifierKeyPattern - pattern for the external identifier within the external asset manager (default is LOCAL_KEY)
        mappingProperties - additional properties to help with the mapping of the elements in the external asset manager and open metadata
        assetProperties - properties to store
        Returns:
        unique identifier of the new metadata element
        Throws:
        InvalidParameterException - one of the parameters is invalid
        UserNotAuthorizedException - the user is not authorized to issue this request
        PropertyServerException - there is a problem reported in the open metadata server(s)
      • createConnectorTypeFromTemplate

        public String createConnectorTypeFromTemplate​(String userId,
                                                      String assetManagerGUID,
                                                      String assetManagerName,
                                                      boolean assetManagerIsHome,
                                                      String templateGUID,
                                                      String connectorTypeExternalIdentifier,
                                                      String connectorTypeExternalIdentifierName,
                                                      String connectorTypeExternalIdentifierUsage,
                                                      String connectorTypeExternalIdentifierSource,
                                                      KeyPattern connectorTypeExternalIdentifierKeyPattern,
                                                      Map<String,​String> mappingProperties,
                                                      TemplateProperties templateProperties)
                                               throws InvalidParameterException,
                                                      UserNotAuthorizedException,
                                                      PropertyServerException
        Create a new metadata element to represent an asset using an existing metadata element as a template. The template defines additional classifications and relationships that should be added to the new asset.
        Specified by:
        createConnectorTypeFromTemplate in interface ConnectionExchangeInterface
        Parameters:
        userId - calling user
        assetManagerGUID - unique identifier of software server capability representing the caller
        assetManagerName - unique name of software server capability representing the caller
        assetManagerIsHome - ensure that only the asset manager can update this asset
        connectorTypeExternalIdentifier - unique identifier of the asset in the external asset manager
        connectorTypeExternalIdentifierName - name of property for the external identifier in the external asset manager
        connectorTypeExternalIdentifierUsage - optional usage description for the external identifier when calling the external asset manager
        connectorTypeExternalIdentifierSource - component that issuing this request.
        connectorTypeExternalIdentifierKeyPattern - pattern for the external identifier within the external asset manager (default is LOCAL_KEY)
        mappingProperties - additional properties to help with the mapping of the elements in the external asset manager and open metadata
        templateGUID - unique identifier of the metadata element to copy
        templateProperties - properties that override the template
        Returns:
        unique identifier of the new metadata element
        Throws:
        InvalidParameterException - one of the parameters is invalid
        UserNotAuthorizedException - the user is not authorized to issue this request
        PropertyServerException - there is a problem reported in the open metadata server(s)
      • updateConnectorType

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