com.sforce.async
Class BulkConnection

java.lang.Object
  extended by com.sforce.async.BulkConnection

public class BulkConnection
extends Object

BulkConnection

Since:
160
Author:
mcheenath

Field Summary
static QName BATCH_LIST_QNAME
           
static QName BATCH_QNAME
           
static String CSV_CONTENT_TYPE
           
static QName ERROR_QNAME
           
static QName JOB_QNAME
           
static String NAMESPACE
           
static String SESSION_ID
           
static TypeMapper typeMapper
           
static String XML_CONTENT_TYPE
           
static String ZIP_CSV_CONTENT_TYPE
           
static String ZIP_XML_CONTENT_TYPE
           
 
Constructor Summary
BulkConnection(ConnectorConfig config)
           
 
Method Summary
 JobInfo abortJob(String jobId)
           
 void addHeader(String headerName, String headerValue)
           
 URL buildBatchResultURL(String jobId, String batchId)
           
 URL buildQueryResultURL(String jobId, String batchId, String resultId)
           
 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)
           
 BatchInfo getBatchInfo(String jobId, String batchId)
           
 BatchInfoList getBatchInfoList(String jobId)
           
 InputStream getBatchRequestInputStream(String jobId, String batchId)
           
 BatchResult getBatchResult(String jobId, String batchId)
           
 InputStream getBatchResultStream(String jobId, String batchId)
           
 ConnectorConfig getConfig()
           
 JobInfo getJobStatus(String jobId)
           
 QueryResultList getQueryResultList(String jobId, String batchId)
           
 InputStream getQueryResultStream(String jobId, String batchId, String resultId)
           
 JobInfo updateJob(JobInfo job)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

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

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
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

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 map
attachments - 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

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

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

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 © 2013. All Rights Reserved.