Interface RESTClientCalls

All Known Implementing Classes:
RESTClientConnector, SpringRESTClientConnector

public interface RESTClientCalls
RESTClientCalls provides a generic interface for calling REST Clients.
  • Method Details

    • callGetRESTCallNoParams

      <T> T callGetRESTCallNoParams(String methodName, Class<T> returnClass, String urlTemplate) throws RESTServerException
      Issue a GET REST call that returns a response object.
      Type Parameters:
      T - class name
      Parameters:
      methodName - name of the method being called.
      returnClass - class of the response object.
      urlTemplate - template of the URL for the REST API call with place-holders for the parameters.
      Returns:
      response object
      Throws:
      RESTServerException - something went wrong with the REST call stack.
    • callGetRESTCall

      <T> T callGetRESTCall(String methodName, Class<T> returnClass, String urlTemplate, Object... params) throws RESTServerException
      Issue a GET REST call that returns a response object.
      Type Parameters:
      T - class name
      Parameters:
      methodName - name of the method being called.
      returnClass - class of the response object.
      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:
      response object
      Throws:
      RESTServerException - something went wrong with the REST call stack.
    • callPostRESTCallNoParams

      <T> T callPostRESTCallNoParams(String methodName, Class<T> returnClass, String urlTemplate, Object requestBody) throws RESTServerException
      Issue a POST REST call that returns a response object. This is typically a create, update, or find with complex parameters.
      Type Parameters:
      T - class name
      Parameters:
      methodName - name of the method being called.
      returnClass - class of the response object.
      urlTemplate - template of the URL for the REST API call with place-holders for the parameters.
      requestBody - request body for the request.
      Returns:
      response object
      Throws:
      RESTServerException - something went wrong with the REST call stack.
    • callPostRESTCall

      <T> T callPostRESTCall(String methodName, Class<T> returnClass, String urlTemplate, Object requestBody, Object... params) throws RESTServerException
      Issue a POST REST call that returns a response object. This is typically a create, update, or find with complex parameters.
      Type Parameters:
      T - class name
      Parameters:
      methodName - name of the method being called.
      returnClass - class of the response object.
      urlTemplate - template of the URL for the REST API call 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:
      response object
      Throws:
      RESTServerException - something went wrong with the REST call stack.
    • callPutRESTCall

      <T> T callPutRESTCall(String methodName, Class<T> returnClass, String urlTemplate, Object requestBody, Object... params) throws RESTServerException
      Issue a PUT REST call that returns a response object. This is typically an update.
      Type Parameters:
      T - class name
      Parameters:
      methodName - name of the method being called.
      returnClass - class of the response object.
      urlTemplate - template of the URL for the REST API call 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:
      response object
      Throws:
      RESTServerException - something went wrong with the REST call stack.
    • callPutRESTCallNoParams

      <T> T callPutRESTCallNoParams(String methodName, Class<T> returnClass, String urlTemplate, Object requestBody) throws RESTServerException
      Issue a PUT REST call that returns a response object. This is typically an update.
      Type Parameters:
      T - class name
      Parameters:
      methodName - name of the method being called.
      returnClass - class of the response object.
      urlTemplate - template of the URL for the REST API call with place-holders for the parameters.
      requestBody - request body for the request.
      Returns:
      response object
      Throws:
      RESTServerException - something went wrong with the REST call stack.
    • callDeleteRESTCallNoParams

      <T> T callDeleteRESTCallNoParams(String methodName, Class<T> returnClass, String urlTemplate, Object requestBody) throws RESTServerException
      Issue a DELETE REST call that returns a response object.
      Type Parameters:
      T - class name
      Parameters:
      methodName - name of the method being called.
      returnClass - class of the response object.
      urlTemplate - template of the URL for the REST API call with place-holders for the parameters.
      requestBody - request body for the request.
      Returns:
      Object
      Throws:
      RESTServerException - something went wrong with the REST call stack.
    • callDeleteRESTCall

      <T> T callDeleteRESTCall(String methodName, Class<T> returnClass, String urlTemplate, Object requestBody, Object... params) throws RESTServerException
      Issue a DELETE REST call that returns a response object.
      Type Parameters:
      T - class name
      Parameters:
      methodName - name of the method being called.
      returnClass - class of the response object.
      urlTemplate - template of the URL for the REST API call 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:
      Object
      Throws:
      RESTServerException - something went wrong with the REST call stack.
    • callPatchRESTCall

      <T> T callPatchRESTCall(String methodName, Class<T> returnClass, String urlTemplate, Object requestBody, Object... params) throws RESTServerException
      Issue a PATCH REST call that returns a response object.
      Type Parameters:
      T - type of the return object
      Parameters:
      methodName - name of the method being called.
      returnClass - class of the response object.
      urlTemplate - template of the URL for the REST API call 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:
      Object
      Throws:
      RESTServerException - something went wrong with the REST call stack.