Class ConnectedAssetContext
java.lang.Object
org.odpi.openmetadata.frameworks.integration.context.ConnectedAssetContext
-
Constructor Summary
ConstructorDescriptionConnectedAssetContext
(String userId, OpenIntegrationClient openIntegrationClient) Constructor sets up the key parameters for accessing the asset store. -
Method Summary
Modifier and TypeMethodDescriptiongetAssetProperties
(String assetGUID) Returns a comprehensive collection of properties about the requested asset.getConnectorToAsset
(String assetGUID, AuditLog auditLog) Return the connector to the requested asset.saveConnection
(String assetGUID, Connection connection) Returns the unique identifier corresponding to the supplied connection.saveConnection
(Connection connection) Returns the unique identifier corresponding to the supplied connection.
-
Constructor Details
-
ConnectedAssetContext
Constructor sets up the key parameters for accessing the asset store.- Parameters:
userId
- calling useropenIntegrationClient
- client to make the calls
-
-
Method Details
-
saveConnection
public String saveConnection(Connection connection) throws InvalidParameterException, PropertyServerException, UserNotAuthorizedException, ConnectionCheckedException, ConnectorCheckedException Returns the unique identifier corresponding to the supplied connection.- Parameters:
connection
- the connection object that contains the properties needed to create the connection.- Returns:
- guid
- Throws:
InvalidParameterException
- one of the parameters is null or invalid.PropertyServerException
- there is a problem retrieving the asset properties from the property servers.UserNotAuthorizedException
- the requesting user is not authorized to issue this request.ConnectionCheckedException
- there are errors in the configuration of the connection which is preventing the creation of a connector.ConnectorCheckedException
- there are errors in the initialization of the connector.
-
saveConnection
public String saveConnection(String assetGUID, Connection connection) throws InvalidParameterException, PropertyServerException, UserNotAuthorizedException, ConnectionCheckedException, ConnectorCheckedException Returns the unique identifier corresponding to the supplied connection.- Parameters:
assetGUID
- 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:
InvalidParameterException
- one of the parameters is null or invalid.PropertyServerException
- there is a problem retrieving the asset properties from the property servers.UserNotAuthorizedException
- the requesting user is not authorized to issue this request.ConnectionCheckedException
- there are errors in the configuration of the connection which is preventing the creation of a connector.ConnectorCheckedException
- there are errors in the initialization of the connector.
-
getAssetProperties
public AssetUniverse getAssetProperties(String assetGUID) throws InvalidParameterException, PropertyServerException, UserNotAuthorizedException Returns a comprehensive collection of properties about the requested asset.- Parameters:
assetGUID
- the unique identifier of an asset to attach the connection to- Returns:
- a comprehensive collection of properties about the asset.
- Throws:
InvalidParameterException
- one of the parameters is null or invalid.PropertyServerException
- there is a problem retrieving the asset properties from the property servers.UserNotAuthorizedException
- the requesting user is not authorized to issue this request.
-
getConnectorToAsset
public Connector getConnectorToAsset(String assetGUID, AuditLog auditLog) throws InvalidParameterException, ConnectionCheckedException, ConnectorCheckedException, UserNotAuthorizedException, PropertyServerException Return the connector to the requested asset.- Parameters:
assetGUID
- the unique identifier of an asset to attach the connection toauditLog
- optional logging destination- Returns:
- Open Connector Framework (OCF) connector
- Throws:
InvalidParameterException
- the asset guid is not recognized or the userId is nullConnectionCheckedException
- there are errors in the configuration of the connection which is preventing the creation of a connector.ConnectorCheckedException
- there are errors in the initialization of the connector.UserNotAuthorizedException
- the user is not authorized to access the asset and/or connection needed to create the connector.PropertyServerException
- there was a problem in the store whether the asset/connection properties are kept.
-