Class FFDCRESTClient
java.lang.Object
org.odpi.openmetadata.commonservices.ffdc.rest.FFDCRESTClientBase
org.odpi.openmetadata.commonservices.ffdc.rest.FFDCRESTClient
- Direct Known Subclasses:
AssetLineage
,AssetManagerRESTClient
,CommunityProfileRESTClient
,DigitalArchitectureRESTClient
,DigitalServiceRESTClient
,EngineHostRESTClient
,GlossaryAuthorViewRestClient
,GlossaryViewClient
,GovernanceActionRESTClient
,GovernanceProgramRESTClient
,GovernedAssetClient
,OCFRESTClient
,OpenIntegrationRESTClient
,OpenLineageClient
,ProjectManagementRESTClient
,RepositoryGovernanceRESTClient
,StewardshipActionRESTClient
,SubjectAreaRestClient
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.callCountGetRESTCall
(String methodName, String urlTemplate, Object... params) Issue a GET REST call that returns a CountResponse object.callGUIDGetRESTCall
(String methodName, String urlTemplate, Object... params) Issue a GET REST call that returns a GUIDResponse object.callGUIDListGetRESTCall
(String methodName, String urlTemplate, Object... params) Issue a GET REST call that returns a list of GUIDs object.callGUIDListPostRESTCall
(String methodName, String urlTemplate, Object requestBody, Object... params) Issue a POST 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.callNameListGetRESTCall
(String methodName, String urlTemplate, Object... params) Issue a GET REST call that returns a list of names.callOCFConnectorReportGetRESTCall
(String methodName, String urlTemplate, Object... params) Issue a GET REST call that returns a ConnectorReportResponse object.callStringMapGetRESTCall
(String methodName, String urlTemplate, Object... params) Issue a GET REST call that returns a list of names mapped to their descriptions.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
-
callNameListGetRESTCall
public NameListResponse callNameListGetRESTCall(String methodName, String urlTemplate, Object... params) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException Issue a GET REST call that returns a list of names.- 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:
- NameListResponse
- 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.
-
callStringMapGetRESTCall
public StringMapResponse callStringMapGetRESTCall(String methodName, String urlTemplate, Object... params) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException Issue a GET REST call that returns a list of names mapped to their descriptions.- 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:
- StringMapResponse
- 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.
-
callGUIDGetRESTCall
public GUIDResponse callGUIDGetRESTCall(String methodName, String urlTemplate, Object... params) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException Issue a GET REST call that returns a GUIDResponse 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:
- 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.
-
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.
-
callGUIDListPostRESTCall
public GUIDListResponse callGUIDListPostRESTCall(String methodName, String urlTemplate, Object requestBody, Object... params) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException Issue a POST 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.requestBody
- request body for the request.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.
-
callCountGetRESTCall
public CountResponse callCountGetRESTCall(String methodName, String urlTemplate, Object... params) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException Issue a GET REST call that returns a CountResponse 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:
- CountResponse
- 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.
-
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.
-