public class

RestConnectionImpl

extends Object
implements RestConnection
java.lang.Object
   ↳ com.sforce.rest.RestConnectionImpl

Class Overview

RestConnection

Summary

Constants
String AUTH_HEADER
String AUTH_VALUE_PREFIX
String CHARSET_HEADER
String CHARSET_VALUE
String CONTENT_HEADER
String DESCRIBE_SUBENDPOINT
String PATCH_PARAMETER
String PRETTY_HEADER
String QUERY_ENDPOINT
String RECENT_ENDPOINT
String SEARCH_ENDPOINT
String SEPARATOR
String SOBJECTS_ENDPOINT
Fields
private final String baseEndpoint
private final ConnectorConfig config
private HashMap<String, String> headers
private final Gson parser
Public Constructors
RestConnectionImpl(ConnectorConfig config)
Constructor.
Public Methods
SObjectResult create(SObject sobject)
SObjectResult delete(Class<? extends SObject> clazz, String id)
DescribeGlobal describeGlobal()
DescribeLayout describeLayout(String sobjectName)
DescribeSobject describeSobject(String sobjectName)
<T extends SObject> T get(Class<T> clazz, String id)
ConnectorConfig getConfig()
QueryResult query(String query)
SearchResult recent()
SearchResult search(String search)
SObjectResult update(SObject sobject, String id)
[Expand]
Inherited Methods
From class java.lang.Object
From interface com.sforce.rest.RestConnection

Constants

private static final String AUTH_HEADER

Constant Value: "Authorization"

private static final String AUTH_VALUE_PREFIX

Constant Value: "OAuth "

private static final String CHARSET_HEADER

Constant Value: "Accept-Charset"

private static final String CHARSET_VALUE

Constant Value: "UTF-8"

private static final String CONTENT_HEADER

Constant Value: "Content-Type"

private static final String DESCRIBE_SUBENDPOINT

Constant Value: "describe/"

private static final String PATCH_PARAMETER

Constant Value: "?_HttpMethod=PATCH"

private static final String PRETTY_HEADER

Constant Value: "X-Pretty-Print"

private static final String QUERY_ENDPOINT

Constant Value: "query?q="

private static final String RECENT_ENDPOINT

Constant Value: "recent/"

private static final String SEARCH_ENDPOINT

Constant Value: "search?q="

private static final String SEPARATOR

Constant Value: "/"

private static final String SOBJECTS_ENDPOINT

Constant Value: "sobjects/"

Fields

private final String baseEndpoint

private final ConnectorConfig config

private HashMap<String, String> headers

private final Gson parser

Public Constructors

public RestConnectionImpl (ConnectorConfig config)

Constructor.

Parameters
config

Public Methods

public SObjectResult create (SObject sobject)

Parameters
sobject
Throws
IOException
RestApiException

public SObjectResult delete (Class<? extends SObject> clazz, String id)

Parameters
clazz
id
Throws
IOException
RestApiException

public DescribeGlobal describeGlobal ()

Throws
IOException
RestApiException

public DescribeLayout describeLayout (String sobjectName)

Parameters
sobjectName
Throws
IOException
RestApiException

public DescribeSobject describeSobject (String sobjectName)

Parameters
sobjectName
Throws
IOException
RestApiException

public T get (Class<T> clazz, String id)

Parameters
clazz
id
Throws
IOException
RestApiException

public ConnectorConfig getConfig ()

public QueryResult query (String query)

Parameters
query
Throws
IOException
RestApiException

public SearchResult recent ()

Throws
IOException
RestApiException

public SearchResult search (String search)

Parameters
search
Throws
IOException
RestApiException

public SObjectResult update (SObject sobject, String id)

Parameters
sobject
id
Throws
IOException