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 |
handlerName |
protected String |
key |
protected static org.apache.commons.logging.Log |
log |
protected Map<String,Object> |
properties |
protected TransientStore |
transientStore |
Constructor and Description |
---|
Batch(String key) |
Batch(String key,
Map<String,Serializable> fileEntries) |
Batch(String key,
Map<String,Serializable> fileEntries,
String handlerName)
Constructs a batch.
|
Batch(String key,
Map<String,Serializable> fileEntries,
String handlerName,
TransientStore transientStore)
Constructs a batch.
|
Modifier and Type | Method and Description |
---|---|
String |
addChunk(String index,
Blob blob,
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 |
addChunk(String index,
InputStream is,
int chunkCount,
int chunkIndex,
String fileName,
String mimeType,
long fileSize)
Deprecated.
since 10.1, use the
Blob -based signature instead |
String |
addFile(String index,
Blob blob,
String name,
String mime)
Adds a file with the given
index to the batch. |
String |
addFile(String index,
InputStream is,
String name,
String mime)
Deprecated.
since 10.1, use the
Blob -based signature instead |
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 |
getHandlerName() |
String |
getKey() |
protected List<String> |
getOrderedFileIndexes() |
Map<String,Object> |
getProperties() |
boolean |
removeFileEntry(String index) |
boolean |
removeFileEntry(String index,
TransientStore ts) |
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
protected String handlerName
protected TransientStore transientStore
protected Map<String,Object> properties
public Batch(String key, Map<String,Serializable> fileEntries)
public Batch(String key, Map<String,Serializable> fileEntries, String handlerName)
key
- the batch keyfileEntries
- the batch file entrieshandlerName
- the batch hrovider namepublic Batch(String key, Map<String,Serializable> fileEntries, String handlerName, TransientStore transientStore)
key
- the batch keyfileEntries
- the batch file entrieshandlerName
- the batch hrovider nametransientStore
- the transient store associated with this Batchpublic 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)
@Deprecated public String addFile(String index, InputStream is, String name, String mime) throws IOException
Blob
-based signature insteadindex
to the batch.BatchFileEntry
.IOException
public String addFile(String index, Blob blob, String name, String mime)
index
to the batch.BatchFileEntry
.@Deprecated public String addChunk(String index, InputStream is, int chunkCount, int chunkIndex, String fileName, String mimeType, long fileSize) throws IOException
Blob
-based signature insteadchunkIndex
to the batch file with the given index
.BatchFileEntry
.IOException
public String addChunk(String index, Blob blob, int chunkCount, int chunkIndex, String fileName, String mimeType, long fileSize)
chunkIndex
to the batch file with the given index
.BatchFileEntry
.public void clean()
public boolean removeFileEntry(String index, TransientStore ts)
public boolean removeFileEntry(String index)
public String getHandlerName()
public Map<String,Object> getProperties()
Copyright © 2018 Nuxeo. All rights reserved.