com.sforce.async
Class BulkConnection
java.lang.Object
com.sforce.async.BulkConnection
public class BulkConnection
- extends java.lang.Object
RestConnection
- Since:
- 160
- Author:
- mcheenath
|
Method Summary |
JobInfo |
abortJob(java.lang.String jobId)
|
void |
addHeader(java.lang.String headerName,
java.lang.String headerValue)
|
JobInfo |
closeJob(java.lang.String jobId)
|
BatchRequest |
createBatch(JobInfo job)
|
BatchInfo |
createBatchFromDir(JobInfo job,
java.io.InputStream batchContent,
java.io.File attachmentDir)
|
BatchInfo |
createBatchFromStream(JobInfo jobInfo,
java.io.InputStream input)
|
BatchInfo |
createBatchFromZipStream(JobInfo jobInfo,
java.io.InputStream zipInput)
|
BatchInfo |
createBatchWithFileAttachments(JobInfo jobInfo,
java.io.InputStream batchContent,
java.io.File rootDirectory,
java.lang.String... files)
|
BatchInfo |
createBatchWithFileAttachments(JobInfo jobInfo,
java.io.InputStream batchContent,
java.util.Map<java.lang.String,java.io.File> attachedFiles)
|
BatchInfo |
createBatchWithInputStreamAttachments(JobInfo jobInfo,
java.io.InputStream batchContent,
java.util.Map<java.lang.String,java.io.InputStream> attachments)
|
JobInfo |
createJob(JobInfo job)
|
JobInfo |
createJob(java.lang.String object,
java.lang.String operation)
|
BatchInfo |
getBatchInfo(java.lang.String jobId,
java.lang.String batchId)
|
BatchInfoList |
getBatchInfoList(java.lang.String jobId)
|
java.io.InputStream |
getBatchRequestInputStream(java.lang.String jobId,
java.lang.String batchId)
|
BatchResult |
getBatchResult(java.lang.String jobId,
java.lang.String batchId)
|
java.io.InputStream |
getBatchResultStream(java.lang.String jobId,
java.lang.String batchId)
|
ConnectorConfig |
getConfig()
|
JobInfo |
getJobStatus(java.lang.String jobId)
|
QueryResultList |
getQueryResultList(java.lang.String jobId,
java.lang.String batchId)
|
java.io.InputStream |
getQueryResultStream(java.lang.String jobId,
java.lang.String batchId,
java.lang.String resultId)
|
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 java.lang.String NAMESPACE
- See Also:
- Constant Field Values
SESSION_ID
public static final java.lang.String SESSION_ID
- See Also:
- Constant Field Values
XML_CONTENT_TYPE
public static final java.lang.String XML_CONTENT_TYPE
- See Also:
- Constant Field Values
CSV_CONTENT_TYPE
public static final java.lang.String CSV_CONTENT_TYPE
- See Also:
- Constant Field Values
ZIP_XML_CONTENT_TYPE
public static final java.lang.String ZIP_XML_CONTENT_TYPE
- See Also:
- Constant Field Values
ZIP_CSV_CONTENT_TYPE
public static final java.lang.String ZIP_CSV_CONTENT_TYPE
- See Also:
- Constant Field Values
JOB_QNAME
public static final javax.xml.namespace.QName JOB_QNAME
BATCH_QNAME
public static final javax.xml.namespace.QName BATCH_QNAME
BATCH_LIST_QNAME
public static final javax.xml.namespace.QName BATCH_LIST_QNAME
ERROR_QNAME
public static final javax.xml.namespace.QName ERROR_QNAME
typeMapper
public static final TypeMapper typeMapper
BulkConnection
public BulkConnection(ConnectorConfig config)
throws AsyncApiException
- Throws:
AsyncApiException
createJob
public JobInfo createJob(java.lang.String object,
java.lang.String operation)
throws AsyncApiException
- Throws:
AsyncApiException
createJob
public JobInfo createJob(JobInfo job)
throws AsyncApiException
- Throws:
AsyncApiException
addHeader
public void addHeader(java.lang.String headerName,
java.lang.String headerValue)
createBatchFromStream
public BatchInfo createBatchFromStream(JobInfo jobInfo,
java.io.InputStream input)
throws AsyncApiException
- Throws:
AsyncApiException
createBatchFromZipStream
public BatchInfo createBatchFromZipStream(JobInfo jobInfo,
java.io.InputStream zipInput)
throws AsyncApiException
- Throws:
AsyncApiException
createBatchFromDir
public BatchInfo createBatchFromDir(JobInfo job,
java.io.InputStream batchContent,
java.io.File attachmentDir)
throws AsyncApiException
- Throws:
AsyncApiException
createBatchWithFileAttachments
public BatchInfo createBatchWithFileAttachments(JobInfo jobInfo,
java.io.InputStream batchContent,
java.io.File rootDirectory,
java.lang.String... files)
throws AsyncApiException
- Throws:
AsyncApiException
createBatchWithFileAttachments
public BatchInfo createBatchWithFileAttachments(JobInfo jobInfo,
java.io.InputStream batchContent,
java.util.Map<java.lang.String,java.io.File> attachedFiles)
throws AsyncApiException
- Throws:
AsyncApiException
createBatchWithInputStreamAttachments
public BatchInfo createBatchWithInputStreamAttachments(JobInfo jobInfo,
java.io.InputStream batchContent,
java.util.Map<java.lang.String,java.io.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(java.lang.String jobId)
throws AsyncApiException
- Throws:
AsyncApiException
getBatchInfo
public BatchInfo getBatchInfo(java.lang.String jobId,
java.lang.String batchId)
throws AsyncApiException
- Throws:
AsyncApiException
getBatchResult
public BatchResult getBatchResult(java.lang.String jobId,
java.lang.String batchId)
throws AsyncApiException
- Throws:
AsyncApiException
getBatchResultStream
public java.io.InputStream getBatchResultStream(java.lang.String jobId,
java.lang.String batchId)
throws AsyncApiException
- Throws:
AsyncApiException
getBatchRequestInputStream
public java.io.InputStream getBatchRequestInputStream(java.lang.String jobId,
java.lang.String batchId)
throws AsyncApiException
- Throws:
AsyncApiException
getQueryResultList
public QueryResultList getQueryResultList(java.lang.String jobId,
java.lang.String batchId)
throws AsyncApiException
- Throws:
AsyncApiException
getQueryResultStream
public java.io.InputStream getQueryResultStream(java.lang.String jobId,
java.lang.String batchId,
java.lang.String resultId)
throws AsyncApiException
- Throws:
AsyncApiException
getJobStatus
public JobInfo getJobStatus(java.lang.String jobId)
throws AsyncApiException
- Throws:
AsyncApiException
abortJob
public JobInfo abortJob(java.lang.String jobId)
throws AsyncApiException
- Throws:
AsyncApiException
closeJob
public JobInfo closeJob(java.lang.String jobId)
throws AsyncApiException
- Throws:
AsyncApiException
updateJob
public JobInfo updateJob(JobInfo job)
throws AsyncApiException
- Throws:
AsyncApiException
getConfig
public ConnectorConfig getConfig()
Copyright © 2011. All Rights Reserved.