Class ExternalAssetManagerClient

  • All Implemented Interfaces:
    AssetManagerInterface

    public class ExternalAssetManagerClient
    extends java.lang.Object
    implements AssetManagerInterface
    ExternalAssetManagerClient is the client for setting up the SoftwareServerCapabilities that represent asset managers.
    • Constructor Summary

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

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void addExternalIdentifier​(java.lang.String userId, java.lang.String assetManagerGUID, java.lang.String assetManagerName, java.lang.String openMetadataElementGUID, java.lang.String openMetadataElementTypeName, ExternalIdentifierProperties externalIdentifierProperties)
      Add a new external identifier to an existing open metadata element.
      void confirmSynchronization​(java.lang.String userId, java.lang.String assetManagerGUID, java.lang.String assetManagerName, java.lang.String openMetadataElementGUID, java.lang.String openMetadataElementTypeName, java.lang.String externalIdentifier)
      Confirm that the values of a particular metadata element have been synchronized.
      java.lang.String createExternalAssetManager​(java.lang.String userId, AssetManagerProperties assetManagerProperties)
      Create information about the external asset manager.
      java.util.List<ElementHeader> getElementsForExternalIdentifier​(java.lang.String userId, java.lang.String assetManagerGUID, java.lang.String assetManagerName, java.lang.String externalIdentifier, int startFrom, int pageSize)
      Return the list of headers for open metadata elements that are associated with a particular external identifier.
      java.lang.String getExternalAssetManagerGUID​(java.lang.String userId, java.lang.String qualifiedName)
      Retrieve the unique identifier of the external asset manager from its qualified name.
      void removeExternalIdentifier​(java.lang.String userId, java.lang.String assetManagerGUID, java.lang.String assetManagerName, java.lang.String openMetadataElementGUID, java.lang.String openMetadataElementTypeName, java.lang.String externalIdentifier)
      Remove an external identifier from an existing open metadata element.
      void updateExternalIdentifier​(java.lang.String userId, java.lang.String assetManagerGUID, java.lang.String assetManagerName, java.lang.String openMetadataElementGUID, java.lang.String openMetadataElementTypeName, ExternalIdentifierProperties externalIdentifierProperties)
      Update the description of a specific external identifier.
      • Methods inherited from class java.lang.Object

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

      • ExternalAssetManagerClient

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

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

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

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

        public ExternalAssetManagerClient​(java.lang.String serverName,
                                          java.lang.String serverPlatformURLRoot,
                                          AssetManagerRESTClient restClient,
                                          int maxPageSize,
                                          AuditLog auditLog)
                                   throws InvalidParameterException
        Create a new client that is to be used within 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 - pre-initialized REST client
        maxPageSize - pre-initialized parameter limit
        auditLog - logging destination
        Throws:
        InvalidParameterException - there is a problem with the information about the remote OMAS
    • Method Detail

      • addExternalIdentifier

        public void addExternalIdentifier​(java.lang.String userId,
                                          java.lang.String assetManagerGUID,
                                          java.lang.String assetManagerName,
                                          java.lang.String openMetadataElementGUID,
                                          java.lang.String openMetadataElementTypeName,
                                          ExternalIdentifierProperties externalIdentifierProperties)
                                   throws InvalidParameterException,
                                          UserNotAuthorizedException,
                                          PropertyServerException
        Add a new external identifier to an existing open metadata element.
        Specified by:
        addExternalIdentifier in interface AssetManagerInterface
        Parameters:
        userId - calling user
        assetManagerGUID - unique identifier of software server capability representing the caller
        assetManagerName - unique name of software server capability representing the caller
        openMetadataElementGUID - unique identifier (GUID) of the element in the open metadata ecosystem
        openMetadataElementTypeName - type name for the open metadata element
        externalIdentifierProperties - optional properties used to define an external identifier
        Throws:
        InvalidParameterException - one of the parameters is invalid
        UserNotAuthorizedException - user not authorized to issue this request
        PropertyServerException - problem accessing the property server
      • updateExternalIdentifier

        public void updateExternalIdentifier​(java.lang.String userId,
                                             java.lang.String assetManagerGUID,
                                             java.lang.String assetManagerName,
                                             java.lang.String openMetadataElementGUID,
                                             java.lang.String openMetadataElementTypeName,
                                             ExternalIdentifierProperties externalIdentifierProperties)
                                      throws InvalidParameterException,
                                             UserNotAuthorizedException,
                                             PropertyServerException
        Update the description of a specific external identifier.
        Specified by:
        updateExternalIdentifier in interface AssetManagerInterface
        Parameters:
        userId - calling user
        assetManagerGUID - unique identifier of software server capability representing the caller
        assetManagerName - unique name of software server capability representing the caller
        openMetadataElementGUID - unique identifier (GUID) of the element in the open metadata ecosystem
        openMetadataElementTypeName - type name for the open metadata element
        externalIdentifierProperties - optional properties used to define an external identifier
        Throws:
        InvalidParameterException - one of the parameters is invalid
        UserNotAuthorizedException - user not authorized to issue this request
        PropertyServerException - problem accessing the property server
      • removeExternalIdentifier

        public void removeExternalIdentifier​(java.lang.String userId,
                                             java.lang.String assetManagerGUID,
                                             java.lang.String assetManagerName,
                                             java.lang.String openMetadataElementGUID,
                                             java.lang.String openMetadataElementTypeName,
                                             java.lang.String externalIdentifier)
                                      throws InvalidParameterException,
                                             UserNotAuthorizedException,
                                             PropertyServerException
        Remove an external identifier from an existing open metadata element. The open metadata element is not affected.
        Specified by:
        removeExternalIdentifier in interface AssetManagerInterface
        Parameters:
        userId - calling user
        assetManagerGUID - unique identifier of software server capability representing the caller
        assetManagerName - unique name of software server capability representing the caller
        openMetadataElementGUID - unique identifier (GUID) of the element in the open metadata ecosystem
        openMetadataElementTypeName - type name for the open metadata element
        externalIdentifier - unique identifier of this element in the third party asset manager
        Throws:
        InvalidParameterException - one of the parameters is invalid
        UserNotAuthorizedException - user not authorized to issue this request
        PropertyServerException - problem accessing the property server
      • confirmSynchronization

        public void confirmSynchronization​(java.lang.String userId,
                                           java.lang.String assetManagerGUID,
                                           java.lang.String assetManagerName,
                                           java.lang.String openMetadataElementGUID,
                                           java.lang.String openMetadataElementTypeName,
                                           java.lang.String externalIdentifier)
                                    throws InvalidParameterException,
                                           UserNotAuthorizedException,
                                           PropertyServerException
        Confirm that the values of a particular metadata element have been synchronized. This is important from an audit point of view, and to allow bidirectional updates of metadata using optimistic locking.
        Specified by:
        confirmSynchronization in interface AssetManagerInterface
        Parameters:
        userId - calling user
        assetManagerGUID - unique identifier of software server capability representing the caller
        assetManagerName - unique name of software server capability representing the caller
        openMetadataElementGUID - unique identifier (GUID) of this element in open metadata
        openMetadataElementTypeName - type name for the open metadata element
        externalIdentifier - unique identifier of this element in the external asset manager
        Throws:
        InvalidParameterException - one of the parameters is invalid
        UserNotAuthorizedException - user not authorized to issue this request
        PropertyServerException - problem accessing the property server
      • getElementsForExternalIdentifier

        public java.util.List<ElementHeader> getElementsForExternalIdentifier​(java.lang.String userId,
                                                                              java.lang.String assetManagerGUID,
                                                                              java.lang.String assetManagerName,
                                                                              java.lang.String externalIdentifier,
                                                                              int startFrom,
                                                                              int pageSize)
                                                                       throws InvalidParameterException,
                                                                              UserNotAuthorizedException,
                                                                              PropertyServerException
        Return the list of headers for open metadata elements that are associated with a particular external identifier.
        Specified by:
        getElementsForExternalIdentifier in interface AssetManagerInterface
        Parameters:
        userId - calling user
        assetManagerGUID - unique identifier of software server capability representing the caller
        assetManagerName - unique name of software server capability representing the caller
        externalIdentifier - unique identifier of this element in the external asset manager
        startFrom - paging start point
        pageSize - maximum results that can be returned
        Returns:
        list of element headers
        Throws:
        InvalidParameterException - one of the parameters is invalid
        UserNotAuthorizedException - user not authorized to issue this request
        PropertyServerException - problem accessing the property server