Class OCFRESTServices
java.lang.Object
org.odpi.openmetadata.frameworkservices.ocf.metadatamanagement.server.OCFRESTServices
The OCFRESTServices is the server-side implementation of the Connected Asset REST interface used by connectors.
-
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
-
OCFRESTServices
public OCFRESTServices()Default constructor
-
-
Method Details
-
getConnectionByGUID
public OCFConnectionResponse getConnectionByGUID(String serverName, String serviceURLName, String userId, String guid) Returns the connection object corresponding to the supplied connection 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.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
public OCFConnectionResponse getConnectionByName(String serverName, String serviceURLName, String userId, String name) Returns the connection object corresponding to the supplied connection name.- 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.name
- this may be the qualifiedName or displayName of the connection.- Returns:
- connection object or InvalidParameterException - one of the parameters is null or invalid or UnrecognizedConnectionNameException - there is no connection defined for this name or AmbiguousConnectionNameException - there is more than one 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
public OCFConnectionResponse getConnectionForAsset(String serverName, String serviceURLName, String userId, String assetGUID) Returns the connection corresponding 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.- 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.
-
saveConnectionForAsset
public GUIDResponse saveConnectionForAsset(String serverName, String serviceURLName, String userId, String assetGUID, 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.
-