Search in sources :

Example 1 with BatchInfoList

use of org.apache.camel.component.salesforce.api.dto.bulk.BatchInfoList in project camel by apache.

the class DefaultBulkApiClient method getAllBatches.

@Override
public void getAllBatches(String jobId, final BatchInfoListResponseCallback callback) {
    final Request get = getRequest(HttpMethod.GET, batchUrl(jobId, null));
    // make the call and parse the result
    doHttpRequest(get, new ClientResponseCallback() {

        @Override
        public void onResponse(InputStream response, SalesforceException ex) {
            BatchInfoList value = null;
            try {
                value = unmarshalResponse(response, get, BatchInfoList.class);
            } catch (SalesforceException e) {
                ex = e;
            }
            callback.onResponse(value != null ? value.getBatchInfo() : null, ex);
        }
    });
}
Also used : SalesforceException(org.apache.camel.component.salesforce.api.SalesforceException) InputStream(java.io.InputStream) Request(org.eclipse.jetty.client.api.Request) BatchInfoList(org.apache.camel.component.salesforce.api.dto.bulk.BatchInfoList)

Aggregations

InputStream (java.io.InputStream)1 SalesforceException (org.apache.camel.component.salesforce.api.SalesforceException)1 BatchInfoList (org.apache.camel.component.salesforce.api.dto.bulk.BatchInfoList)1 Request (org.eclipse.jetty.client.api.Request)1