Class ConnectionRESTServices
java.lang.Object
org.odpi.openmetadata.accessservices.datamanager.server.ConnectionRESTServices
ConnectionRESTServices is the server-side implementation of the Data Manager OMAS's
support for connections, connector types and endpoints. It matches the ConnectionManagerClient.
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionclearAssetConnection
(String serverName, String userId, String assetGUID, String connectionGUID, ExternalSourceRequestBody requestBody) Remove a relationship between an asset and its connection.clearConnectorType
(String serverName, String userId, String connectionGUID, String connectorTypeGUID, ExternalSourceRequestBody requestBody) Remove a relationship between a connection and a connector type.clearEmbeddedConnection
(String serverName, String userId, String connectionGUID, String embeddedConnectionGUID, ExternalSourceRequestBody requestBody) Remove a relationship between a virtual connection and an embedded connection.clearEndpoint
(String serverName, String userId, String connectionGUID, String endpointGUID, ExternalSourceRequestBody requestBody) Remove a relationship between a connection and an endpoint.createConnection
(String serverName, String userId, ConnectionRequestBody requestBody) Create a new metadata element to represent a connection.createConnectionFromTemplate
(String serverName, String userId, String templateGUID, TemplateRequestBody requestBody) Create a new metadata element to represent a connection using an existing metadata element as a template.createEndpoint
(String serverName, String userId, EndpointRequestBody requestBody) Create a new metadata element to represent a endpoint.createEndpointFromTemplate
(String serverName, String userId, String networkAddress, String templateGUID, TemplateRequestBody requestBody) Create a new metadata element to represent a endpoint using an existing metadata element as a template.findConnections
(String serverName, String userId, SearchStringRequestBody requestBody, int startFrom, int pageSize) Retrieve the list of connection metadata elements that contain the search string.findConnectorTypes
(String serverName, String userId, SearchStringRequestBody requestBody, int startFrom, int pageSize) Retrieve the list of connector type metadata elements that contain the search string.findEndpoints
(String serverName, String userId, SearchStringRequestBody requestBody, int startFrom, int pageSize) Retrieve the list of endpoint metadata elements that contain the search string.getConnectionByGUID
(String serverName, String userId, String guid) Retrieve the connection metadata element with the supplied unique identifier.getConnectionsByName
(String serverName, String userId, NameRequestBody requestBody, int startFrom, int pageSize) Retrieve the list of connection metadata elements with a matching qualified or display name.getConnectorTypeByGUID
(String serverName, String userId, String guid) Retrieve the connector type metadata element with the supplied unique identifier.getConnectorTypesByName
(String serverName, String userId, NameRequestBody requestBody, int startFrom, int pageSize) Retrieve the list of connector type metadata elements with a matching qualified or display name.getEndpointByGUID
(String serverName, String userId, String guid) Retrieve the endpoint metadata element with the supplied unique identifier.getEndpointsByName
(String serverName, String userId, NameRequestBody requestBody, int startFrom, int pageSize) Retrieve the list of endpoint metadata elements with a matching qualified or display name.removeConnection
(String serverName, String userId, String connectionGUID, ExternalSourceRequestBody requestBody) Remove the metadata element representing a connection.removeEndpoint
(String serverName, String userId, String endpointGUID, ExternalSourceRequestBody requestBody) Remove the metadata element representing a endpoint.setupAssetConnection
(String serverName, String userId, String assetGUID, String connectionGUID, AssetConnectionRequestBody requestBody) Create a relationship between an asset and its connection.setupConnectorType
(String serverName, String userId, String connectionGUID, String connectorTypeGUID, ExternalSourceRequestBody requestBody) Create a relationship between a connection and a connector type.setupEmbeddedConnection
(String serverName, String userId, String connectionGUID, String embeddedConnectionGUID, EmbeddedConnectionRequestBody requestBody) Create a relationship between a virtual connection and an embedded connection.setupEndpoint
(String serverName, String userId, String connectionGUID, String endpointGUID, ExternalSourceRequestBody requestBody) Create a relationship between a connection and an endpoint.updateConnection
(String serverName, String userId, String connectionGUID, boolean isMergeUpdate, ConnectionRequestBody requestBody) Update the metadata element representing a connection.updateEndpoint
(String serverName, String userId, String endpointGUID, boolean isMergeUpdate, EndpointRequestBody requestBody) Update the metadata element representing a endpoint.
-
Constructor Details
-
ConnectionRESTServices
public ConnectionRESTServices()Default constructor
-
-
Method Details
-
createConnection
public GUIDResponse createConnection(String serverName, String userId, ConnectionRequestBody requestBody) Create a new metadata element to represent a connection.- Parameters:
serverName
- name of the service to route the request to.userId
- calling userrequestBody
- properties to store- Returns:
- unique identifier of the new metadata element or InvalidParameterException one of the parameters is invalid or UserNotAuthorizedException the user is not authorized to issue this request or PropertyServerException there is a problem reported in the open metadata server(s)
-
createConnectionFromTemplate
public GUIDResponse createConnectionFromTemplate(String serverName, String userId, String templateGUID, TemplateRequestBody requestBody) Create a new metadata element to represent a connection using an existing metadata element as a template.- Parameters:
serverName
- name of the service to route the request to.userId
- calling usertemplateGUID
- unique identifier of the metadata element to copyrequestBody
- properties that override the template- Returns:
- unique identifier of the new metadata element or InvalidParameterException one of the parameters is invalid or UserNotAuthorizedException the user is not authorized to issue this request or PropertyServerException there is a problem reported in the open metadata server(s)
-
updateConnection
public VoidResponse updateConnection(String serverName, String userId, String connectionGUID, boolean isMergeUpdate, ConnectionRequestBody requestBody) Update the metadata element representing a connection.- Parameters:
serverName
- name of the service to route the request to.userId
- calling userconnectionGUID
- unique identifier of the metadata element to updateisMergeUpdate
- should the new properties be merged with the existing properties of overlay them?requestBody
- new properties for this element- Returns:
- void or InvalidParameterException one of the parameters is invalid or UserNotAuthorizedException the user is not authorized to issue this request or PropertyServerException there is a problem reported in the open metadata server(s)
-
setupConnectorType
public VoidResponse setupConnectorType(String serverName, String userId, String connectionGUID, String connectorTypeGUID, ExternalSourceRequestBody requestBody) Create a relationship between a connection and a connector type.- Parameters:
serverName
- name of the service to route the request to.userId
- calling userconnectionGUID
- unique identifier of the connection in the external data managerconnectorTypeGUID
- unique identifier of the connector type in the external data managerrequestBody
- data manager identifiers- Returns:
- void or InvalidParameterException one of the parameters is invalid or UserNotAuthorizedException the user is not authorized to issue this request or PropertyServerException there is a problem reported in the open metadata server(s)
-
clearConnectorType
public VoidResponse clearConnectorType(String serverName, String userId, String connectionGUID, String connectorTypeGUID, ExternalSourceRequestBody requestBody) Remove a relationship between a connection and a connector type.- Parameters:
serverName
- name of the service to route the request to.userId
- calling userconnectionGUID
- unique identifier of the connection in the external data managerconnectorTypeGUID
- unique identifier of the connector type in the external data managerrequestBody
- data manager identifiers- Returns:
- void or InvalidParameterException one of the parameters is invalid or UserNotAuthorizedException the user is not authorized to issue this request or PropertyServerException there is a problem reported in the open metadata server(s)
-
setupEndpoint
public VoidResponse setupEndpoint(String serverName, String userId, String connectionGUID, String endpointGUID, ExternalSourceRequestBody requestBody) Create a relationship between a connection and an endpoint.- Parameters:
serverName
- name of the service to route the request to.userId
- calling userconnectionGUID
- unique identifier of the connection in the external data managerendpointGUID
- unique identifier of the endpoint in the external data managerrequestBody
- data manager identifiers- Returns:
- void or InvalidParameterException one of the parameters is invalid or UserNotAuthorizedException the user is not authorized to issue this request or PropertyServerException there is a problem reported in the open metadata server(s)
-
clearEndpoint
public VoidResponse clearEndpoint(String serverName, String userId, String connectionGUID, String endpointGUID, ExternalSourceRequestBody requestBody) Remove a relationship between a connection and an endpoint.- Parameters:
serverName
- name of the service to route the request to.userId
- calling userconnectionGUID
- unique identifier of the connection in the external data managerendpointGUID
- unique identifier of the endpoint in the external data managerrequestBody
- data manager identifiers- Returns:
- void or InvalidParameterException one of the parameters is invalid or UserNotAuthorizedException the user is not authorized to issue this request or PropertyServerException there is a problem reported in the open metadata server(s)
-
setupEmbeddedConnection
public VoidResponse setupEmbeddedConnection(String serverName, String userId, String connectionGUID, String embeddedConnectionGUID, EmbeddedConnectionRequestBody requestBody) Create a relationship between a virtual connection and an embedded connection.- Parameters:
serverName
- name of the service to route the request to.userId
- calling userconnectionGUID
- unique identifier of the virtual connection in the external data managerembeddedConnectionGUID
- unique identifier of the embedded connection in the external data managerrequestBody
- data manager identifiers and properties for the embedded connection- Returns:
- void or InvalidParameterException one of the parameters is invalid or UserNotAuthorizedException the user is not authorized to issue this request or PropertyServerException there is a problem reported in the open metadata server(s)
-
clearEmbeddedConnection
public VoidResponse clearEmbeddedConnection(String serverName, String userId, String connectionGUID, String embeddedConnectionGUID, ExternalSourceRequestBody requestBody) Remove a relationship between a virtual connection and an embedded connection.- Parameters:
serverName
- name of the service to route the request to.userId
- calling userconnectionGUID
- unique identifier of the virtual connection in the external data managerembeddedConnectionGUID
- unique identifier of the embedded connection in the external data managerrequestBody
- data manager identifiers- Returns:
- void or InvalidParameterException one of the parameters is invalid or UserNotAuthorizedException the user is not authorized to issue this request or PropertyServerException there is a problem reported in the open metadata server(s)
-
setupAssetConnection
public VoidResponse setupAssetConnection(String serverName, String userId, String assetGUID, String connectionGUID, AssetConnectionRequestBody requestBody) Create a relationship between an asset and its connection.- Parameters:
serverName
- name of the service to route the request to.userId
- calling userassetGUID
- unique identifier of the assetconnectionGUID
- unique identifier of the connectionrequestBody
- data manager identifiers and asset summary- Returns:
- void or InvalidParameterException one of the parameters is invalid or UserNotAuthorizedException the user is not authorized to issue this request or PropertyServerException there is a problem reported in the open metadata server(s)
-
clearAssetConnection
public VoidResponse clearAssetConnection(String serverName, String userId, String assetGUID, String connectionGUID, ExternalSourceRequestBody requestBody) Remove a relationship between an asset and its connection.- Parameters:
serverName
- name of the service to route the request to.userId
- calling userassetGUID
- unique identifier of the assetconnectionGUID
- unique identifier of the connectionrequestBody
- data manager identifiers- Returns:
- void or InvalidParameterException one of the parameters is invalid or UserNotAuthorizedException the user is not authorized to issue this request or PropertyServerException there is a problem reported in the open metadata server(s)
-
removeConnection
public VoidResponse removeConnection(String serverName, String userId, String connectionGUID, ExternalSourceRequestBody requestBody) Remove the metadata element representing a connection.- Parameters:
serverName
- name of the service to route the request to.userId
- calling userconnectionGUID
- unique identifier of the metadata element to removerequestBody
- external source identifiers- Returns:
- void or InvalidParameterException one of the parameters is invalid or UserNotAuthorizedException the user is not authorized to issue this request or PropertyServerException there is a problem reported in the open metadata server(s)
-
findConnections
public ConnectionsResponse findConnections(String serverName, String userId, SearchStringRequestBody requestBody, int startFrom, int pageSize) Retrieve the list of connection metadata elements that contain the search string. The search string is treated as a regular expression.- Parameters:
serverName
- name of the service to route the request to.userId
- calling userrequestBody
- string to find in the propertiesstartFrom
- paging start pointpageSize
- maximum results that can be returned- Returns:
- list of matching metadata elements or InvalidParameterException one of the parameters is invalid or UserNotAuthorizedException the user is not authorized to issue this request or PropertyServerException there is a problem reported in the open metadata server(s)
-
getConnectionsByName
public ConnectionsResponse getConnectionsByName(String serverName, String userId, NameRequestBody requestBody, int startFrom, int pageSize) Retrieve the list of connection metadata elements with a matching qualified or display name. There are no wildcards supported on this request.- Parameters:
serverName
- name of the service to route the request to.userId
- calling userrequestBody
- name to search forstartFrom
- paging start pointpageSize
- maximum results that can be returned- Returns:
- list of matching metadata elements or InvalidParameterException one of the parameters is invalid or UserNotAuthorizedException the user is not authorized to issue this request or PropertyServerException there is a problem reported in the open metadata server(s)
-
getConnectionByGUID
Retrieve the connection metadata element with the supplied unique identifier.- Parameters:
serverName
- name of the service to route the request to.userId
- calling userguid
- unique identifier of the requested metadata element- Returns:
- matching metadata element or InvalidParameterException one of the parameters is invalid or UserNotAuthorizedException the user is not authorized to issue this request or PropertyServerException there is a problem reported in the open metadata server(s)
-
createEndpoint
public GUIDResponse createEndpoint(String serverName, String userId, EndpointRequestBody requestBody) Create a new metadata element to represent a endpoint.- Parameters:
serverName
- name of the service to route the request to.userId
- calling userrequestBody
- properties about the endpoint- Returns:
- unique identifier of the new endpoint or InvalidParameterException one of the parameters is invalid or UserNotAuthorizedException the user is not authorized to issue this request or PropertyServerException there is a problem reported in the open metadata server(s)
-
createEndpointFromTemplate
public GUIDResponse createEndpointFromTemplate(String serverName, String userId, String networkAddress, String templateGUID, TemplateRequestBody requestBody) Create a new metadata element to represent a endpoint using an existing metadata element as a template.- Parameters:
serverName
- name of the service to route the request to.userId
- calling usernetworkAddress
- location of the endpointtemplateGUID
- unique identifier of the metadata element to copyrequestBody
- properties that override the template- Returns:
- unique identifier of the new endpoint or InvalidParameterException one of the parameters is invalid or UserNotAuthorizedException the user is not authorized to issue this request or PropertyServerException there is a problem reported in the open metadata server(s)
-
updateEndpoint
public VoidResponse updateEndpoint(String serverName, String userId, String endpointGUID, boolean isMergeUpdate, EndpointRequestBody requestBody) Update the metadata element representing a endpoint.- Parameters:
serverName
- name of the service to route the request to.userId
- calling userendpointGUID
- unique identifier of the metadata element to updateisMergeUpdate
- are unspecified properties unchanged (true) or removed?requestBody
- new properties for the metadata element- Returns:
- void or InvalidParameterException one of the parameters is invalid or UserNotAuthorizedException the user is not authorized to issue this request or PropertyServerException there is a problem reported in the open metadata server(s)
-
removeEndpoint
public VoidResponse removeEndpoint(String serverName, String userId, String endpointGUID, ExternalSourceRequestBody requestBody) Remove the metadata element representing a endpoint.- Parameters:
serverName
- name of the service to route the request to.userId
- calling userendpointGUID
- unique identifier of the metadata element to removerequestBody
- external source identifiers- Returns:
- void or InvalidParameterException one of the parameters is invalid or UserNotAuthorizedException the user is not authorized to issue this request or PropertyServerException there is a problem reported in the open metadata server(s)
-
findEndpoints
public EndpointsResponse findEndpoints(String serverName, String userId, SearchStringRequestBody requestBody, int startFrom, int pageSize) Retrieve the list of endpoint metadata elements that contain the search string. The search string is treated as a regular expression.- Parameters:
serverName
- name of the service to route the request to.userId
- calling userrequestBody
- string to find in the propertiesstartFrom
- paging start pointpageSize
- maximum results that can be returned- Returns:
- list of matching metadata elements or InvalidParameterException one of the parameters is invalid or UserNotAuthorizedException the user is not authorized to issue this request or PropertyServerException there is a problem reported in the open metadata server(s)
-
getEndpointsByName
public EndpointsResponse getEndpointsByName(String serverName, String userId, NameRequestBody requestBody, int startFrom, int pageSize) Retrieve the list of endpoint metadata elements with a matching qualified or display name. There are no wildcards supported on this request.- Parameters:
serverName
- name of the service to route the request to.userId
- calling userrequestBody
- name to search forstartFrom
- paging start pointpageSize
- maximum results that can be returned- Returns:
- list of matching metadata elements or InvalidParameterException one of the parameters is invalid or UserNotAuthorizedException the user is not authorized to issue this request or PropertyServerException there is a problem reported in the open metadata server(s)
-
getEndpointByGUID
Retrieve the endpoint metadata element with the supplied unique identifier.- Parameters:
serverName
- name of the service to route the request to.userId
- calling userguid
- unique identifier of the requested metadata element- Returns:
- requested metadata element or InvalidParameterException one of the parameters is invalid or UserNotAuthorizedException the user is not authorized to issue this request or PropertyServerException there is a problem reported in the open metadata server(s)
-
findConnectorTypes
public ConnectorTypesResponse findConnectorTypes(String serverName, String userId, SearchStringRequestBody requestBody, int startFrom, int pageSize) Retrieve the list of connector type metadata elements that contain the search string. The search string is treated as a regular expression.- Parameters:
serverName
- name of the service to route the request to.userId
- calling userrequestBody
- string to find in the propertiesstartFrom
- paging start pointpageSize
- maximum results that can be returned- Returns:
- list of matching metadata elements or InvalidParameterException one of the parameters is invalid or UserNotAuthorizedException the user is not authorized to issue this request or PropertyServerException there is a problem reported in the open metadata server(s)
-
getConnectorTypesByName
public ConnectorTypesResponse getConnectorTypesByName(String serverName, String userId, NameRequestBody requestBody, int startFrom, int pageSize) Retrieve the list of connector type metadata elements with a matching qualified or display name. There are no wildcards supported on this request.- Parameters:
serverName
- name of the service to route the request to.userId
- calling userrequestBody
- name to search forstartFrom
- paging start pointpageSize
- maximum results that can be returned- Returns:
- list of matching metadata elements or InvalidParameterException one of the parameters is invalid or UserNotAuthorizedException the user is not authorized to issue this request or PropertyServerException there is a problem reported in the open metadata server(s)
-
getConnectorTypeByGUID
Retrieve the connector type metadata element with the supplied unique identifier.- Parameters:
serverName
- name of the service to route the request to.userId
- calling userguid
- unique identifier of the requested metadata element- Returns:
- requested metadata element or InvalidParameterException one of the parameters is invalid or UserNotAuthorizedException the user is not authorized to issue this request or PropertyServerException there is a problem reported in the open metadata server(s)
-