com.sforce.async
Class RestConnection
java.lang.Object
com.sforce.async.RestConnection
public class RestConnection
- extends Object
RestConnection
- Since:
- 160
- Author:
- mcheenath
|
Method Summary |
JobInfo |
abortJob(String jobId)
|
void |
addHeader(String headerName,
String headerValue)
|
JobInfo |
closeJob(String jobId)
|
BatchRequest |
createBatch(JobInfo job)
|
BatchInfo |
createBatchFromDir(JobInfo job,
InputStream batchContent,
File attachmentDir)
|
BatchInfo |
createBatchFromStream(JobInfo jobInfo,
InputStream input)
|
BatchInfo |
createBatchFromZipStream(JobInfo jobInfo,
InputStream zipInput)
|
BatchInfo |
createBatchWithFileAttachments(JobInfo jobInfo,
InputStream batchContent,
File rootDirectory,
String... files)
|
BatchInfo |
createBatchWithFileAttachments(JobInfo jobInfo,
InputStream batchContent,
Map<String,File> attachedFiles)
|
BatchInfo |
createBatchWithInputStreamAttachments(JobInfo jobInfo,
InputStream batchContent,
Map<String,InputStream> attachments)
|
JobInfo |
createJob(JobInfo job)
|
JobInfo |
createJob(String object,
String operation)
|
InputStream |
doHttpGet(URL url)
|
BatchInfo |
getBatchInfo(String jobId,
String batchId)
|
BatchInfoList |
getBatchInfoList(String jobId)
|
BatchResult |
getBatchResult(String jobId,
String batchId)
|
InputStream |
getBatchResultStream(String jobId,
String batchId)
|
ConnectorConfig |
getConfig()
|
JobInfo |
getJobStatus(String jobId)
|
JobInfo |
updateJob(JobInfo job)
|
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
NAMESPACE
public static final String NAMESPACE
- See Also:
- Constant Field Values
SESSION_ID
public static final String SESSION_ID
- See Also:
- Constant Field Values
XML_CONTENT_TYPE
public static final String XML_CONTENT_TYPE
- See Also:
- Constant Field Values
CSV_CONTENT_TYPE
public static final String CSV_CONTENT_TYPE
- See Also:
- Constant Field Values
ZIP_XML_CONTENT_TYPE
public static final String ZIP_XML_CONTENT_TYPE
- See Also:
- Constant Field Values
ZIP_CSV_CONTENT_TYPE
public static final String ZIP_CSV_CONTENT_TYPE
- See Also:
- Constant Field Values
JOB_QNAME
public static final QName JOB_QNAME
BATCH_QNAME
public static final QName BATCH_QNAME
BATCH_LIST_QNAME
public static final QName BATCH_LIST_QNAME
ERROR_QNAME
public static final QName ERROR_QNAME
typeMapper
public static final TypeMapper typeMapper
RestConnection
public RestConnection(ConnectorConfig config)
throws AsyncApiException
- Throws:
AsyncApiException
createJob
public JobInfo createJob(String object,
String operation)
throws AsyncApiException
- Throws:
AsyncApiException
createJob
public JobInfo createJob(JobInfo job)
throws AsyncApiException
- Throws:
AsyncApiException
addHeader
public void addHeader(String headerName,
String headerValue)
createBatchFromStream
public BatchInfo createBatchFromStream(JobInfo jobInfo,
InputStream input)
throws AsyncApiException
- Throws:
AsyncApiException
createBatchFromZipStream
public BatchInfo createBatchFromZipStream(JobInfo jobInfo,
InputStream zipInput)
throws AsyncApiException
- Throws:
AsyncApiException
createBatchFromDir
public BatchInfo createBatchFromDir(JobInfo job,
InputStream batchContent,
File attachmentDir)
throws AsyncApiException
- Throws:
AsyncApiException
createBatchWithFileAttachments
public BatchInfo createBatchWithFileAttachments(JobInfo jobInfo,
InputStream batchContent,
File rootDirectory,
String... files)
throws AsyncApiException
- Throws:
AsyncApiException
createBatchWithFileAttachments
public BatchInfo createBatchWithFileAttachments(JobInfo jobInfo,
InputStream batchContent,
Map<String,File> attachedFiles)
throws AsyncApiException
- Throws:
AsyncApiException
createBatchWithInputStreamAttachments
public BatchInfo createBatchWithInputStreamAttachments(JobInfo jobInfo,
InputStream batchContent,
Map<String,InputStream> attachments)
throws AsyncApiException
- Parameters:
jobInfo - Parent job for new batch.batchContent - InputStream containing the xml or csv content of the batch, or null only if request.txt is contained
in attachments mapattachments - Map of attachments where the key is the filename to be used in the zip file and the value is the
InputStream representing that file.
- Returns:
- BatchInfo of uploaded batch.
- Throws:
AsyncApiException
createBatch
public BatchRequest createBatch(JobInfo job)
throws AsyncApiException
- Throws:
AsyncApiException
getBatchInfoList
public BatchInfoList getBatchInfoList(String jobId)
throws AsyncApiException
- Throws:
AsyncApiException
getBatchInfo
public BatchInfo getBatchInfo(String jobId,
String batchId)
throws AsyncApiException
- Throws:
AsyncApiException
getBatchResult
public BatchResult getBatchResult(String jobId,
String batchId)
throws AsyncApiException
- Throws:
AsyncApiException
getBatchResultStream
public InputStream getBatchResultStream(String jobId,
String batchId)
throws AsyncApiException
- Throws:
AsyncApiException
doHttpGet
public InputStream doHttpGet(URL url)
throws IOException,
AsyncApiException
- Throws:
IOException
AsyncApiException
getJobStatus
public JobInfo getJobStatus(String jobId)
throws AsyncApiException
- Throws:
AsyncApiException
abortJob
public JobInfo abortJob(String jobId)
throws AsyncApiException
- Throws:
AsyncApiException
closeJob
public JobInfo closeJob(String jobId)
throws AsyncApiException
- Throws:
AsyncApiException
updateJob
public JobInfo updateJob(JobInfo job)
throws AsyncApiException
- Throws:
AsyncApiException
getConfig
public ConnectorConfig getConfig()
Copyright © 2012. All Rights Reserved.