public class Batch extends AbstractStorageEntry
Since 7.4 a batch is backed by the TransientStore
.
Modifier and Type | Field and Description |
---|---|
protected static org.apache.commons.logging.Log |
log |
blobs, cachedBlobs, completed, hasBlobs, id, lastStorageSize, params
Modifier and Type | Method and Description |
---|---|
String |
addChunk(String idx,
InputStream is,
int chunkCount,
int chunkIdx,
String name,
String mime,
long fileSize)
Adds a chunk with the given
chunkIdx to the batch file with the given idx . |
String |
addFile(String idx,
InputStream is,
String name,
String mime)
Adds a file with the given
idx to the batch. |
void |
beforeRemove()
Callback to do some cleanup before entry is removed from the
TransientStore . |
void |
clean() |
Blob |
getBlob(String idx) |
List<Blob> |
getBlobs()
Returns the uploaded blobs in the order the user chose to upload them.
|
List<BatchFileEntry> |
getFileEntries() |
BatchFileEntry |
getFileEntry(String idx) |
protected List<String> |
getOrderedFileIndexes() |
protected Blob |
retrieveBlob(String idx) |
get, getId, getLastStorageSize, getParameters, getSize, isCompleted, load, persist, put, putAll, setBlobs, setCompleted, setLastStorageSize
protected static final org.apache.commons.logging.Log log
public List<Blob> getBlobs()
getBlobs
in interface StorageEntry
getBlobs
in class AbstractStorageEntry
protected List<String> getOrderedFileIndexes()
protected Blob retrieveBlob(String idx)
public List<BatchFileEntry> getFileEntries()
public BatchFileEntry getFileEntry(String idx)
public String addFile(String idx, InputStream is, String name, String mime) throws IOException
idx
to the batch.BatchFileEntry
.IOException
public String addChunk(String idx, InputStream is, int chunkCount, int chunkIdx, String name, String mime, long fileSize) throws IOException
chunkIdx
to the batch file with the given idx
.BatchFileEntry
.IOException
public void clean()
public void beforeRemove()
StorageEntry
TransientStore
.Copyright © 2015 Nuxeo SA. All rights reserved.