Class ConnectedAssetResource
java.lang.Object
org.odpi.openmetadata.frameworkservices.ocf.metadatamanagement.server.spring.ConnectedAssetResource
@RestController
@RequestMapping("/servers/{serverName}/open-metadata/access-services/{serviceURLName}/connected-asset/users/{userId}")
public class ConnectedAssetResource
extends Object
The ConnectedAssetResource is the server-side implementation of the REST services needed to
populate the Open Connector Framework (OCF) Connected Asset Properties.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiongetConnectionByGUID
(String serverName, String serviceURLName, String userId, String guid) Returns the connection object corresponding to the supplied connection GUID.getConnectionByName
(String serverName, String serviceURLName, String userId, String name) Returns the connection object corresponding to the supplied connection name.getConnectionForAsset
(String serverName, String serviceURLName, String userId, String assetGUID) Returns the connection corresponding to the supplied asset GUID.saveConnectionForAsset
(String serverName, String serviceURLName, String userId, String assetGUID, Connection connection) Save the connection optionally linked to the supplied asset GUID.
-
Constructor Details
-
ConnectedAssetResource
public ConnectedAssetResource()Default constructor
-
-
Method Details
-
getConnectionByGUID
@GetMapping(path="/connections/{guid}") public OCFConnectionResponse getConnectionByGUID(@PathVariable String serverName, @PathVariable String serviceURLName, @PathVariable String userId, @PathVariable String guid) Returns the connection object corresponding to the supplied connection GUID.- Parameters:
serverName
- name of the server instances for this request.serviceURLName
- name of the service that created the connector that issued this request.userId
- userId of user making request.guid
- the unique id for the connection within the property server.- Returns:
- connection object or InvalidParameterException one of the parameters is null or invalid or UnrecognizedConnectionGUIDException the supplied GUID is not recognized by the metadata repository or PropertyServerException there is a problem retrieving information from the property (metadata) server or UserNotAuthorizedException the requesting user is not authorized to issue this request.
-
getConnectionByName
@GetMapping(path="/connections/by-name/{name}") public OCFConnectionResponse getConnectionByName(@PathVariable String serverName, @PathVariable String serviceURLName, @PathVariable String userId, @PathVariable String name) Returns the connection object corresponding to the supplied connection name.- Parameters:
serverName
- name of the server instances for this request.serviceURLName
- name of the service that created the connector that issued this request.userId
- userId of user making request.name
- the unique name for the connection within the property server.- Returns:
- connection object or InvalidParameterException one of the parameters is null or invalid or UnrecognizedConnectionGUIDException the supplied GUID is not recognized by the metadata repository or PropertyServerException there is a problem retrieving information from the property (metadata) server or UserNotAuthorizedException the requesting user is not authorized to issue this request.
-
saveConnectionForAsset
@PostMapping(path="/connections") public GUIDResponse saveConnectionForAsset(@PathVariable String serverName, @PathVariable String serviceURLName, @PathVariable String userId, @RequestParam(required=false) String assetGUID, @RequestBody Connection connection) Save the connection optionally linked to the supplied asset GUID.- Parameters:
serverName
- name of the server instances for this requestserviceURLName
- String name of the service that created the connector that issued this request.userId
- userId of user making request.assetGUID
- the unique id for the asset within the metadata repository. This optional. However, if specified then the new connection is attached to the assetconnection
- connection to save- Returns:
- connection object or InvalidParameterException one of the parameters is null or invalid or UnrecognizedConnectionNameException there is no connection defined for this name or PropertyServerException there is a problem retrieving information from the property (metadata) server or UserNotAuthorizedException the requesting user is not authorized to issue this request.
-
getConnectionForAsset
@GetMapping(path="/assets/{assetGUID}/connection") public OCFConnectionResponse getConnectionForAsset(@PathVariable String serverName, @PathVariable String serviceURLName, @PathVariable String userId, @PathVariable String assetGUID) Returns the connection corresponding to the supplied asset GUID.- Parameters:
serverName
- name of the server instances for this requestserviceURLName
- name of the service that created the connector that issued this request.userId
- userId of user making request.assetGUID
- the unique id for the asset within the metadata repository.- Returns:
- connection object or InvalidParameterException one of the parameters is null or invalid or UnrecognizedConnectionNameException there is no connection defined for this name or PropertyServerException there is a problem retrieving information from the property (metadata) server or UserNotAuthorizedException the requesting user is not authorized to issue this request.
-