public interface RestClient
Modifier and Type | Interface and Description |
---|---|
static interface |
RestClient.ResponseCallback |
Modifier and Type | Method and Description |
---|---|
void |
apexCall(String httpMethod,
String apexUrl,
Map<String,Object> queryParams,
InputStream requestDto,
Map<String,List<String>> headers,
RestClient.ResponseCallback callback)
Executes a user defined APEX REST API call.
|
void |
approval(InputStream request,
Map<String,List<String>> headers,
RestClient.ResponseCallback callback)
Submits, approves or rejects particular record.
|
void |
approvals(Map<String,List<String>> headers,
RestClient.ResponseCallback callback)
Returns a list of all approval processes.
|
void |
createSObject(String sObjectName,
InputStream sObject,
Map<String,List<String>> headers,
RestClient.ResponseCallback callback)
Creates a record for the specified object.
|
void |
deleteSObject(String sObjectName,
String id,
Map<String,List<String>> headers,
RestClient.ResponseCallback callback)
Deletes a record for the specified object ID.
|
void |
deleteSObjectWithId(String sObjectName,
String fieldName,
String fieldValue,
Map<String,List<String>> headers,
RestClient.ResponseCallback callback)
Deletes a record based on the value of a specified external ID field.
|
void |
getBasicInfo(String sObjectName,
Map<String,List<String>> headers,
RestClient.ResponseCallback callback)
Describes the individual metadata for the specified object.
|
void |
getBlobField(String sObjectName,
String id,
String blobFieldName,
Map<String,List<String>> headers,
RestClient.ResponseCallback callback)
Retrieves the specified blob field from an individual record.
|
void |
getDescription(String sObjectName,
Map<String,List<String>> headers,
RestClient.ResponseCallback callback)
Completely describes the individual metadata at all levels for the specified object.
|
void |
getGlobalObjects(Map<String,List<String>> headers,
RestClient.ResponseCallback callback)
Lists the available objects and their metadata for your organization's data.
|
void |
getResources(Map<String,List<String>> headers,
RestClient.ResponseCallback callback)
Lists available resources for the specified API version, including resource name and URI.
|
void |
getSObject(String sObjectName,
String id,
String[] fields,
Map<String,List<String>> headers,
RestClient.ResponseCallback callback)
Retrieves a record for the specified object ID.
|
void |
getSObjectWithId(String sObjectName,
String fieldName,
String fieldValue,
Map<String,List<String>> headers,
RestClient.ResponseCallback callback)
Retrieves a record for the specified external ID.
|
void |
getVersions(Map<String,List<String>> headers,
RestClient.ResponseCallback callback)
Lists summary information about each API version currently available,
including the version, label, and a link to each version's root.
|
void |
limits(Map<String,List<String>> headers,
RestClient.ResponseCallback responseCallback)
Fetches Organization Limits.
|
void |
query(String soqlQuery,
Map<String,List<String>> headers,
RestClient.ResponseCallback callback)
Executes the specified SOQL query.
|
void |
queryAll(String soqlQuery,
Map<String,List<String>> headers,
RestClient.ResponseCallback callback)
Executes the specified SOQL query including deleted records.
|
void |
queryMore(String nextRecordsUrl,
Map<String,List<String>> headers,
RestClient.ResponseCallback callback)
Get SOQL query results using nextRecordsUrl.
|
void |
recent(Integer limit,
Map<String,List<String>> headers,
RestClient.ResponseCallback responseCallback)
Fetches recently viewed records.
|
void |
search(String soslQuery,
Map<String,List<String>> headers,
RestClient.ResponseCallback callback)
Executes the specified SOSL search.
|
void |
updateSObject(String sObjectName,
String id,
InputStream sObject,
Map<String,List<String>> headers,
RestClient.ResponseCallback callback)
Updates a record for the specified object ID.
|
void |
upsertSObject(String sObjectName,
String fieldName,
String fieldValue,
Map<String,List<String>> headers,
InputStream sObject,
RestClient.ResponseCallback callback)
Creates or updates a record based on the value of a specified external ID field.
|
void getVersions(Map<String,List<String>> headers, RestClient.ResponseCallback callback)
headers
- additional HTTP headers to sendcallback
- RestClient.ResponseCallback
to handle response or exceptionvoid getResources(Map<String,List<String>> headers, RestClient.ResponseCallback callback)
headers
- additional HTTP headers to sendcallback
- RestClient.ResponseCallback
to handle response or exceptionvoid getGlobalObjects(Map<String,List<String>> headers, RestClient.ResponseCallback callback)
headers
- additional HTTP headers to sendcallback
- RestClient.ResponseCallback
to handle response or exceptionvoid getBasicInfo(String sObjectName, Map<String,List<String>> headers, RestClient.ResponseCallback callback)
sObjectName
- specified object nameheaders
- additional HTTP headers to sendcallback
- RestClient.ResponseCallback
to handle response or exceptionvoid getDescription(String sObjectName, Map<String,List<String>> headers, RestClient.ResponseCallback callback)
sObjectName
- specified object nameheaders
- additional HTTP headers to sendcallback
- RestClient.ResponseCallback
to handle response or exceptionvoid getSObject(String sObjectName, String id, String[] fields, Map<String,List<String>> headers, RestClient.ResponseCallback callback)
sObjectName
- specified object nameid
- object idheaders
- additional HTTP headers to sendcallback
- RestClient.ResponseCallback
to handle response or exceptionvoid createSObject(String sObjectName, InputStream sObject, Map<String,List<String>> headers, RestClient.ResponseCallback callback)
sObjectName
- specified object nameheaders
- additional HTTP headers to sendsObject
- request entitycallback
- RestClient.ResponseCallback
to handle response or exceptionvoid updateSObject(String sObjectName, String id, InputStream sObject, Map<String,List<String>> headers, RestClient.ResponseCallback callback)
sObjectName
- specified object nameid
- object idheaders
- additional HTTP headers to sendsObject
- request entitycallback
- RestClient.ResponseCallback
to handle response or exceptionvoid deleteSObject(String sObjectName, String id, Map<String,List<String>> headers, RestClient.ResponseCallback callback)
sObjectName
- specified object nameid
- object idheaders
- additional HTTP headers to sendcallback
- RestClient.ResponseCallback
to handle response or exceptionvoid getSObjectWithId(String sObjectName, String fieldName, String fieldValue, Map<String,List<String>> headers, RestClient.ResponseCallback callback)
sObjectName
- specified object namefieldName
- external field namefieldValue
- external field valueheaders
- additional HTTP headers to sendcallback
- RestClient.ResponseCallback
to handle response or exceptionvoid upsertSObject(String sObjectName, String fieldName, String fieldValue, Map<String,List<String>> headers, InputStream sObject, RestClient.ResponseCallback callback)
sObjectName
- specified object namefieldName
- external field namefieldValue
- external field valueheaders
- additional HTTP headers to sendsObject
- input object to insert or updatecallback
- RestClient.ResponseCallback
to handle response or exceptionvoid deleteSObjectWithId(String sObjectName, String fieldName, String fieldValue, Map<String,List<String>> headers, RestClient.ResponseCallback callback)
sObjectName
- specified object namefieldName
- external field namefieldValue
- external field valueheaders
- additional HTTP headers to sendcallback
- RestClient.ResponseCallback
to handle response or exceptionvoid getBlobField(String sObjectName, String id, String blobFieldName, Map<String,List<String>> headers, RestClient.ResponseCallback callback)
sObjectName
- specified object nameid
- identifier of the objectblobFieldName
- name of the field holding the blobheaders
- additional HTTP headers to sendcallback
- RestClient.ResponseCallback
to handle response or exceptionvoid query(String soqlQuery, Map<String,List<String>> headers, RestClient.ResponseCallback callback)
soqlQuery
- SOQL queryheaders
- additional HTTP headers to sendcallback
- RestClient.ResponseCallback
to handle response or exceptionvoid queryMore(String nextRecordsUrl, Map<String,List<String>> headers, RestClient.ResponseCallback callback)
nextRecordsUrl
- URL for next records to fetch, returned by query()headers
- additional HTTP headers to sendcallback
- RestClient.ResponseCallback
to handle response or exceptionvoid queryAll(String soqlQuery, Map<String,List<String>> headers, RestClient.ResponseCallback callback)
soqlQuery
- SOQL queryheaders
- additional HTTP headers to sendcallback
- RestClient.ResponseCallback
to handle response or exceptionvoid search(String soslQuery, Map<String,List<String>> headers, RestClient.ResponseCallback callback)
soslQuery
- SOSL queryheaders
- additional HTTP headers to sendcallback
- RestClient.ResponseCallback
to handle response or exceptionvoid apexCall(String httpMethod, String apexUrl, Map<String,Object> queryParams, InputStream requestDto, Map<String,List<String>> headers, RestClient.ResponseCallback callback)
httpMethod
- HTTP method to execute.apexUrl
- APEX api url.queryParams
- optional query parameters for GET methods, may be empty.requestDto
- optional input DTO for POST, etc. may be null.headers
- additional HTTP headers to sendcallback
- RestClient.ResponseCallback
to handle response or exceptionvoid recent(Integer limit, Map<String,List<String>> headers, RestClient.ResponseCallback responseCallback)
limit
- optional limit that specifies the maximum number of records to be returned. If this parameter is not
specified, the default maximum number of records returned is the maximum number of entries in
RecentlyViewed, which is 200 records per object.headers
- additional HTTP headers to sendresponseCallback
- RestClient.ResponseCallback
to handle response or exceptionvoid limits(Map<String,List<String>> headers, RestClient.ResponseCallback responseCallback)
headers
- additional HTTP headers to sendresponseCallback
- RestClient.ResponseCallback
to handle response or exceptionvoid approval(InputStream request, Map<String,List<String>> headers, RestClient.ResponseCallback callback)
headers
- additional HTTP headers to sendcallback
- RestClient.ResponseCallback
to handle response or exceptionvoid approvals(Map<String,List<String>> headers, RestClient.ResponseCallback callback)
headers
- additional HTTP headers to sendcallback
- RestClient.ResponseCallback
to handle response or exceptionApache Camel