Class ConnectionManagerClient
java.lang.Object
org.odpi.openmetadata.accessservices.itinfrastructure.client.ConnectionManagerClient
- All Implemented Interfaces:
ConnectionsManagerInterface
ConnectionManagerClient supports the APIs to maintain connections and their related objects.
-
Constructor Summary
ConstructorDescriptionConnectionManagerClient
(String serverName, String serverPlatformURLRoot) Create a new client with no authentication embedded in the HTTP request.ConnectionManagerClient
(String serverName, String serverPlatformURLRoot, String userId, String password) Create a new client that passes userId and password in each HTTP request.ConnectionManagerClient
(String serverName, String serverPlatformURLRoot, String userId, String password, AuditLog auditLog) Create a new client that passes userId and password in each HTTP request.ConnectionManagerClient
(String serverName, String serverPlatformURLRoot, ITInfrastructureRESTClient restClient, int maxPageSize) Create a new client that is going to be used in an OMAG Server.ConnectionManagerClient
(String serverName, String serverPlatformURLRoot, AuditLog auditLog) Create a new client with no authentication embedded in the HTTP request. -
Method Summary
Modifier and TypeMethodDescriptionvoid
clearAssetConnection
(String userId, String infrastructureManagerGUID, String infrastructureManagerName, String assetGUID, String connectionGUID) Remove a relationship between an asset and its connection.void
clearConnectorType
(String userId, String infrastructureManagerGUID, String infrastructureManagerName, String connectionGUID, String connectorTypeGUID) Remove a relationship between a connection and a connector type.void
clearEmbeddedConnection
(String userId, String infrastructureManagerGUID, String infrastructureManagerName, String connectionGUID, String embeddedConnectionGUID) Remove a relationship between a virtual connection and an embedded connection.void
clearEndpoint
(String userId, String infrastructureManagerGUID, String infrastructureManagerName, String connectionGUID, String endpointGUID) Remove a relationship between a connection and an endpoint.createConnection
(String userId, String infrastructureManagerGUID, String infrastructureManagerName, ConnectionProperties connectionProperties) Create a new metadata element to represent a connection.createConnectionFromTemplate
(String userId, String infrastructureManagerGUID, String infrastructureManagerName, String templateGUID, TemplateProperties templateProperties) Create a new metadata element to represent a connection using an existing metadata element as a template.findConnections
(String userId, String searchString, int startFrom, int pageSize) Retrieve the list of metadata elements that contain the search string.getConnectionByGUID
(String userId, String connectionGUID) Retrieve the metadata element with the supplied unique identifier.getConnectionsByName
(String userId, String name, int startFrom, int pageSize) Retrieve the list of metadata elements with a matching qualified or display name.void
removeConnection
(String userId, String infrastructureManagerGUID, String infrastructureManagerName, String connectionGUID) Remove the metadata element representing a connection.void
setupAssetConnection
(String userId, String infrastructureManagerGUID, String infrastructureManagerName, String assetGUID, String assetSummary, String connectionGUID) Create a relationship between an asset and its connection.void
setupConnectorType
(String userId, String infrastructureManagerGUID, String infrastructureManagerName, String connectionGUID, String connectorTypeGUID) Create a relationship between a connection and a connector type.void
setupEmbeddedConnection
(String userId, String infrastructureManagerGUID, String infrastructureManagerName, String connectionGUID, int position, String displayName, Map<String, Object> arguments, String embeddedConnectionGUID) Create a relationship between a virtual connection and an embedded connection.void
setupEndpoint
(String userId, String infrastructureManagerGUID, String infrastructureManagerName, String connectionGUID, String endpointGUID) Create a relationship between a connection and an endpoint.void
updateConnection
(String userId, String infrastructureManagerGUID, String infrastructureManagerName, String connectionGUID, boolean isMergeUpdate, ConnectionProperties connectionProperties) Update the metadata element representing a connection.
-
Constructor Details
-
ConnectionManagerClient
public ConnectionManagerClient(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 servicesauditLog
- logging destination- Throws:
InvalidParameterException
- there is a problem creating the client-side components to issue any REST API calls.
-
ConnectionManagerClient
public ConnectionManagerClient(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 services- Throws:
InvalidParameterException
- there is a problem creating the client-side components to issue any REST API calls.
-
ConnectionManagerClient
public ConnectionManagerClient(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 servicesuserId
- 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.
-
ConnectionManagerClient
public ConnectionManagerClient(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 servicesuserId
- 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.
-
ConnectionManagerClient
public ConnectionManagerClient(String serverName, String serverPlatformURLRoot, ITInfrastructureRESTClient restClient, int maxPageSize) throws InvalidParameterException Create a new client that is going to be used in an OMAG Server.- Parameters:
serverName
- name of the server to connect toserverPlatformURLRoot
- the network address of the server running the OMAS REST servicesrestClient
- client that issues the REST API callsmaxPageSize
- maximum number of results supported by this server- Throws:
InvalidParameterException
- there is a problem creating the client-side components to issue any REST API calls.
-
-
Method Details
-
createConnection
public String createConnection(String userId, String infrastructureManagerGUID, String infrastructureManagerName, ConnectionProperties connectionProperties) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException Create a new metadata element to represent a connection.- Specified by:
createConnection
in interfaceConnectionsManagerInterface
- Parameters:
userId
- calling userinfrastructureManagerGUID
- unique identifier of software server capability representing the callerinfrastructureManagerName
- unique name of software server capability representing the callerconnectionProperties
- properties about the connection to store- Returns:
- unique identifier of the new connection
- Throws:
InvalidParameterException
- one of the parameters is invalidUserNotAuthorizedException
- the user is not authorized to issue this requestPropertyServerException
- there is a problem reported in the open metadata server(s)
-
createConnectionFromTemplate
public String createConnectionFromTemplate(String userId, String infrastructureManagerGUID, String infrastructureManagerName, String templateGUID, TemplateProperties templateProperties) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException Create a new metadata element to represent a connection using an existing metadata element as a template.- Specified by:
createConnectionFromTemplate
in interfaceConnectionsManagerInterface
- Parameters:
userId
- calling userinfrastructureManagerGUID
- unique identifier of software server capability representing the callerinfrastructureManagerName
- unique name of software server capability representing the callertemplateGUID
- unique identifier of the metadata element to copytemplateProperties
- properties that override the template- Returns:
- unique identifier of the new connection
- Throws:
InvalidParameterException
- one of the parameters is invalidUserNotAuthorizedException
- the user is not authorized to issue this requestPropertyServerException
- there is a problem reported in the open metadata server(s)
-
updateConnection
public void updateConnection(String userId, String infrastructureManagerGUID, String infrastructureManagerName, String connectionGUID, boolean isMergeUpdate, ConnectionProperties connectionProperties) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException Update the metadata element representing a connection. It is possible to use the subtype property classes or set up specialized properties in extended properties.- Specified by:
updateConnection
in interfaceConnectionsManagerInterface
- Parameters:
userId
- calling userinfrastructureManagerGUID
- unique identifier of software server capability representing the callerinfrastructureManagerName
- unique name of software server capability representing the callerconnectionGUID
- unique identifier of the metadata element to updateisMergeUpdate
- should the new properties be merged with existing properties (true) or completely replace them (false)?connectionProperties
- new properties for the metadata element- Throws:
InvalidParameterException
- one of the parameters is invalidUserNotAuthorizedException
- the user is not authorized to issue this requestPropertyServerException
- there is a problem reported in the open metadata server(s)
-
setupConnectorType
public void setupConnectorType(String userId, String infrastructureManagerGUID, String infrastructureManagerName, String connectionGUID, String connectorTypeGUID) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException Create a relationship between a connection and a connector type.- Specified by:
setupConnectorType
in interfaceConnectionsManagerInterface
- Parameters:
userId
- calling userinfrastructureManagerGUID
- unique identifier of software server capability representing the callerinfrastructureManagerName
- unique name of software server capability representing the callerconnectionGUID
- unique identifier of the connection in the external data managerconnectorTypeGUID
- unique identifier of the connector type in the external data manager- Throws:
InvalidParameterException
- one of the parameters is invalidUserNotAuthorizedException
- the user is not authorized to issue this requestPropertyServerException
- there is a problem reported in the open metadata server(s)
-
clearConnectorType
public void clearConnectorType(String userId, String infrastructureManagerGUID, String infrastructureManagerName, String connectionGUID, String connectorTypeGUID) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException Remove a relationship between a connection and a connector type.- Specified by:
clearConnectorType
in interfaceConnectionsManagerInterface
- Parameters:
userId
- calling userinfrastructureManagerGUID
- unique identifier of software server capability representing the callerinfrastructureManagerName
- unique name of software server capability representing the callerconnectionGUID
- unique identifier of the connection in the external data managerconnectorTypeGUID
- unique identifier of the connector type in the external data manager- Throws:
InvalidParameterException
- one of the parameters is invalidUserNotAuthorizedException
- the user is not authorized to issue this requestPropertyServerException
- there is a problem reported in the open metadata server(s)
-
setupEndpoint
public void setupEndpoint(String userId, String infrastructureManagerGUID, String infrastructureManagerName, String connectionGUID, String endpointGUID) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException Create a relationship between a connection and an endpoint.- Specified by:
setupEndpoint
in interfaceConnectionsManagerInterface
- Parameters:
userId
- calling userinfrastructureManagerGUID
- unique identifier of software server capability representing the callerinfrastructureManagerName
- unique name of software server capability representing the callerconnectionGUID
- unique identifier of the connection in the external data managerendpointGUID
- unique identifier of the endpoint in the external data manager- Throws:
InvalidParameterException
- one of the parameters is invalidUserNotAuthorizedException
- the user is not authorized to issue this requestPropertyServerException
- there is a problem reported in the open metadata server(s)
-
clearEndpoint
public void clearEndpoint(String userId, String infrastructureManagerGUID, String infrastructureManagerName, String connectionGUID, String endpointGUID) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException Remove a relationship between a connection and an endpoint.- Specified by:
clearEndpoint
in interfaceConnectionsManagerInterface
- Parameters:
userId
- calling userinfrastructureManagerGUID
- unique identifier of software server capability representing the callerinfrastructureManagerName
- unique name of software server capability representing the callerconnectionGUID
- unique identifier of the connection in the external data managerendpointGUID
- unique identifier of the endpoint in the external data manager- Throws:
InvalidParameterException
- one of the parameters is invalidUserNotAuthorizedException
- the user is not authorized to issue this requestPropertyServerException
- there is a problem reported in the open metadata server(s)
-
setupEmbeddedConnection
public void setupEmbeddedConnection(String userId, String infrastructureManagerGUID, String infrastructureManagerName, String connectionGUID, int position, String displayName, Map<String, Object> arguments, String embeddedConnectionGUID) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerExceptionCreate a relationship between a virtual connection and an embedded connection.- Specified by:
setupEmbeddedConnection
in interfaceConnectionsManagerInterface
- Parameters:
userId
- calling userinfrastructureManagerGUID
- unique identifier of software server capability representing the callerinfrastructureManagerName
- unique name of software server capability representing the callerconnectionGUID
- unique identifier of the virtual connection in the external data managerposition
- which order should this connection be processedarguments
- What additional properties should be passed to the embedded connector via the configuration propertiesdisplayName
- what does this connector signify?embeddedConnectionGUID
- unique identifier of the embedded connection in the external data manager- Throws:
InvalidParameterException
- one of the parameters is invalidUserNotAuthorizedException
- the user is not authorized to issue this requestPropertyServerException
- there is a problem reported in the open metadata server(s)
-
clearEmbeddedConnection
public void clearEmbeddedConnection(String userId, String infrastructureManagerGUID, String infrastructureManagerName, String connectionGUID, String embeddedConnectionGUID) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException Remove a relationship between a virtual connection and an embedded connection.- Specified by:
clearEmbeddedConnection
in interfaceConnectionsManagerInterface
- Parameters:
userId
- calling userinfrastructureManagerGUID
- unique identifier of software server capability representing the callerinfrastructureManagerName
- unique name of software server capability representing the callerconnectionGUID
- unique identifier of the virtual connection in the external data managerembeddedConnectionGUID
- unique identifier of the embedded connection in the external data manager- Throws:
InvalidParameterException
- one of the parameters is invalidUserNotAuthorizedException
- the user is not authorized to issue this requestPropertyServerException
- there is a problem reported in the open metadata server(s)
-
setupAssetConnection
public void setupAssetConnection(String userId, String infrastructureManagerGUID, String infrastructureManagerName, String assetGUID, String assetSummary, String connectionGUID) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException Create a relationship between an asset and its connection.- Specified by:
setupAssetConnection
in interfaceConnectionsManagerInterface
- Parameters:
userId
- calling userinfrastructureManagerGUID
- unique identifier of software server capability representing the callerinfrastructureManagerName
- unique name of software server capability representing the callerassetGUID
- unique identifier of the assetassetSummary
- 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 invalidUserNotAuthorizedException
- the user is not authorized to issue this requestPropertyServerException
- there is a problem reported in the open metadata server(s)
-
clearAssetConnection
public void clearAssetConnection(String userId, String infrastructureManagerGUID, String infrastructureManagerName, String assetGUID, String connectionGUID) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException Remove a relationship between an asset and its connection.- Specified by:
clearAssetConnection
in interfaceConnectionsManagerInterface
- Parameters:
userId
- calling userinfrastructureManagerGUID
- unique identifier of software server capability representing the callerinfrastructureManagerName
- unique name of software server capability representing the callerassetGUID
- unique identifier of the assetconnectionGUID
- unique identifier of the connection- Throws:
InvalidParameterException
- one of the parameters is invalidUserNotAuthorizedException
- the user is not authorized to issue this requestPropertyServerException
- there is a problem reported in the open metadata server(s)
-
removeConnection
public void removeConnection(String userId, String infrastructureManagerGUID, String infrastructureManagerName, String connectionGUID) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException Remove the metadata element representing a connection.- Specified by:
removeConnection
in interfaceConnectionsManagerInterface
- Parameters:
userId
- calling userinfrastructureManagerGUID
- unique identifier of software server capability representing the callerinfrastructureManagerName
- unique name of software server capability representing the callerconnectionGUID
- unique identifier of the metadata element to remove- Throws:
InvalidParameterException
- one of the parameters is invalidUserNotAuthorizedException
- the user is not authorized to issue this requestPropertyServerException
- there is a problem reported in the open metadata server(s)
-
findConnections
public List<ConnectionElement> findConnections(String userId, String searchString, int startFrom, int pageSize) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException Retrieve the list of metadata elements that contain the search string. The search string is treated as a regular expression.- Specified by:
findConnections
in interfaceConnectionsManagerInterface
- Parameters:
userId
- calling usersearchString
- string to find in the propertiesstartFrom
- paging start pointpageSize
- maximum results that can be returned- Returns:
- list of matching metadata elements
- Throws:
InvalidParameterException
- one of the parameters is invalidUserNotAuthorizedException
- the user is not authorized to issue this requestPropertyServerException
- there is a problem reported in the open metadata server(s)
-
getConnectionsByName
public List<ConnectionElement> getConnectionsByName(String userId, String name, int startFrom, int pageSize) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException Retrieve the list of metadata elements with a matching qualified or display name. There are no wildcards supported on this request.- Specified by:
getConnectionsByName
in interfaceConnectionsManagerInterface
- Parameters:
userId
- calling username
- name to search forstartFrom
- paging start pointpageSize
- maximum results that can be returned- Returns:
- list of matching metadata elements
- Throws:
InvalidParameterException
- one of the parameters is invalidUserNotAuthorizedException
- the user is not authorized to issue this requestPropertyServerException
- there is a problem reported in the open metadata server(s)
-
getConnectionByGUID
public ConnectionElement getConnectionByGUID(String userId, String connectionGUID) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException Retrieve the metadata element with the supplied unique identifier.- Specified by:
getConnectionByGUID
in interfaceConnectionsManagerInterface
- Parameters:
userId
- calling userconnectionGUID
- unique identifier of the requested metadata element- Returns:
- requested metadata element
- Throws:
InvalidParameterException
- one of the parameters is invalidUserNotAuthorizedException
- the user is not authorized to issue this requestPropertyServerException
- there is a problem reported in the open metadata server(s)
-