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
,OpenIntegrationRESTClient
,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) Constructor for no authentication.FFDCRESTClient
(String serverName, String serverPlatformURLRoot, String userId, String password) Constructor for simple userId and password authentication.FFDCRESTClient
(String serverName, String serverPlatformURLRoot, String userId, String password, AuditLog auditLog) Constructor for simple userId and password authentication with audit log.FFDCRESTClient
(String serverName, String serverPlatformURLRoot, AuditLog auditLog) Constructor for no authentication with audit log. -
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, 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.
-
FFDCRESTClient
public FFDCRESTClient(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.
-
FFDCRESTClient
public FFDCRESTClient(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.
-
FFDCRESTClient
public FFDCRESTClient(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 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.
-