Class ConnectedAssetClientBase
java.lang.Object
org.odpi.openmetadata.frameworkservices.ocf.metadatamanagement.client.ConnectedAssetClientBase
- All Implemented Interfaces:
org.odpi.openmetadata.frameworkservices.ocf.metadatamanagement.api.ConnectorFactoryInterface
public class ConnectedAssetClientBase
extends Object
implements org.odpi.openmetadata.frameworkservices.ocf.metadatamanagement.api.ConnectorFactoryInterface
ConnectedAssetClientBase provides a base calls for clients that support an OCF interface.
In particular, it manages the retrieval of connections for assets, and the creation of connectors.
-
Constructor Summary
ConstructorsConstructorDescriptionConnectedAssetClientBase(String serverName, String serverPlatformURLRoot, String serviceURLMarker) Create a new client with no authentication embedded in the HTTP request.ConnectedAssetClientBase(String serverName, String serverPlatformURLRoot, String serviceURLMarker, int maxPageSize, org.odpi.openmetadata.frameworks.auditlog.AuditLog auditLog) Create a new client with no authentication embedded in the HTTP request.ConnectedAssetClientBase(String serverName, String serverPlatformURLRoot, String serviceURLMarker, String userId, String password) Create a new client that passes userId and password in each HTTP request.ConnectedAssetClientBase(String serverName, String serverPlatformURLRoot, String serviceURLMarker, String userId, String password, org.odpi.openmetadata.frameworks.auditlog.AuditLog auditLog) Create a new client that passes userId and password in each HTTP request.ConnectedAssetClientBase(String serverName, String serverPlatformURLRoot, String serviceURLMarker, org.odpi.openmetadata.frameworks.auditlog.AuditLog auditLog) Create a new client with no authentication embedded in the HTTP request. -
Method Summary
Modifier and TypeMethodDescriptionorg.odpi.openmetadata.frameworks.connectors.properties.beans.AssetgetAnchorAssetFromGUID(String userId, String guid) Returns the anchor asset.org.odpi.openmetadata.frameworks.connectors.properties.AssetUniversegetAssetProperties(String userId, String assetGUID) Returns a comprehensive collection of properties about the requested asset.org.odpi.openmetadata.frameworks.connectors.properties.beans.ConnectiongetConnectionForAsset(OCFRESTClient restClient, String serviceName, String userId, String assetGUID) Returns the connection corresponding to the supplied asset GUID.org.odpi.openmetadata.frameworks.connectors.ConnectorgetConnectorByConnection(String userId, org.odpi.openmetadata.frameworks.connectors.properties.beans.Connection connection) Returns the connector corresponding to the supplied connection.org.odpi.openmetadata.frameworks.connectors.ConnectorgetConnectorByGUID(String userId, String connectionGUID) Returns the connector corresponding to the supplied connection GUID.org.odpi.openmetadata.frameworks.connectors.ConnectorgetConnectorByName(String userId, String connectionName) Returns the connector corresponding to the supplied connection name.org.odpi.openmetadata.frameworks.connectors.ConnectorgetConnectorForAsset(String userId, String assetGUID) Returns the connector corresponding to the supplied asset GUID.org.odpi.openmetadata.frameworks.connectors.ConnectorgetConnectorForAsset(String userId, String assetGUID, org.odpi.openmetadata.frameworks.auditlog.AuditLog auditLog) Returns the connector corresponding to the supplied asset GUID.voidlogAssetAuditMessage(String userId, String assetGUID, String serviceName, String message) Log an audit message about this asset.saveConnection(String userId, String assetGUID, org.odpi.openmetadata.frameworks.connectors.properties.beans.Connection connection) Returns the unique identifier corresponding to the supplied connection.saveConnection(String userId, org.odpi.openmetadata.frameworks.connectors.properties.beans.Connection connection) Returns the unique identifier corresponding to the supplied connection.
-
Constructor Details
-
ConnectedAssetClientBase
public ConnectedAssetClientBase(String serverName, String serverPlatformURLRoot, String serviceURLMarker, org.odpi.openmetadata.frameworks.auditlog.AuditLog auditLog) throws org.odpi.openmetadata.frameworks.connectors.ffdc.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 OCF REST servicesserviceURLMarker- indicator of the OMAS that this client is supportingauditLog- destination for log messages- Throws:
org.odpi.openmetadata.frameworks.connectors.ffdc.InvalidParameterException- there is a problem creating the client-side components to issue any REST API calls.
-
ConnectedAssetClientBase
public ConnectedAssetClientBase(String serverName, String serverPlatformURLRoot, String serviceURLMarker, int maxPageSize, org.odpi.openmetadata.frameworks.auditlog.AuditLog auditLog) throws org.odpi.openmetadata.frameworks.connectors.ffdc.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 OCF REST servicesmaxPageSize- maximum page size for this processserviceURLMarker- indicator of the OMAS that this client is supportingauditLog- destination for log messages- Throws:
org.odpi.openmetadata.frameworks.connectors.ffdc.InvalidParameterException- there is a problem creating the client-side components to issue any REST API calls.
-
ConnectedAssetClientBase
public ConnectedAssetClientBase(String serverName, String serverPlatformURLRoot, String serviceURLMarker) throws org.odpi.openmetadata.frameworks.connectors.ffdc.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 OCF REST servicesserviceURLMarker- indicator of the OMAS that this client is supporting- Throws:
org.odpi.openmetadata.frameworks.connectors.ffdc.InvalidParameterException- there is a problem creating the client-side components to issue any REST API calls.
-
ConnectedAssetClientBase
public ConnectedAssetClientBase(String serverName, String serverPlatformURLRoot, String serviceURLMarker, String userId, String password, org.odpi.openmetadata.frameworks.auditlog.AuditLog auditLog) throws org.odpi.openmetadata.frameworks.connectors.ffdc.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 OCF REST servicesserviceURLMarker- indicator of the OMAS that this client is supportinguserId- caller's userId embedded in all HTTP requestspassword- caller's userId embedded in all HTTP requestsauditLog- destination for log messages- Throws:
org.odpi.openmetadata.frameworks.connectors.ffdc.InvalidParameterException- there is a problem creating the client-side components to issue any REST API calls.
-
ConnectedAssetClientBase
public ConnectedAssetClientBase(String serverName, String serverPlatformURLRoot, String serviceURLMarker, String userId, String password) throws org.odpi.openmetadata.frameworks.connectors.ffdc.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 OCF REST servicesserviceURLMarker- indicator of the OMAS that this client is supportinguserId- caller's userId embedded in all HTTP requestspassword- caller's userId embedded in all HTTP requests- Throws:
org.odpi.openmetadata.frameworks.connectors.ffdc.InvalidParameterException- there is a problem creating the client-side components to issue any REST API calls.
-
-
Method Details
-
getAssetProperties
public org.odpi.openmetadata.frameworks.connectors.properties.AssetUniverse getAssetProperties(String userId, String assetGUID) throws org.odpi.openmetadata.frameworks.connectors.ffdc.InvalidParameterException, org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException, org.odpi.openmetadata.frameworks.connectors.ffdc.UserNotAuthorizedException Returns a comprehensive collection of properties about the requested asset.- Parameters:
userId- userId of user making request.assetGUID- unique identifier for asset.- Returns:
- a comprehensive collection of properties about the asset.
- Throws:
org.odpi.openmetadata.frameworks.connectors.ffdc.InvalidParameterException- one of the parameters is null or invalid.org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException- there is a problem retrieving the asset properties from the property servers).org.odpi.openmetadata.frameworks.connectors.ffdc.UserNotAuthorizedException- the requesting user is not authorized to issue this request.
-
logAssetAuditMessage
public void logAssetAuditMessage(String userId, String assetGUID, String serviceName, String message) throws org.odpi.openmetadata.frameworks.connectors.ffdc.InvalidParameterException, org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException, org.odpi.openmetadata.frameworks.connectors.ffdc.UserNotAuthorizedException Log an audit message about this asset.- Parameters:
userId- the userId of the requesting user.assetGUID- unique identifier for the asset.serviceName- name of survey servicemessage- message to log- Throws:
org.odpi.openmetadata.frameworks.connectors.ffdc.InvalidParameterException- one of the parameters is null or invalid.org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException- there is a problem retrieving the asset properties from the property servers).org.odpi.openmetadata.frameworks.connectors.ffdc.UserNotAuthorizedException- the requesting user is not authorized to issue this request.
-
getConnectionForAsset
public org.odpi.openmetadata.frameworks.connectors.properties.beans.Connection getConnectionForAsset(OCFRESTClient restClient, String serviceName, String userId, String assetGUID) throws org.odpi.openmetadata.frameworks.connectors.ffdc.InvalidParameterException, org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException, org.odpi.openmetadata.frameworks.connectors.ffdc.UserNotAuthorizedException Returns the connection corresponding to the supplied asset GUID.- Parameters:
restClient- client that calls REST APIsserviceName- name of the calling serviceuserId- userId of user making request.assetGUID- the unique id for the asset within the metadata repository.- Returns:
- connector instance.
- Throws:
org.odpi.openmetadata.frameworks.connectors.ffdc.InvalidParameterException- one of the parameters is null or invalid.org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException- there is a problem retrieving information from the property server(s).org.odpi.openmetadata.frameworks.connectors.ffdc.UserNotAuthorizedException- the requesting user is not authorized to issue this request.
-
getAnchorAssetFromGUID
public org.odpi.openmetadata.frameworks.connectors.properties.beans.Asset getAnchorAssetFromGUID(String userId, String guid) throws org.odpi.openmetadata.frameworks.connectors.ffdc.InvalidParameterException, org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException, org.odpi.openmetadata.frameworks.connectors.ffdc.UserNotAuthorizedException Returns the anchor asset.- Parameters:
userId- the userId of the requesting user.guid- unique identifier for the metadata element.- Returns:
- the anchor asset.
- Throws:
org.odpi.openmetadata.frameworks.connectors.ffdc.InvalidParameterException- one of the parameters is null or invalid.org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException- there is a problem retrieving information from the property server.org.odpi.openmetadata.frameworks.connectors.ffdc.UserNotAuthorizedException- the requesting user is not authorized to issue this request.
-
saveConnection
public String saveConnection(String userId, org.odpi.openmetadata.frameworks.connectors.properties.beans.Connection connection) throws org.odpi.openmetadata.frameworks.connectors.ffdc.InvalidParameterException, org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException, org.odpi.openmetadata.frameworks.connectors.ffdc.UserNotAuthorizedException, org.odpi.openmetadata.frameworks.connectors.ffdc.ConnectionCheckedException, org.odpi.openmetadata.frameworks.connectors.ffdc.ConnectorCheckedException Returns the unique identifier corresponding to the supplied connection.- Parameters:
userId- calling userconnection- the connection object that contains the properties needed to create the connection.- Returns:
- guid
- Throws:
org.odpi.openmetadata.frameworks.connectors.ffdc.InvalidParameterException- one of the parameters is null or invalid.org.odpi.openmetadata.frameworks.connectors.ffdc.ConnectionCheckedException- there are errors in the configuration of the connection which is preventing the creation of a connector.org.odpi.openmetadata.frameworks.connectors.ffdc.ConnectorCheckedException- there are errors in the initialization of the connector.org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerExceptionorg.odpi.openmetadata.frameworks.connectors.ffdc.UserNotAuthorizedException
-
saveConnection
public String saveConnection(String userId, String assetGUID, org.odpi.openmetadata.frameworks.connectors.properties.beans.Connection connection) throws org.odpi.openmetadata.frameworks.connectors.ffdc.InvalidParameterException, org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException, org.odpi.openmetadata.frameworks.connectors.ffdc.UserNotAuthorizedException, org.odpi.openmetadata.frameworks.connectors.ffdc.ConnectionCheckedException, org.odpi.openmetadata.frameworks.connectors.ffdc.ConnectorCheckedException Returns the unique identifier corresponding to the supplied connection.- Parameters:
userId- calling userassetGUID- the unique identifier of an asset to attach the connection toconnection- the connection object that contains the properties needed to create the connection.- Returns:
- guid
- Throws:
org.odpi.openmetadata.frameworks.connectors.ffdc.InvalidParameterException- one of the parameters is null or invalid.org.odpi.openmetadata.frameworks.connectors.ffdc.ConnectionCheckedException- there are errors in the configuration of the connection which is preventing the creation of a connector.org.odpi.openmetadata.frameworks.connectors.ffdc.ConnectorCheckedException- there are errors in the initialization of the connector.org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerExceptionorg.odpi.openmetadata.frameworks.connectors.ffdc.UserNotAuthorizedException
-
getConnectorByName
public org.odpi.openmetadata.frameworks.connectors.Connector getConnectorByName(String userId, String connectionName) throws org.odpi.openmetadata.frameworks.connectors.ffdc.InvalidParameterException, org.odpi.openmetadata.frameworks.connectors.ffdc.ConnectionCheckedException, org.odpi.openmetadata.frameworks.connectors.ffdc.ConnectorCheckedException, org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException, org.odpi.openmetadata.frameworks.connectors.ffdc.UserNotAuthorizedException Returns the connector corresponding to the supplied connection name.- Specified by:
getConnectorByNamein interfaceorg.odpi.openmetadata.frameworkservices.ocf.metadatamanagement.api.ConnectorFactoryInterface- Parameters:
userId- userId of user making request.connectionName- this may be the qualifiedName or displayName of the connection.- Returns:
- connector instance - or null if there is no connection
- Throws:
org.odpi.openmetadata.frameworks.connectors.ffdc.InvalidParameterException- one of the parameters is null or invalid.org.odpi.openmetadata.frameworks.connectors.ffdc.ConnectionCheckedException- there are errors in the configuration of the connection which is preventing the creation of a connector.org.odpi.openmetadata.frameworks.connectors.ffdc.ConnectorCheckedException- there are errors in the initialization of the connector.org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException- there is a problem retrieving information from the property server(s).org.odpi.openmetadata.frameworks.connectors.ffdc.UserNotAuthorizedException- the requesting user is not authorized to issue this request.
-
getConnectorForAsset
public org.odpi.openmetadata.frameworks.connectors.Connector getConnectorForAsset(String userId, String assetGUID) throws org.odpi.openmetadata.frameworks.connectors.ffdc.InvalidParameterException, org.odpi.openmetadata.frameworks.connectors.ffdc.ConnectionCheckedException, org.odpi.openmetadata.frameworks.connectors.ffdc.ConnectorCheckedException, org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException, org.odpi.openmetadata.frameworks.connectors.ffdc.UserNotAuthorizedException Returns the connector corresponding to the supplied asset GUID.- Specified by:
getConnectorForAssetin interfaceorg.odpi.openmetadata.frameworkservices.ocf.metadatamanagement.api.ConnectorFactoryInterface- Parameters:
userId- userId of user making request.assetGUID- the unique id for the asset within the metadata repository.- Returns:
- connector instance - or null if there is no connection
- Throws:
org.odpi.openmetadata.frameworks.connectors.ffdc.InvalidParameterException- one of the parameters is null or invalid.org.odpi.openmetadata.frameworks.connectors.ffdc.ConnectionCheckedException- there are errors in the configuration of the connection which is preventing the creation of a connector.org.odpi.openmetadata.frameworks.connectors.ffdc.ConnectorCheckedException- there are errors in the initialization of the connector.org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException- there is a problem retrieving information from the property server(s).org.odpi.openmetadata.frameworks.connectors.ffdc.UserNotAuthorizedException- the requesting user is not authorized to issue this request.
-
getConnectorForAsset
public org.odpi.openmetadata.frameworks.connectors.Connector getConnectorForAsset(String userId, String assetGUID, org.odpi.openmetadata.frameworks.auditlog.AuditLog auditLog) throws org.odpi.openmetadata.frameworks.connectors.ffdc.InvalidParameterException, org.odpi.openmetadata.frameworks.connectors.ffdc.ConnectionCheckedException, org.odpi.openmetadata.frameworks.connectors.ffdc.ConnectorCheckedException, org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException, org.odpi.openmetadata.frameworks.connectors.ffdc.UserNotAuthorizedException Returns the connector corresponding to the supplied asset GUID.- Specified by:
getConnectorForAssetin interfaceorg.odpi.openmetadata.frameworkservices.ocf.metadatamanagement.api.ConnectorFactoryInterface- Parameters:
userId- userId of user making request.assetGUID- the unique id for the asset within the metadata repository.auditLog- optional logging destination- Returns:
- connector instance - or null if there is no connection
- Throws:
org.odpi.openmetadata.frameworks.connectors.ffdc.InvalidParameterException- one of the parameters is null or invalid.org.odpi.openmetadata.frameworks.connectors.ffdc.ConnectionCheckedException- there are errors in the configuration of the connection which is preventing the creation of a connector.org.odpi.openmetadata.frameworks.connectors.ffdc.ConnectorCheckedException- there are errors in the initialization of the connector.org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException- there is a problem retrieving information from the property server(s).org.odpi.openmetadata.frameworks.connectors.ffdc.UserNotAuthorizedException- the requesting user is not authorized to issue this request.
-
getConnectorByGUID
public org.odpi.openmetadata.frameworks.connectors.Connector getConnectorByGUID(String userId, String connectionGUID) throws org.odpi.openmetadata.frameworks.connectors.ffdc.InvalidParameterException, org.odpi.openmetadata.frameworks.connectors.ffdc.ConnectionCheckedException, org.odpi.openmetadata.frameworks.connectors.ffdc.ConnectorCheckedException, org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException, org.odpi.openmetadata.frameworks.connectors.ffdc.UserNotAuthorizedException Returns the connector corresponding to the supplied connection GUID.- Specified by:
getConnectorByGUIDin interfaceorg.odpi.openmetadata.frameworkservices.ocf.metadatamanagement.api.ConnectorFactoryInterface- Parameters:
userId- userId of user making request.connectionGUID- the unique id for the connection within the metadata repository.- Returns:
- connector instance - or null if there is no connection
- Throws:
org.odpi.openmetadata.frameworks.connectors.ffdc.InvalidParameterException- one of the parameters is null or invalid.org.odpi.openmetadata.frameworks.connectors.ffdc.ConnectionCheckedException- there are errors in the configuration of the connection which is preventing the creation of a connector.org.odpi.openmetadata.frameworks.connectors.ffdc.ConnectorCheckedException- there are errors in the initialization of the connector.org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException- there is a problem retrieving information from the property server(s).org.odpi.openmetadata.frameworks.connectors.ffdc.UserNotAuthorizedException- the requesting user is not authorized to issue this request.
-
getConnectorByConnection
public org.odpi.openmetadata.frameworks.connectors.Connector getConnectorByConnection(String userId, org.odpi.openmetadata.frameworks.connectors.properties.beans.Connection connection) throws org.odpi.openmetadata.frameworks.connectors.ffdc.InvalidParameterException, org.odpi.openmetadata.frameworks.connectors.ffdc.ConnectionCheckedException, org.odpi.openmetadata.frameworks.connectors.ffdc.ConnectorCheckedException Returns the connector corresponding to the supplied connection.- Specified by:
getConnectorByConnectionin interfaceorg.odpi.openmetadata.frameworkservices.ocf.metadatamanagement.api.ConnectorFactoryInterface- Parameters:
userId- userId of user making request.connection- the connection object that contains the properties needed to create the connection.- Returns:
- connector instance
- Throws:
org.odpi.openmetadata.frameworks.connectors.ffdc.InvalidParameterException- one of the parameters is null or invalid.org.odpi.openmetadata.frameworks.connectors.ffdc.ConnectionCheckedException- there are errors in the configuration of the connection which is preventing the creation of a connector.org.odpi.openmetadata.frameworks.connectors.ffdc.ConnectorCheckedException- there are errors in the initialization of the connector.
-