Package ch.helvethink.odoo4java.jsonrpc
Class JsonRPCRequestBuilder
java.lang.Object
ch.helvethink.odoo4java.jsonrpc.JsonRPCRequestBuilder
Request Builder for the Odoo RPC API
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionokhttp3.RequestBodyBuild the request to send to the http clientwithMethod(String method) Which method we use to retrieve resultswithParamArgs(com.google.gson.JsonElement args) The args to put in "params"withParamArgs(Object... args) withService(String service) Which service we use during the request
-
Field Details
-
LOG
public static final org.slf4j.Logger LOGLogger
-
-
Constructor Details
-
JsonRPCRequestBuilder
public JsonRPCRequestBuilder()
-
-
Method Details
-
withService
Which service we use during the request- Parameters:
service- The odoo service name (aka object most of the time)- Returns:
- The builder instance
-
withMethod
Which method we use to retrieve results- Parameters:
method- The method we're calling (search_name, search, ...)- Returns:
- The builder instance
-
withParamArgs
The args to put in "params"- Parameters:
args- the argument lists (for instance, ids of the object when findById)- Returns:
- The builder instance
-
withParamArgs
- 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
-