Package | Description |
---|---|
com.salesforce.androidsdk.rest | |
com.salesforce.androidsdk.rest.files |
Modifier and Type | Class and Description |
---|---|
class |
BatchRequest
BatchRequest: Class to represent a batch request.
|
class |
CompositeRequest
CompositeRequest: Class to represent a composite request.
|
Modifier and Type | Field and Description |
---|---|
java.util.LinkedHashMap<java.lang.String,RestRequest> |
CompositeRequest.refIdToRequests |
java.util.List<RestRequest> |
BatchRequest.requests |
Modifier and Type | Method and Description |
---|---|
static RestRequest |
RestRequest.getCheapRequest(java.lang.String apiVersion)
Cheap request to re-hydrate access token
|
static RestRequest |
RestRequest.getRequestForCollectionCreate(java.lang.String apiVersion,
boolean allOrNone,
JSONArray records)
Request for creating multiple records with fewer round trips
|
static RestRequest |
RestRequest.getRequestForCollectionDelete(java.lang.String apiVersion,
boolean allOrNone,
java.util.List<java.lang.String> objectIds)
Request for deleting multiple records with fewer round trips
|
static RestRequest |
RestRequest.getRequestForCollectionRetrieve(java.lang.String apiVersion,
java.lang.String objectType,
java.util.List<java.lang.String> objectIds,
java.util.List<java.lang.String> fieldList)
Request for retrieving multiple records with fewer round trips
|
static RestRequest |
RestRequest.getRequestForCollectionUpdate(java.lang.String apiVersion,
boolean allOrNone,
JSONArray records)
Request for updating multiple records with fewer round trips
|
static RestRequest |
RestRequest.getRequestForCollectionUpsert(java.lang.String apiVersion,
boolean allOrNone,
java.lang.String objectType,
java.lang.String externalIdField,
JSONArray records)
Request for upserting multiple records with fewer round trips
|
static RestRequest |
RestRequest.getRequestForCreate(java.lang.String apiVersion,
java.lang.String objectType,
java.util.Map<java.lang.String,java.lang.Object> fields)
Request to create a record.
|
static RestRequest |
RestRequest.getRequestForDelete(java.lang.String apiVersion,
java.lang.String objectType,
java.lang.String objectId)
Request to delete a record.
|
static RestRequest |
RestRequest.getRequestForDescribe(java.lang.String apiVersion,
java.lang.String objectType)
Request to completely describe the individual metadata at all levels for the specified object.
|
static RestRequest |
RestRequest.getRequestForDescribeGlobal(java.lang.String apiVersion)
Request to list the available objects and their metadata for your organization's data.
|
static RestRequest |
RestRequest.getRequestForLimits(java.lang.String apiVersion)
Request for getting information about limits in your org
|
static RestRequest |
RestRequest.getRequestForMetadata(java.lang.String apiVersion,
java.lang.String objectType)
Request to describe the individual metadata for the specified object.
|
static RestRequest |
RestRequest.getRequestForNotification(java.lang.String apiVersion,
java.lang.String notificationId)
Request to get a notification.
|
static RestRequest |
RestRequest.getRequestForNotifications(java.lang.String apiVersion,
java.lang.Integer size,
java.util.Date before,
java.util.Date after)
Request for getting notifications.
|
static RestRequest |
RestRequest.getRequestForNotificationsStatus(java.lang.String apiVersion)
Request to get status of notifications for the user.
|
static RestRequest |
RestRequest.getRequestForNotificationsUpdate(java.lang.String apiVersion,
java.util.List<java.lang.String> notificationIds,
java.util.Date before,
java.lang.Boolean read,
java.lang.Boolean seen)
Request for updating notifications.
|
static RestRequest |
RestRequest.getRequestForNotificationUpdate(java.lang.String apiVersion,
java.lang.String notificationId,
java.lang.Boolean read,
java.lang.Boolean seen)
Request for updating a notification.
|
static RestRequest |
RestRequest.getRequestForObjectLayout(java.lang.String apiVersion,
java.lang.String objectAPIName,
java.lang.String formFactor,
java.lang.String layoutType,
java.lang.String mode,
java.lang.String recordTypeId)
Request to get object layout data.
|
static RestRequest |
RestRequest.getRequestForPrimingRecords(java.lang.String apiVersion,
java.lang.String relayToken,
java.lang.Long changedAfterTime)
Request for getting list of record related to offline briefcase
|
static RestRequest |
RestRequest.getRequestForQuery(java.lang.String apiVersion,
java.lang.String q)
Request to execute the specified SOQL query.
|
static RestRequest |
RestRequest.getRequestForQuery(java.lang.String apiVersion,
java.lang.String q,
int batchSize)
Request to execute the specified SOQL query.
|
static RestRequest |
RestRequest.getRequestForQueryAll(java.lang.String apiVersion,
java.lang.String q)
Request to execute the specified SOQL query which includes deleted records because of a merge or delete in the result set.
|
static RestRequest |
RestRequest.getRequestForResources(java.lang.String apiVersion)
Request to list available resources for the specified API version, including resource name and URI.
|
static RestRequest |
RestRequest.getRequestForRetrieve(java.lang.String apiVersion,
java.lang.String objectType,
java.lang.String objectId,
java.util.List<java.lang.String> fieldList)
Request to retrieve a record by object ID.
|
static RestRequest |
RestRequest.getRequestForSearch(java.lang.String apiVersion,
java.lang.String q)
Request to execute the specified SOSL search.
|
static RestRequest |
RestRequest.getRequestForSearchResultLayout(java.lang.String apiVersion,
java.util.List<java.lang.String> objectList)
Request to get search result layouts
|
static RestRequest |
RestRequest.getRequestForSearchScopeAndOrder(java.lang.String apiVersion)
Request to get search scope and order.
|
static RestRequest |
RestRequest.getRequestForSingleAccess(java.lang.String redirectUri)
Request to generate URL to bridge into UI sessions (a front door URL)
Applications should use that API instead of building front door URLs directly
|
static RestRequest |
RestRequest.getRequestForSObjectTree(java.lang.String apiVersion,
java.lang.String objectType,
java.util.List<RestRequest.SObjectTree> objectTrees)
Request to create one or more sObject trees with root records of the specified type.
|
static RestRequest |
RestRequest.getRequestForUpdate(java.lang.String apiVersion,
java.lang.String objectType,
java.lang.String objectId,
java.util.Map<java.lang.String,java.lang.Object> fields)
Request to update a record.
|
static RestRequest |
RestRequest.getRequestForUpdate(java.lang.String apiVersion,
java.lang.String objectType,
java.lang.String objectId,
java.util.Map<java.lang.String,java.lang.Object> fields,
java.util.Date ifUnmodifiedSinceDate)
Request to update a record.
|
static RestRequest |
RestRequest.getRequestForUpsert(java.lang.String apiVersion,
java.lang.String objectType,
java.lang.String externalIdField,
java.lang.String externalId,
java.util.Map<java.lang.String,java.lang.Object> fields)
Request to upsert (update or insert) a record.
|
static RestRequest |
RestRequest.getRequestForUserInfo()
Request to get information about the user making the request.
|
static RestRequest |
RestRequest.getRequestForVersions()
Request to get summary information about each Salesforce.com version currently available.
|
Modifier and Type | Method and Description |
---|---|
BatchRequest.BatchRequestBuilder |
BatchRequest.BatchRequestBuilder.addRequest(RestRequest request) |
CompositeRequest.CompositeRequestBuilder |
CompositeRequest.CompositeRequestBuilder.addRequest(java.lang.String refId,
RestRequest request) |
Request |
RestClient.buildRequest(RestRequest restRequest)
Helper to build okHttp Request from RestRequest
|
void |
RestClient.AsyncRequestCallback.onSuccess(RestRequest request,
RestResponse response)
NB: onSuccess runs on a network thread
If you are making your call from an activity and need to make UI changes
make sure to first consume the response and then call runOnUiThread
result.consumeQuietly(); // consume before going back to main thread
runOnUiThread(new Runnable() {
|
java.net.URI |
RestClient.ClientInfo.resolveUrl(RestRequest request)
Resolves the given
RestRequest to its URL. |
Call |
RestClient.sendAsync(RestRequest restRequest,
RestClient.AsyncRequestCallback callback)
Send the given restRequest and process the result asynchronously with the given callback.
|
RestResponse |
RestClient.sendSync(RestRequest restRequest)
Send the given restRequest synchronously and return a RestResponse
Note: Cannot be used by code on the UI thread (use sendAsync instead).
|
RestResponse |
RestClient.sendSync(RestRequest restRequest,
Interceptor... interceptors)
Send the given restRequest synchronously and return a RestResponse
Note: Cannot be used by code on the UI thread (use sendAsync instead).
|
Modifier and Type | Method and Description |
---|---|
static JSONObject |
CompositeRequest.computeCompositeRequestJson(boolean allOrNone,
java.util.LinkedHashMap<java.lang.String,RestRequest> refIdToRequests) |
static BatchRequest |
RestRequest.getBatchRequest(java.lang.String apiVersion,
boolean haltOnError,
java.util.List<RestRequest> requests)
Batch request
|
static CompositeRequest |
RestRequest.getCompositeRequest(java.lang.String apiVersion,
boolean allOrNone,
java.util.LinkedHashMap<java.lang.String,RestRequest> refIdToRequests)
Composite request
|
Constructor and Description |
---|
BatchRequest(java.lang.String apiVersion,
boolean haltOnError,
java.util.List<RestRequest> requests) |
CompositeRequest(java.lang.String apiVersion,
boolean allOrNone,
java.util.LinkedHashMap<java.lang.String,RestRequest> refIdToRequests) |
Modifier and Type | Method and Description |
---|---|
static RestRequest |
FileRequests.addFileShare(java.lang.String fileId,
java.lang.String entityId,
java.lang.String shareType)
Build a request that will add a file share for the specified fileId to
the specified entityId.
|
static RestRequest |
FileRequests.batchFileDetails(java.util.List<java.lang.String> sfdcIds)
Build a request that can fetch the latest file details of one or more
files in a single request.
|
static RestRequest |
FileRequests.deleteFileShare(java.lang.String shareId)
Build a request that will delete the specified file share.
|
static RestRequest |
FileRequests.fileContents(java.lang.String sfdcId,
java.lang.String version)
Builds a request that can fetch the actual binary file contents of this
particular file.
|
static RestRequest |
FileRequests.fileDetails(java.lang.String sfdcId,
java.lang.String version)
Build a Request that can fetch the file details of a particular version
of a file.
|
static RestRequest |
FileRequests.fileRendition(java.lang.String sfdcId,
java.lang.String version,
RenditionType renditionType,
java.lang.Integer pageNum)
Build a Request that can fetch the a preview/rendition of a particular
page of the file (and version).
|
static RestRequest |
FileRequests.fileShares(java.lang.String sfdcId,
java.lang.Integer pageNum)
Build a Request that can fetch a page from the list of entities that this
file is shared to.
|
static RestRequest |
FileRequests.filesInUsersGroups(java.lang.String userId,
java.lang.Integer pageNum)
Build a Request that can fetch a page from the list of files from groups
that the user is a member of.
|
static RestRequest |
FileRequests.filesSharedWithUser(java.lang.String userId,
java.lang.Integer pageNum)
Build a Request that can fetch a page from the list of files that have
been shared with the user.
|
static RestRequest |
FileRequests.ownedFilesList(java.lang.String userId,
java.lang.Integer pageNum)
Build a Request that can fetch a page from the files owned by the specified user.
|
static RestRequest |
FileRequests.uploadFile(java.io.File theFile,
java.lang.String name,
java.lang.String title,
java.lang.String description,
java.lang.String mimeType)
Build a request that can upload a new file to the server, this will
create a new file at version 1.
|