Class ExternalAssetManagerClient
- java.lang.Object
-
- org.odpi.openmetadata.accessservices.assetmanager.client.ExternalAssetManagerClient
-
- All Implemented Interfaces:
AssetManagerInterface
public class ExternalAssetManagerClient extends Object implements AssetManagerInterface
ExternalAssetManagerClient is the client for setting up the SoftwareServerCapabilities that represent asset managers.
-
-
Constructor Summary
Constructors Constructor Description ExternalAssetManagerClient(String serverName, String serverPlatformURLRoot)Create a new client with no authentication embedded in the HTTP request.ExternalAssetManagerClient(String serverName, String serverPlatformURLRoot, String userId, String password)Create a new client that passes userId and password in each HTTP request.ExternalAssetManagerClient(String serverName, String serverPlatformURLRoot, String userId, String password, AuditLog auditLog)Create a new client that passes userId and password in each HTTP request.ExternalAssetManagerClient(String serverName, String serverPlatformURLRoot, AssetManagerRESTClient restClient, int maxPageSize, AuditLog auditLog)Create a new client that is to be used within an OMAG Server.ExternalAssetManagerClient(String serverName, 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 voidaddExternalIdentifier(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)Add a new external identifier to an existing open metadata element.voidconfirmSynchronization(String userId, String assetManagerGUID, String assetManagerName, String openMetadataElementGUID, String openMetadataElementTypeName, String externalIdentifier)Confirm that the values of a particular metadata element have been synchronized.StringcreateExternalAssetManager(String userId, AssetManagerProperties assetManagerProperties)Create information about the external asset manager.List<ElementHeader>getElementsForExternalIdentifier(String userId, String assetManagerGUID, String assetManagerName, String externalIdentifier, int startFrom, int pageSize)Return the list of headers for open metadata elements that are associated with a particular external identifier.StringgetExternalAssetManagerGUID(String userId, String qualifiedName)Retrieve the unique identifier of the external asset manager from its qualified name.voidremoveExternalIdentifier(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)Remove an external identifier from an existing open metadata element.voidupdateExternalIdentifier(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)Update the description of a specific external identifier.
-
-
-
Constructor Detail
-
ExternalAssetManagerClient
public ExternalAssetManagerClient(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 toserverPlatformURLRoot- the network address of the server running the OMAS REST serversauditLog- logging destination- Throws:
InvalidParameterException- there is a problem creating the client-side components to issue any REST API calls.
-
ExternalAssetManagerClient
public ExternalAssetManagerClient(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 toserverPlatformURLRoot- 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(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 toserverPlatformURLRoot- the network address of the server running the OMAS REST serversuserId- caller's userId embedded in all HTTP requestspassword- 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(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 toserverPlatformURLRoot- the network address of the server running the OMAS REST serversuserId- caller's userId embedded in all HTTP requestspassword- caller's userId embedded in all HTTP requestsauditLog- logging destination- Throws:
InvalidParameterException- there is a problem creating the client-side components to issue any REST API calls.
-
ExternalAssetManagerClient
public ExternalAssetManagerClient(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 toserverPlatformURLRoot- the network address of the server running the OMAS REST serversrestClient- pre-initialized REST clientmaxPageSize- pre-initialized parameter limitauditLog- logging destination- Throws:
InvalidParameterException- there is a problem with the information about the remote OMAS
-
-
Method Detail
-
createExternalAssetManager
public String createExternalAssetManager(String userId, AssetManagerProperties assetManagerProperties) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException
Create information about the external asset manager. This is represented as a software server capability and all information that is specific to the external asset manager (such as the identifiers of the metadata elements it stores) will be linked to it.- Specified by:
createExternalAssetManagerin interfaceAssetManagerInterface- Parameters:
userId- calling userassetManagerProperties- description of the integration daemon (specify qualified name at a minimum)- Returns:
- unique identifier of the asset management's software server capability
- Throws:
InvalidParameterException- one of the parameters is invalidUserNotAuthorizedException- user not authorized to issue this requestPropertyServerException- problem accessing the property server
-
getExternalAssetManagerGUID
public String getExternalAssetManagerGUID(String userId, String qualifiedName) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException
Retrieve the unique identifier of the external asset manager from its qualified name. Typically the qualified name comes from the integration connector configuration.- Specified by:
getExternalAssetManagerGUIDin interfaceAssetManagerInterface- Parameters:
userId- calling userqualifiedName- unique name to use for the external asset- Returns:
- unique identifier of the external asset manager's software server capability
- Throws:
InvalidParameterException- one of the parameters is invalidUserNotAuthorizedException- user not authorized to issue this requestPropertyServerException- problem accessing the property server
-
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:
addExternalIdentifierin interfaceAssetManagerInterface- Parameters:
userId- calling userassetManagerGUID- unique identifier of software server capability representing the callerassetManagerName- unique name of software server capability representing the callersynchronizationDirection- details of the synchronization directionsynchronizationDescription- optional additional description about the synchronization approachopenMetadataElementGUID- unique identifier (GUID) of the element in the open metadata ecosystemopenMetadataElementTypeName- type name for the open metadata elementexternalIdentifier- unique identifier of this element in the third party asset managerexternalIdentifierName- name of the identifier in the third party asset managerexternalIdentifierUsage- description of how the open metadata element maps to the identifierexternalIdentifierSource- component that issuing this request.keyPattern- style of the external identifiermappingProperties- additional mapping properties- Throws:
InvalidParameterException- one of the parameters is invalidUserNotAuthorizedException- user not authorized to issue this requestPropertyServerException- 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:
updateExternalIdentifierin interfaceAssetManagerInterface- Parameters:
userId- calling userassetManagerGUID- unique identifier of software server capability representing the callerassetManagerName- unique name of software server capability representing the callersynchronizationDirection- details of the synchronization directionsynchronizationDescription- optional additional description about the synchronization approachopenMetadataElementGUID- unique identifier (GUID) of the element in the open metadata ecosystemopenMetadataElementTypeName- type name for the open metadata elementexternalIdentifier- unique identifier of this element in the third party asset managerexternalIdentifierName- name of the identifier in the third party asset managerexternalIdentifierUsage- description of how the open metadata element maps to the identifierexternalIdentifierSource- component that issuing this request.keyPattern- style of the external identifiermappingProperties- additional mapping properties- Throws:
InvalidParameterException- one of the parameters is invalidUserNotAuthorizedException- user not authorized to issue this requestPropertyServerException- 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:
removeExternalIdentifierin interfaceAssetManagerInterface- Parameters:
userId- calling userassetManagerGUID- unique identifier of software server capability representing the callerassetManagerName- unique name of software server capability representing the callersynchronizationDirection- details of the synchronization directionsynchronizationDescription- optional additional description about the synchronization approachopenMetadataElementGUID- unique identifier (GUID) of the element in the open metadata ecosystemopenMetadataElementTypeName- type name for the open metadata elementexternalIdentifier- unique identifier of this element in the third party asset managerexternalIdentifierName- name of the identifier in the third party asset managerexternalIdentifierUsage- description of how the open metadata element maps to the identifierexternalIdentifierSource- component that issuing this request.keyPattern- style of the external identifiermappingProperties- additional mapping properties- Throws:
InvalidParameterException- one of the parameters is invalidUserNotAuthorizedException- user not authorized to issue this requestPropertyServerException- 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:
confirmSynchronizationin interfaceAssetManagerInterface- Parameters:
userId- calling userassetManagerGUID- unique identifier of software server capability representing the callerassetManagerName- unique name of software server capability representing the calleropenMetadataElementGUID- unique identifier (GUID) of this element in open metadataopenMetadataElementTypeName- type name for the open metadata elementexternalIdentifier- unique identifier of this element in the external asset manager- Throws:
InvalidParameterException- one of the parameters is invalidUserNotAuthorizedException- user not authorized to issue this requestPropertyServerException- problem accessing the property server
-
getElementsForExternalIdentifier
public List<ElementHeader> getElementsForExternalIdentifier(String userId, String assetManagerGUID, String assetManagerName, 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:
getElementsForExternalIdentifierin interfaceAssetManagerInterface- Parameters:
userId- calling userassetManagerGUID- unique identifier of software server capability representing the callerassetManagerName- unique name of software server capability representing the callerexternalIdentifier- unique identifier of this element in the external asset managerstartFrom- paging start pointpageSize- maximum results that can be returned- Returns:
- list of element headers
- Throws:
InvalidParameterException- one of the parameters is invalidUserNotAuthorizedException- user not authorized to issue this requestPropertyServerException- problem accessing the property server
-
-