Class DigitalServiceRESTClient
java.lang.Object
org.odpi.openmetadata.commonservices.ffdc.rest.FFDCRESTClientBase
org.odpi.openmetadata.commonservices.ffdc.rest.FFDCRESTClient
org.odpi.openmetadata.accessservices.digitalservice.client.rest.DigitalServiceRESTClient
DigitalServiceRESTClient 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
ConstructorsConstructorDescriptionDigitalServiceRESTClient
(String serverName, String serverPlatformURLRoot) Constructor for no authentication.DigitalServiceRESTClient
(String serverName, String serverPlatformURLRoot, String userId, String password) Constructor for simple userId and password authentication.DigitalServiceRESTClient
(String serverName, String serverPlatformURLRoot, String userId, String password, AuditLog auditLog) Constructor for simple userId and password authentication with audit log.DigitalServiceRESTClient
(String serverName, String serverPlatformURLRoot, AuditLog auditLog) Constructor for no authentication with audit log. -
Method Summary
Modifier and TypeMethodDescriptioncallDigitalServiceGetRESTCall
(String methodName, String urlTemplate, Object... params) Issue a GET REST call that returns a DigitalServiceElement in a response object.callDigitalServiceListGetRESTCall
(String methodName, String urlTemplate, Object... params) Issue a GET REST call that returns a list of DigitalServiceElements in a response object.callDigitalServiceListPostRESTCall
(String methodName, String urlTemplate, Object requestBody, Object... params) Issue a GET REST call that returns a list of DigitalServiceElements in a response object.callRelatedElementListGetRESTCall
(String methodName, String urlTemplate, Object... params) Issue a GET REST call that returns a RelatedElementListResponse object.Methods inherited from class org.odpi.openmetadata.commonservices.ffdc.rest.FFDCRESTClient
callBooleanGetRESTCall, callCountGetRESTCall, callGUIDGetRESTCall, callGUIDListGetRESTCall, callGUIDListPostRESTCall, callGUIDPostRESTCall, callNameListGetRESTCall, callOCFConnectorReportGetRESTCall, 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 Details
-
DigitalServiceRESTClient
public DigitalServiceRESTClient(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 manager 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.
-
DigitalServiceRESTClient
public DigitalServiceRESTClient(String serverName, String serverPlatformURLRoot) throws InvalidParameterException Constructor for no authentication.- Parameters:
serverName
- name of the OMAG Server to callserverPlatformURLRoot
- URL root of the server manager where the OMAG Server is running.- Throws:
InvalidParameterException
- there is a problem creating the client-side components to issue any REST API calls.
-
DigitalServiceRESTClient
public DigitalServiceRESTClient(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 manager 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.
-
DigitalServiceRESTClient
public DigitalServiceRESTClient(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 manager 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
-
callRelatedElementListGetRESTCall
public RelatedElementListResponse callRelatedElementListGetRESTCall(String methodName, String urlTemplate, Object... params) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException Issue a GET REST call that returns a RelatedElementListResponse object.- Parameters:
methodName
- name of the method being called.urlTemplate
- REST API call URL template 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
- the repository is not available or not working properly.
-
callDigitalServiceGetRESTCall
public DigitalServiceResponse callDigitalServiceGetRESTCall(String methodName, String urlTemplate, Object... params) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException Issue a GET REST call that returns a DigitalServiceElement in a response object.- Parameters:
methodName
- name of the method being called.urlTemplate
- REST API call URL template 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.
-
callDigitalServiceListGetRESTCall
public DigitalServiceListResponse callDigitalServiceListGetRESTCall(String methodName, String urlTemplate, Object... params) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException Issue a GET REST call that returns a list of DigitalServiceElements in a response object.- Parameters:
methodName
- name of the method being calledurlTemplate
- REST API call URL template with place-holders for the 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
- something went wrong with the REST call stack.
-
callDigitalServiceListPostRESTCall
public DigitalServiceListResponse callDigitalServiceListPostRESTCall(String methodName, String urlTemplate, Object requestBody, Object... params) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException Issue a GET REST call that returns a list of DigitalServiceElements in a response object.- Parameters:
methodName
- name of the method being calledurlTemplate
- REST API call URL template with place-holders for the parametersrequestBody
- request body for the requestparams
- 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.
-