public interface BatchManager
Modifier and Type | Method and Description |
---|---|
void |
addStream(String batchId,
String index,
InputStream is,
int chunkCount,
int chunkIndex,
String name,
String mime,
long fileSize)
Adds an inputStream as a chunk to a batch.
|
void |
addStream(String batchId,
String index,
InputStream is,
String name,
String mime)
Adds an inputStream as a blob to a batch.
|
void |
clean(String batchId)
Cleans up the temporary storage associated to the batch.
|
Object |
execute(String batchId,
String chainOrOperationId,
CoreSession session,
Map<String,Object> contextParams,
Map<String,Object> operationParams)
Executes the chain or operation on the
Blobs from the given batchId . |
Object |
execute(String batchId,
String fileIndex,
String chainOrOperationId,
CoreSession session,
Map<String,Object> contextParams,
Map<String,Object> operationParams)
Executes the chain or operation on the
Blob from the given batchId and fileIndex . |
Object |
executeAndClean(String batchId,
String chainOrOperationId,
CoreSession session,
Map<String,Object> contextParams,
Map<String,Object> operationParams)
Executes the chain or operation on the
Blobs from the given batchId . |
Blob |
getBlob(String batchId,
String fileIndex) |
Blob |
getBlob(String batchId,
String fileIndex,
int timeoutS) |
List<Blob> |
getBlobs(String batchId)
Gets Blobs associated to a given batch.
|
List<Blob> |
getBlobs(String batchId,
int timeoutS)
Gets Blobs associated to a given batch.
|
List<BatchFileEntry> |
getFileEntries(String batchId) |
BatchFileEntry |
getFileEntry(String batchId,
String fileIndex) |
TransientStore |
getTransientStore()
Returns the
TransientStore backing the batches. |
boolean |
hasBatch(String batchId)
Returns true if there is a batch for the given
batchId , false otherwise. |
String |
initBatch()
Initializes a batch by with an automatically generated id.
|
String |
initBatch(String batchId,
String contextName)
Deprecated.
since 7.10, use
initBatch() instead. |
TransientStore getTransientStore()
TransientStore
backing the batches.void addStream(String batchId, String index, InputStream is, String name, String mime) throws IOException
Batch
if needed.
Streams are persisted as temporary files.
IOException
void addStream(String batchId, String index, InputStream is, int chunkCount, int chunkIndex, String name, String mime, long fileSize) throws IOException
Batch
if needed.
Streams are persisted as temporary files.
IOException
boolean hasBatch(String batchId)
batchId
, false otherwise.List<Blob> getBlobs(String batchId)
List<Blob> getBlobs(String batchId, int timeoutS)
List<BatchFileEntry> getFileEntries(String batchId)
BatchFileEntry getFileEntry(String batchId, String fileIndex)
String initBatch()
@Deprecated String initBatch(String batchId, String contextName)
initBatch()
instead.Object execute(String batchId, String chainOrOperationId, CoreSession session, Map<String,Object> contextParams, Map<String,Object> operationParams)
Blobs
from the given batchId
.
This method does not clean the temporary storage associated to the batchId
.
Object execute(String batchId, String fileIndex, String chainOrOperationId, CoreSession session, Map<String,Object> contextParams, Map<String,Object> operationParams)
Blob
from the given batchId
and fileIndex
.
This method does not clean the temporary storage associated to the batchId
.
Object executeAndClean(String batchId, String chainOrOperationId, CoreSession session, Map<String,Object> contextParams, Map<String,Object> operationParams)
Blobs
from the given batchId
.
This method cleans the temporary storage associated to the batchId
after the execution.
Copyright © 2015 Nuxeo SA. All rights reserved.