Class OdooClient

java.lang.Object
ch.helvethink.odoo4java.jsonrpc.OdooClient
All Implemented Interfaces:
OdooRpcClient

public class OdooClient extends Object implements OdooRpcClient
Abstraction of Odoo's JSON-RPC API
  • Field Details

    • LOG

      public static final org.slf4j.Logger LOG
      Simple logger
    • JSONRPC_ENDPOINT

      public static final String JSONRPC_ENDPOINT
      JSON RPC API endpoint
      See Also:
    • RESULT_FIELD

      public static final String RESULT_FIELD
      Result field returned by the Odoo JSON RPC API
      See Also:
  • Constructor Details

    • OdooClient

      public OdooClient(String instanceUrl, String dbName, String username, String password) throws IOException
      Constructor with direct connection
      Parameters:
      instanceUrl - The odoo Instance URL
      dbName - The odoo DB Name
      username - The Odoo username when authenticating
      password - The Odoo password when authenticating
      Throws:
      IOException - Exceptions from OkHttpClient
    • OdooClient

      public OdooClient(okhttp3.OkHttpClient httpCli, String instanceUrl, String dbName, String username, String password, boolean mustConnect) throws IOException
      Constructor
      Parameters:
      httpCli - The ok http instance
      instanceUrl - The odoo Instance URL
      dbName - The odoo DB Name
      username - The Odoo username when authenticating
      password - The Odoo password when authenticating
      mustConnect - - describes if we must try to connect or not
      Throws:
      IOException - Exceptions from OkHttpClient
  • Method Details