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);
}
});
}
Aggregations