public interface BatchManager
| Modifier and Type | Method and Description | 
|---|---|
| void | addBlob(String batchId,
       String index,
       Blob blob,
       int chunkCount,
       int chunkIndex,
       String name,
       String mime,
       long fileSize)Adds a blob as a chunk to a batch. | 
| void | addBlob(String batchId,
       String index,
       Blob blob,
       String name,
       String mime)Adds a blob to a batch. | 
| void | addStream(String batchId,
         String index,
         InputStream is,
         int chunkCount,
         int chunkIndex,
         String name,
         String mime,
         long fileSize)Deprecated. 
 since 10.1, use  addBlob(String, String, Blob, int, int, String, String, long)instead | 
| void | addStream(String batchId,
         String index,
         InputStream is,
         String name,
         String mime)Deprecated. 
 since 10.1, use  addBlob(String, String, Blob, String, String)instead | 
| 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  Blobsfrom the givenbatchId. | 
| 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  Blobfrom the givenbatchIdandfileIndex. | 
| Object | executeAndClean(String batchId,
               String chainOrOperationId,
               CoreSession session,
               Map<String,Object> contextParams,
               Map<String,Object> operationParams)Executes the chain or operation on the  Blobsfrom the givenbatchId. | 
| Batch | getBatch(String batchId)Fetches information about a batch. | 
| 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) | 
| BatchHandler | getHandler(String handlerName)Gets a batch handler. | 
| Set<String> | getSupportedHandlers()Returns the supported batch handler names. | 
| TransientStore | getTransientStore()Deprecated. 
 since 10.10, each batch handler has its own transient store | 
| 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. | 
| Batch | initBatch(String handlerName)Initiates a new batch with the given handler. | 
| String | initBatch(String batchId,
         String contextName)Deprecated. 
 since 7.10, use  initBatch()instead. | 
| boolean | removeFileEntry(String batchId,
               String filedIdx)Removes a file from a batch. | 
@Deprecated TransientStore getTransientStore()
TransientStore backing the batches of the default handler.@Deprecated void addStream(String batchId, String index, InputStream is, String name, String mime) throws IOException
addBlob(String, String, Blob, String, String) insteadBatch if needed.
 Streams are persisted as temporary files.
IOExceptionvoid addBlob(String batchId, String index, Blob blob, String name, String mime) throws IOException
Batch if needed.IOException@Deprecated void addStream(String batchId, String index, InputStream is, int chunkCount, int chunkIndex, String name, String mime, long fileSize) throws IOException
addBlob(String, String, Blob, int, int, String, String, long) insteadBatch if needed.
 Streams are persisted as temporary files.
IOExceptionvoid addBlob(String batchId, String index, Blob blob, int chunkCount, int chunkIndex, String name, String mime, long fileSize) throws IOException
Batch if needed.IOExceptionboolean 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.Batch initBatch(String handlerName)
handlerName - the batch handler nameIllegalArgumentException - it the batch handler does not existObject 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.
boolean removeFileEntry(String batchId, String filedIdx)
Batch getBatch(String batchId)
batchId - the batch idnull if it doesn't existSet<String> getSupportedHandlers()
BatchHandler getHandler(String handlerName)
handlerName - the batch handler namenull if it doesn't existCopyright © 2019 Nuxeo. All rights reserved.