Class FFDCRESTClient
java.lang.Object
org.odpi.openmetadata.commonservices.ffdc.rest.FFDCRESTClientBase
org.odpi.openmetadata.commonservices.ffdc.rest.FFDCRESTClient
- Direct Known Subclasses:
EngineHostRESTClient,GovernanceActionRESTClient,OCFRESTClient,OMFRESTClient,RepositoryGovernanceRESTClient,ServerOperationsRESTClient
RESTClient is responsible for issuing calls to the OMAS REST APIs.
-
Field Summary
Fields inherited from class org.odpi.openmetadata.commonservices.ffdc.rest.FFDCRESTClientBase
auditLog, exceptionHandler, serverName, serverPlatformURLRoot -
Constructor Summary
ConstructorsConstructorDescriptionFFDCRESTClient(String serverName, String serverPlatformURLRoot, String secretsStoreProvider, String secretsStoreLocation, String secretsStoreCollection, AuditLog auditLog) Constructor for no authentication with audit log.FFDCRESTClient(String serverName, String serverPlatformURLRoot, Map<String, SecretsStoreConnector> secretsStoreConnectorMap, AuditLog auditLog) Create a new client with no authentication embedded in the HTTP request. -
Method Summary
Modifier and TypeMethodDescriptioncallBooleanGetRESTCall(String methodName, String urlTemplate, Object... params) Issue a POST REST call that returns a BooleanResponse object.callElementHeadersPostRESTCall(String methodName, String urlTemplate, Object requestBody, Object... params) Issue a POST REST call that returns a ElementHeadersResponse object.callGUIDListGetRESTCall(String methodName, String urlTemplate, Object... params) Issue a GET REST call that returns a list of GUIDs object.callGUIDPostRESTCall(String methodName, String urlTemplate, Object requestBody, Object... params) Issue a POST REST call that returns a guid object.callOCFConnectorReportGetRESTCall(String methodName, String urlTemplate, Object... params) Issue a GET REST call that returns a ConnectorReportResponse object.callVoidGetRESTCall(String methodName, String urlTemplate, Object... params) Issue a POST REST call that returns a VoidResponse object.callVoidPostRESTCall(String methodName, String urlTemplate, Object requestBody, Object... params) Issue a POST REST call that returns a VoidResponse object.Methods inherited from class org.odpi.openmetadata.commonservices.ffdc.rest.FFDCRESTClientBase
callDeleteRESTCall, callDeleteRESTCall, callGetRESTCall, callGetRESTCall, callGetRESTCallNoParams, callPostRESTCall, callPostRESTCall, callPostRESTCallNoParams, callPutRESTCall, callPutRESTCall
-
Constructor Details
-
FFDCRESTClient
public FFDCRESTClient(String serverName, String serverPlatformURLRoot, String secretsStoreProvider, String secretsStoreLocation, String secretsStoreCollection, 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.secretsStoreProvider- secrets store connector for bearer tokensecretsStoreLocation- secrets store location for bearer tokensecretsStoreCollection- secrets store collection for bearer tokenauditLog- destination for log messages.- Throws:
InvalidParameterException- there is a problem creating the client-side components to issue any REST API calls.
-
FFDCRESTClient
public FFDCRESTClient(String serverName, String serverPlatformURLRoot, Map<String, SecretsStoreConnector> secretsStoreConnectorMap, AuditLog auditLog) throws InvalidParameterExceptionCreate a new client with no authentication embedded in the HTTP request.- Parameters:
serverName- name of the OMAG Server to callserverPlatformURLRoot- URL root of the server platform where the OMAG Server is runningsecretsStoreConnectorMap- connectors to secrets storesauditLog- destination for log messages- Throws:
InvalidParameterException- there is a problem creating the client-side components to issue any REST API calls.
-
-
Method Details
-
callGUIDPostRESTCall
public GUIDResponse callGUIDPostRESTCall(String methodName, String urlTemplate, Object requestBody, Object... params) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException Issue a POST REST call that returns a guid object.- Parameters:
methodName- name of the method being calledurlTemplate- template of the URL for the REST API with place-holders for the parameters.requestBody- request body for the request.params- a list of parameters that are slotted into the url template.- Returns:
- GUIDResponse
- 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.
-
callGUIDListGetRESTCall
public GUIDListResponse callGUIDListGetRESTCall(String methodName, String urlTemplate, Object... params) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException Issue a GET REST call that returns a list of GUIDs object.- Parameters:
methodName- name of the method being called.urlTemplate- template of the URL for the REST API with place-holders for the parameters.params- a list of parameters that are slotted into the url template.- Returns:
- GUIDListResponse
- 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.
-
callVoidGetRESTCall
public VoidResponse callVoidGetRESTCall(String methodName, String urlTemplate, Object... params) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException Issue a POST REST call that returns a VoidResponse object. This is typically a create- Parameters:
methodName- name of the method being called.urlTemplate- template of the URL for the REST API with place-holders for the parameters.params- a list of parameters that are slotted into the url template.- Returns:
- VoidResponse
- 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.
-
callBooleanGetRESTCall
public BooleanResponse callBooleanGetRESTCall(String methodName, String urlTemplate, Object... params) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException Issue a POST REST call that returns a BooleanResponse object.- Parameters:
methodName- name of the method being called.urlTemplate- template of the URL for the REST API with place-holders for the parameters.params- a list of parameters that are slotted into the url template.- Returns:
- response object
- 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.
-
callVoidPostRESTCall
public VoidResponse callVoidPostRESTCall(String methodName, String urlTemplate, Object requestBody, Object... params) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException Issue a POST REST call that returns a VoidResponse object. This is typically a create- Parameters:
methodName- name of the method being called.urlTemplate- template of the URL for the REST API with place-holders for the parameters.requestBody- request body for the request.params- a list of parameters that are slotted into the url template.- Returns:
- VoidResponse
- 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.
-
callElementHeadersPostRESTCall
public ElementHeadersResponse callElementHeadersPostRESTCall(String methodName, String urlTemplate, Object requestBody, Object... params) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException Issue a POST REST call that returns a ElementHeadersResponse 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- object that passes additional parametersparams- a list of parameters that are slotted into the url template.- Returns:
- response object
- Throws:
InvalidParameterException- one of the parameters is invalid.UserNotAuthorizedException- the user is not authorized to make this request.PropertyServerException- the repository is not available or not working properly.
-
callOCFConnectorReportGetRESTCall
public ConnectorReportResponse callOCFConnectorReportGetRESTCall(String methodName, String urlTemplate, Object... params) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException Issue a GET REST call that returns a ConnectorReportResponse object.- Parameters:
methodName- name of the method being called.urlTemplate- template of the URL for the REST API with place-holders for the parameters.params- a list of parameters that are slotted into the url template.- Returns:
- ConnectorReportResponse
- 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.
-