Class JsonRPCRequestBuilder

java.lang.Object
ch.helvethink.odoo4java.jsonrpc.JsonRPCRequestBuilder

public class JsonRPCRequestBuilder extends Object
Request Builder for the Odoo RPC API
  • Field Details

    • LOG

      public static final org.slf4j.Logger LOG
      Logger
    • isDebugging

      public static boolean isDebugging
  • Constructor Details

    • JsonRPCRequestBuilder

      public JsonRPCRequestBuilder()
  • Method Details

    • withService

      public JsonRPCRequestBuilder withService(String service)
      Which service we use during the request
      Parameters:
      service - The odoo service name (aka object most of the time)
      Returns:
      The builder instance
    • withMethod

      public JsonRPCRequestBuilder withMethod(String method)
      Which method we use to retrieve results
      Parameters:
      method - The method we're calling (search_name, search, ...)
      Returns:
      The builder instance
    • withParamArgs

      public JsonRPCRequestBuilder withParamArgs(com.google.gson.JsonElement args)
      The args to put in "params"
      Parameters:
      args - the argument lists (for instance, ids of the object when findById)
      Returns:
      The builder instance
    • withParamArgs

      public JsonRPCRequestBuilder withParamArgs(Object... args)
      Parameters:
      args - the argument lists
      Returns:
      The builder instance
      See Also:
    • buildRequest

      public okhttp3.RequestBody buildRequest()
      Build the request to send to the http client
      Returns:
      The Json request body