Package com.sforce.async
Class BulkConnection
- java.lang.Object
-
- com.sforce.async.BulkConnection
-
public class BulkConnection extends java.lang.ObjectBulkConnection- Since:
- 160
- Author:
- mcheenath
-
-
Field Summary
Fields Modifier and Type Field Description static javax.xml.namespace.QNameBATCH_LIST_QNAMEstatic javax.xml.namespace.QNameBATCH_QNAMEstatic java.lang.StringCSV_CONTENT_TYPEstatic javax.xml.namespace.QNameERROR_QNAMEstatic javax.xml.namespace.QNameJOB_QNAMEstatic java.lang.StringJSON_CONTENT_TYPEstatic java.lang.StringNAMESPACEstatic java.lang.StringSESSION_IDstatic TypeMappertypeMapperstatic java.lang.StringXML_CONTENT_TYPEstatic java.lang.StringZIP_CSV_CONTENT_TYPEstatic java.lang.StringZIP_JSON_CONTENT_TYPEstatic java.lang.StringZIP_XML_CONTENT_TYPE
-
Constructor Summary
Constructors Constructor Description BulkConnection(ConnectorConfig config)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description JobInfoabortJob(java.lang.String jobId)voidaddHeader(java.lang.String headerName, java.lang.String headerValue)java.net.URLbuildBatchResultURL(java.lang.String jobId, java.lang.String batchId)java.net.URLbuildQueryResultURL(java.lang.String jobId, java.lang.String batchId, java.lang.String resultId)JobInfocloseJob(java.lang.String jobId)BatchRequestcreateBatch(JobInfo job)BatchInfocreateBatchFromDir(JobInfo job, java.io.InputStream batchContent, java.io.File attachmentDir)BatchInfocreateBatchFromForeignCsvStream(JobInfo jobInfo, java.io.InputStream input, java.lang.String charSet)BatchInfocreateBatchFromStream(JobInfo jobInfo, java.io.InputStream input)BatchInfocreateBatchFromZipStream(JobInfo jobInfo, java.io.InputStream zipInput)BatchInfocreateBatchWithFileAttachments(JobInfo jobInfo, java.io.InputStream batchContent, java.io.File rootDirectory, java.lang.String... files)BatchInfocreateBatchWithFileAttachments(JobInfo jobInfo, java.io.InputStream batchContent, java.util.Map<java.lang.String,java.io.File> attachedFiles)BatchInfocreateBatchWithInputStreamAttachments(JobInfo jobInfo, java.io.InputStream batchContent, java.util.Map<java.lang.String,java.io.InputStream> attachments)CsvBatchRequestcreateCsvBatch(JobInfo job)JobInfocreateJob(JobInfo job)JobInfocreateJob(JobInfo job, ContentType contentType)JobInfocreateJob(java.lang.String object, java.lang.String operation)TransformationSpecRequestcreateTransformationSpec(JobInfo job)voidcreateTransformationSpecFromStream(JobInfo jobInfo, java.io.InputStream input)BatchInfogetBatchInfo(java.lang.String jobId, java.lang.String batchId)BatchInfogetBatchInfo(java.lang.String jobId, java.lang.String batchId, ContentType contentType)BatchInfoListgetBatchInfoList(java.lang.String jobId)BatchInfoListgetBatchInfoList(java.lang.String jobId, ContentType contentType)java.io.InputStreamgetBatchRequestInputStream(java.lang.String jobId, java.lang.String batchId)BatchResultgetBatchResult(java.lang.String jobId, java.lang.String batchId)BatchResultgetBatchResult(java.lang.String jobId, java.lang.String batchId, ContentType contentType)java.io.InputStreamgetBatchResultStream(java.lang.String jobId, java.lang.String batchId)ConnectorConfiggetConfig()JobInfogetJobStatus(java.lang.String jobId)JobInfogetJobStatus(java.lang.String jobId, ContentType contentType)QueryResultListgetQueryResultList(java.lang.String jobId, java.lang.String batchId)QueryResultListgetQueryResultList(java.lang.String jobId, java.lang.String batchId, ContentType contentType)java.io.InputStreamgetQueryResultStream(java.lang.String jobId, java.lang.String batchId, java.lang.String resultId)JobInfoupdateJob(JobInfo job)JobInfoupdateJob(JobInfo job, ContentType contentType)
-
-
-
Field Detail
-
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
-
JSON_CONTENT_TYPE
public static final java.lang.String JSON_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
-
ZIP_JSON_CONTENT_TYPE
public static final java.lang.String ZIP_JSON_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
-
-
Constructor Detail
-
BulkConnection
public BulkConnection(ConnectorConfig config) throws AsyncApiException
- Throws:
AsyncApiException
-
-
Method Detail
-
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
-
createJob
public JobInfo createJob(JobInfo job, ContentType contentType) 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
-
createBatchFromForeignCsvStream
public BatchInfo createBatchFromForeignCsvStream(JobInfo jobInfo, java.io.InputStream input, java.lang.String charSet) throws AsyncApiException
- Throws:
AsyncApiException
-
createTransformationSpecFromStream
public void createTransformationSpecFromStream(JobInfo jobInfo, java.io.InputStream input) throws AsyncApiException
- Throws:
AsyncApiException
-
createBatch
public BatchRequest createBatch(JobInfo job) throws AsyncApiException
- Throws:
AsyncApiException
-
createCsvBatch
public CsvBatchRequest createCsvBatch(JobInfo job) throws AsyncApiException
- Throws:
AsyncApiException
-
createTransformationSpec
public TransformationSpecRequest createTransformationSpec(JobInfo job) throws AsyncApiException
- Throws:
AsyncApiException
-
getBatchInfoList
public BatchInfoList getBatchInfoList(java.lang.String jobId) throws AsyncApiException
- Throws:
AsyncApiException
-
getBatchInfoList
public BatchInfoList getBatchInfoList(java.lang.String jobId, ContentType contentType) throws AsyncApiException
- Throws:
AsyncApiException
-
getBatchInfo
public BatchInfo getBatchInfo(java.lang.String jobId, java.lang.String batchId) throws AsyncApiException
- Throws:
AsyncApiException
-
getBatchInfo
public BatchInfo getBatchInfo(java.lang.String jobId, java.lang.String batchId, ContentType contentType) throws AsyncApiException
- Throws:
AsyncApiException
-
getBatchResult
public BatchResult getBatchResult(java.lang.String jobId, java.lang.String batchId) throws AsyncApiException
- Throws:
AsyncApiException
-
getBatchResult
public BatchResult getBatchResult(java.lang.String jobId, java.lang.String batchId, ContentType contentType) throws AsyncApiException
- Throws:
AsyncApiException
-
getBatchResultStream
public java.io.InputStream getBatchResultStream(java.lang.String jobId, java.lang.String batchId) throws AsyncApiException- Throws:
AsyncApiException
-
buildBatchResultURL
public java.net.URL buildBatchResultURL(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
-
getQueryResultList
public QueryResultList getQueryResultList(java.lang.String jobId, java.lang.String batchId, ContentType contentType) 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
-
buildQueryResultURL
public java.net.URL buildQueryResultURL(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
-
getJobStatus
public JobInfo getJobStatus(java.lang.String jobId, ContentType contentType) 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
-
updateJob
public JobInfo updateJob(JobInfo job, ContentType contentType) throws AsyncApiException
- Throws:
AsyncApiException
-
getConfig
public ConnectorConfig getConfig()
-
-