Class AssetManagerClient

  • All Implemented Interfaces:
    AssetManagerInterface

    public class AssetManagerClient
    extends Object
    implements AssetManagerInterface
    AssetManagerClient is the client for setting up the SoftwareServerCapabilities that represent asset managers.
    • Constructor Detail

      • AssetManagerClient

        public AssetManagerClient​(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.
      • AssetManagerClient

        public AssetManagerClient​(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.
      • AssetManagerClient

        public AssetManagerClient​(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.
      • AssetManagerClient

        public AssetManagerClient​(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.
      • AssetManagerClient

        public AssetManagerClient​(String serverName,
                                  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​(String userId,
                                          String assetManagerGUID,
                                          String assetManagerName,
                                          SynchronizationDirection synchronizationDirection,
                                          String synchronizationDescription,
                                          String openMetadataElementGUID,
                                          String openMetadataElementTypeName,
                                          String externalIdentifier,
                                          String externalIdentifierName,
                                          String externalIdentifierUsage,
                                          String externalIdentifierSource,
                                          KeyPattern keyPattern,
                                          Map<String,​String> mappingProperties)
                                   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
        synchronizationDirection - details of the synchronization direction
        synchronizationDescription - optional additional description about the synchronization approach
        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
        externalIdentifierName - name of the identifier in the third party asset manager
        externalIdentifierUsage - description of how the open metadata element maps to the identifier
        externalIdentifierSource - component that issuing this request.
        keyPattern - style of the external identifier
        mappingProperties - additional mapping properties
        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​(String userId,
                                             String assetManagerGUID,
                                             String assetManagerName,
                                             SynchronizationDirection synchronizationDirection,
                                             String synchronizationDescription,
                                             String openMetadataElementGUID,
                                             String openMetadataElementTypeName,
                                             String externalIdentifier,
                                             String externalIdentifierName,
                                             String externalIdentifierUsage,
                                             String externalIdentifierSource,
                                             KeyPattern keyPattern,
                                             Map<String,​String> mappingProperties)
                                      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
        synchronizationDirection - details of the synchronization direction
        synchronizationDescription - optional additional description about the synchronization approach
        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
        externalIdentifierName - name of the identifier in the third party asset manager
        externalIdentifierUsage - description of how the open metadata element maps to the identifier
        externalIdentifierSource - component that issuing this request.
        keyPattern - style of the external identifier
        mappingProperties - additional mapping properties
        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​(String userId,
                                             String assetManagerGUID,
                                             String assetManagerName,
                                             SynchronizationDirection synchronizationDirection,
                                             String synchronizationDescription,
                                             String openMetadataElementGUID,
                                             String openMetadataElementTypeName,
                                             String externalIdentifier,
                                             String externalIdentifierName,
                                             String externalIdentifierUsage,
                                             String externalIdentifierSource,
                                             KeyPattern keyPattern,
                                             Map<String,​String> mappingProperties)
                                      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
        synchronizationDirection - details of the synchronization direction
        synchronizationDescription - optional additional description about the synchronization approach
        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
        externalIdentifierName - name of the identifier in the third party asset manager
        externalIdentifierUsage - description of how the open metadata element maps to the identifier
        externalIdentifierSource - component that issuing this request.
        keyPattern - style of the external identifier
        mappingProperties - additional mapping properties
        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​(String userId,
                                           String assetManagerGUID,
                                           String assetManagerName,
                                           String openMetadataElementGUID,
                                           String openMetadataElementTypeName,
                                           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