Class OCFRESTClient
- java.lang.Object
-
- org.odpi.openmetadata.commonservices.ffdc.rest.FFDCRESTClientBase
-
- org.odpi.openmetadata.commonservices.ffdc.rest.FFDCRESTClient
-
- org.odpi.openmetadata.commonservices.ocf.metadatamanagement.client.OCFRESTClient
-
public class OCFRESTClient extends FFDCRESTClient
OCFRESTClient is responsible for issuing calls to the OCF Management REST APIs.
-
-
Field Summary
-
Fields inherited from class org.odpi.openmetadata.commonservices.ffdc.rest.FFDCRESTClientBase
auditLog, exceptionHandler, serverName, serverPlatformURLRoot
-
-
Constructor Summary
Constructors Modifier Constructor Description OCFRESTClient(String serverName, String serverPlatformURLRoot)Constructor for no authentication.OCFRESTClient(String serverName, String serverPlatformURLRoot, String userId, String password)Constructor for simple userId and password authentication.OCFRESTClient(String serverName, String serverPlatformURLRoot, String userId, String password, AuditLog auditLog)Constructor for simple userId and password authentication with audit log.protectedOCFRESTClient(String serverName, String serverPlatformURLRoot, AuditLog auditLog)Constructor for no authentication with audit log.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description AssetResponsecallOCFAssetGetRESTCall(String methodName, String urlTemplate, Object... params)Issue a GET REST call that returns an AssetResponse object.AssetsResponsecallOCFAssetsGetRESTCall(String methodName, String urlTemplate, Object... params)Issue a GET REST call that returns a AssetsResponse object.AssetsResponsecallOCFAssetsPostRESTCall(String methodName, String urlTemplate, Object requestBody, Object... params)Issue a POST REST call that returns a AssetsResponse object.ConnectionResponsecallOCFConnectionGetRESTCall(String methodName, String urlTemplate, Object... params)Issue a GET REST call that returns a Connection object.TagResponsecallOCFTagGetRESTCall(String methodName, String urlTemplate, Object... params)Issue a GET REST call that returns a TagResponse object.TagsResponsecallOCFTagListGetRESTCall(String methodName, String urlTemplate, Object... params)Issue a GET REST call that returns a TagsResponse object.TagsResponsecallOCFTagListPostRESTCall(String methodName, String urlTemplate, Object requestBody, Object... params)Issue a GET REST call that returns a TagsResponse object.-
Methods inherited from class org.odpi.openmetadata.commonservices.ffdc.rest.FFDCRESTClient
callCountGetRESTCall, callGUIDGetRESTCall, callGUIDListGetRESTCall, callGUIDListPostRESTCall, callGUIDPostRESTCall, callNameListGetRESTCall, callOCFConnectorTypeGetRESTCall, callStringMapGetRESTCall, callVoidGetRESTCall, callVoidPostRESTCall
-
Methods inherited from class org.odpi.openmetadata.commonservices.ffdc.rest.FFDCRESTClientBase
callDeleteRESTCall, callDeleteRESTCall, callGetRESTCall, callGetRESTCall, callGetRESTCallNoParams, callPostRESTCall, callPostRESTCall, callPostRESTCallNoParams, callPutRESTCall, callPutRESTCall
-
-
-
-
Constructor Detail
-
OCFRESTClient
protected OCFRESTClient(String serverName, String serverPlatformURLRoot, AuditLog auditLog) throws InvalidParameterException
Constructor for no authentication with audit log.- Parameters:
serverName- name of the OMAG Server to callserverPlatformURLRoot- URL root of the server platform where the OMAG Server is running.auditLog- destination for log messages.- Throws:
InvalidParameterException- there is a problem creating the client-side components to issue any REST API calls.
-
OCFRESTClient
public OCFRESTClient(String serverName, String serverPlatformURLRoot) throws InvalidParameterException
Constructor for no authentication.- Parameters:
serverName- name of the OMAG Server to callserverPlatformURLRoot- URL root of the server platform where the OMAG Server is running.- Throws:
InvalidParameterException- there is a problem creating the client-side components to issue any REST API calls.
-
OCFRESTClient
public OCFRESTClient(String serverName, String serverPlatformURLRoot, String userId, String password, AuditLog auditLog) throws InvalidParameterException
Constructor for simple userId and password authentication with audit log.- Parameters:
serverName- name of the OMAG Server to callserverPlatformURLRoot- URL root of the server platform where the OMAG Server is running.userId- user id for the HTTP requestpassword- password for the HTTP requestauditLog- destination for log messages.- Throws:
InvalidParameterException- there is a problem creating the client-side components to issue any REST API calls.
-
OCFRESTClient
public OCFRESTClient(String serverName, String serverPlatformURLRoot, String userId, String password) throws InvalidParameterException
Constructor for simple userId and password authentication.- Parameters:
serverName- name of the OMAG Server to callserverPlatformURLRoot- URL root of the server platform where the OMAG Server is running.userId- user id for the HTTP requestpassword- password for the HTTP request- Throws:
InvalidParameterException- there is a problem creating the client-side components to issue any REST API calls.
-
-
Method Detail
-
callOCFAssetGetRESTCall
public AssetResponse callOCFAssetGetRESTCall(String methodName, String urlTemplate, Object... params) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException
Issue a GET REST call that returns an AssetResponse object.- Parameters:
methodName- name of the method being called.urlTemplate- template of the URL for the REST API call with place-holders for the parameters.params- a list of parameters that are slotted into the url template.- Returns:
- AssetResponse
- Throws:
InvalidParameterException- one of the parameters is invalid.UserNotAuthorizedException- the user is not authorized to make this request.PropertyServerException- something went wrong with the REST call stack.
-
callOCFAssetsGetRESTCall
public AssetsResponse callOCFAssetsGetRESTCall(String methodName, String urlTemplate, Object... params) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException
Issue a GET REST call that returns a AssetsResponse object.- Parameters:
methodName- name of the method being called.urlTemplate- template of the URL for the REST API call with place-holders for the parameters.params- a list of parameters that are slotted into the url template.- Returns:
- AssetsResponse
- Throws:
InvalidParameterException- one of the parameters is invalid.UserNotAuthorizedException- the user is not authorized to make this request.PropertyServerException- something went wrong with the REST call stack.
-
callOCFAssetsPostRESTCall
public AssetsResponse callOCFAssetsPostRESTCall(String methodName, String urlTemplate, Object requestBody, Object... params) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException
Issue a POST REST call that returns a AssetsResponse object.- Parameters:
methodName- name of the method being called.requestBody- request body for the REST call - contains most of the parametersurlTemplate- template of the URL for the REST API call with place-holders for the parameters.params- a list of parameters that are slotted into the url template.- Returns:
- AssetsResponse
- Throws:
InvalidParameterException- one of the parameters is invalid.UserNotAuthorizedException- the user is not authorized to make this request.PropertyServerException- something went wrong with the REST call stack.
-
callOCFConnectionGetRESTCall
public ConnectionResponse callOCFConnectionGetRESTCall(String methodName, String urlTemplate, Object... params) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException
Issue a GET REST call that returns a Connection object.- Parameters:
methodName- name of the method being called.urlTemplate- template of the URL for the REST API call with place-holders for the parameters.params- a list of parameters that are slotted into the url template.- Returns:
- ConnectionResponse
- Throws:
InvalidParameterException- one of the parameters is invalid.UserNotAuthorizedException- the user is not authorized to make this request.PropertyServerException- something went wrong with the REST call stack.
-
callOCFTagGetRESTCall
public TagResponse callOCFTagGetRESTCall(String methodName, String urlTemplate, Object... params) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException
Issue a GET REST call that returns a TagResponse object.- Parameters:
methodName- name of the method being called.urlTemplate- template of the URL for the REST API call with place-holders for the parameters.params- a list of parameters that are slotted into the url template.- Returns:
- TagResponse
- Throws:
InvalidParameterException- one of the parameters is invalid.UserNotAuthorizedException- the user is not authorized to make this request.PropertyServerException- something went wrong with the REST call stack.
-
callOCFTagListGetRESTCall
public TagsResponse callOCFTagListGetRESTCall(String methodName, String urlTemplate, Object... params) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException
Issue a GET REST call that returns a TagsResponse object.- Parameters:
methodName- name of the method being called.urlTemplate- template of the URL for the REST API call with place-holders for the parameters.params- a list of parameters that are slotted into the url template.- Returns:
- TagsResponse
- Throws:
InvalidParameterException- one of the parameters is invalid.UserNotAuthorizedException- the user is not authorized to make this request.PropertyServerException- something went wrong with the REST call stack.
-
callOCFTagListPostRESTCall
public TagsResponse callOCFTagListPostRESTCall(String methodName, String urlTemplate, Object requestBody, Object... params) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException
Issue a GET REST call that returns a TagsResponse object.- Parameters:
methodName- name of the method being called.urlTemplate- template of the URL for the REST API call with place-holders for the parameters.requestBody- request body for the REST API callparams- a list of parameters that are slotted into the url template.- Returns:
- TagsResponse
- Throws:
InvalidParameterException- one of the parameters is invalid.UserNotAuthorizedException- the user is not authorized to make this request.PropertyServerException- something went wrong with the REST call stack.
-
-