Package com.sforce.async
Class BulkConnection
- java.lang.Object
-
- com.sforce.async.BulkConnection
-
public class BulkConnection extends Object
BulkConnection- Since:
- 160
- Author:
- mcheenath
-
-
Field Summary
Fields Modifier and Type Field Description static StringAVRO_BINARY_CONTENT_TYPEstatic QNameBATCH_LIST_QNAMEstatic QNameBATCH_QNAMEstatic StringCSV_CONTENT_TYPEstatic QNameERROR_QNAMEstatic QNameJOB_QNAMEstatic StringJSON_CONTENT_TYPEstatic StringNAMESPACEstatic StringOCTET_STREAM_CONTENT_TYPEstatic StringPARQUET_CONTENT_TYPEstatic StringSESSION_IDstatic TypeMappertypeMapperstatic StringXML_CONTENT_TYPEstatic StringZIP_CSV_CONTENT_TYPEstatic StringZIP_JSON_CONTENT_TYPEstatic StringZIP_XML_CONTENT_TYPE
-
Constructor Summary
Constructors Constructor Description BulkConnection(ConnectorConfig config)
-
Method Summary
-
-
-
Field Detail
-
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
-
JSON_CONTENT_TYPE
public static final String JSON_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
-
ZIP_JSON_CONTENT_TYPE
public static final String ZIP_JSON_CONTENT_TYPE
- See Also:
- Constant Field Values
-
AVRO_BINARY_CONTENT_TYPE
public static final String AVRO_BINARY_CONTENT_TYPE
- See Also:
- Constant Field Values
-
OCTET_STREAM_CONTENT_TYPE
public static final String OCTET_STREAM_CONTENT_TYPE
- See Also:
- Constant Field Values
-
PARQUET_CONTENT_TYPE
public static final String PARQUET_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
-
-
Constructor Detail
-
BulkConnection
public BulkConnection(ConnectorConfig config) throws AsyncApiException
- Throws:
AsyncApiException
-
-
Method Detail
-
createJob
public JobInfo createJob(String object, 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
-
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
-
createBatchFromForeignCsvStream
public BatchInfo createBatchFromForeignCsvStream(JobInfo jobInfo, InputStream input, String charSet) throws AsyncApiException
- Throws:
AsyncApiException
-
createTransformationSpecFromStream
public void createTransformationSpecFromStream(JobInfo jobInfo, 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(String jobId) throws AsyncApiException
- Throws:
AsyncApiException
-
getBatchInfoList
public BatchInfoList getBatchInfoList(String jobId, ContentType contentType) throws AsyncApiException
- Throws:
AsyncApiException
-
getBatchInfo
public BatchInfo getBatchInfo(String jobId, String batchId) throws AsyncApiException
- Throws:
AsyncApiException
-
getBatchInfo
public BatchInfo getBatchInfo(String jobId, String batchId, ContentType contentType) throws AsyncApiException
- Throws:
AsyncApiException
-
getBatchResult
public BatchResult getBatchResult(String jobId, String batchId) throws AsyncApiException
- Throws:
AsyncApiException
-
getBatchResult
public BatchResult getBatchResult(String jobId, String batchId, ContentType contentType) throws AsyncApiException
- Throws:
AsyncApiException
-
getBatchResultStream
public InputStream getBatchResultStream(String jobId, String batchId) throws AsyncApiException
- Throws:
AsyncApiException
-
buildBatchResultURL
public URL buildBatchResultURL(String jobId, String batchId) throws AsyncApiException
- Throws:
AsyncApiException
-
getBatchRequestInputStream
public InputStream getBatchRequestInputStream(String jobId, String batchId) throws AsyncApiException
- Throws:
AsyncApiException
-
getQueryResultList
public QueryResultList getQueryResultList(String jobId, String batchId) throws AsyncApiException
- Throws:
AsyncApiException
-
getQueryResultList
public QueryResultList getQueryResultList(String jobId, String batchId, ContentType contentType) throws AsyncApiException
- Throws:
AsyncApiException
-
getQueryResultStream
public InputStream getQueryResultStream(String jobId, String batchId, String resultId) throws AsyncApiException
- Throws:
AsyncApiException
-
buildQueryResultURL
public URL buildQueryResultURL(String jobId, String batchId, String resultId) throws AsyncApiException
- Throws:
AsyncApiException
-
getJobStatus
public JobInfo getJobStatus(String jobId) throws AsyncApiException
- Throws:
AsyncApiException
-
getJobStatus
public JobInfo getJobStatus(String jobId, ContentType contentType) 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
-
updateJob
public JobInfo updateJob(JobInfo job, ContentType contentType) throws AsyncApiException
- Throws:
AsyncApiException
-
getConfig
public ConnectorConfig getConfig()
-
-