public class Batch extends Object
Since 7.4 a batch is backed by the TransientStore
.
Modifier and Type | Field and Description |
---|---|
static String |
CHUNKED_PARAM_NAME |
protected Map<String,Serializable> |
fileEntries |
protected String |
key |
protected static org.apache.commons.logging.Log |
log |
Constructor and Description |
---|
Batch(String key) |
Batch(String key,
Map<String,Serializable> fileEntries) |
Modifier and Type | Method and Description |
---|---|
String |
addChunk(String index,
InputStream is,
int chunkCount,
int chunkIndex,
String fileName,
String mimeType,
long fileSize)
Adds a chunk with the given
chunkIndex to the batch file with the given index . |
String |
addFile(String index,
InputStream is,
String name,
String mime)
Adds a file with the given
index to the batch. |
void |
clean() |
Blob |
getBlob(String index) |
List<Blob> |
getBlobs()
Returns the uploaded blobs in the order the user chose to upload them.
|
List<BatchFileEntry> |
getFileEntries() |
BatchFileEntry |
getFileEntry(String index) |
BatchFileEntry |
getFileEntry(String index,
boolean fetchBlobs) |
String |
getKey() |
protected List<String> |
getOrderedFileIndexes() |
protected Blob |
retrieveBlob(String index) |
protected static final org.apache.commons.logging.Log log
public static final String CHUNKED_PARAM_NAME
protected Map<String,Serializable> fileEntries
public Batch(String key, Map<String,Serializable> fileEntries)
public List<Blob> getBlobs()
protected List<String> getOrderedFileIndexes()
protected Blob retrieveBlob(String index)
public List<BatchFileEntry> getFileEntries()
public BatchFileEntry getFileEntry(String index)
public BatchFileEntry getFileEntry(String index, boolean fetchBlobs)
public String addFile(String index, InputStream is, String name, String mime) throws IOException
index
to the batch.BatchFileEntry
.IOException
public String addChunk(String index, InputStream is, int chunkCount, int chunkIndex, String fileName, String mimeType, long fileSize) throws IOException
chunkIndex
to the batch file with the given index
.BatchFileEntry
.IOException
public void clean()
Copyright © 2015 Nuxeo SA. All rights reserved.