Class Batch
java.lang.Object
org.nuxeo.ecm.core.io.upload.batch.Batch
Batch Object to encapsulate all data related to a batch, especially the temporary files used for Blobs.
Since 7.4 a batch is backed by the TransientStore
.
- Since:
- 5.4.2
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final String
protected Map
<String, Serializable> protected String
protected String
protected TransientStore
-
Constructor Summary
ConstructorsConstructorDescriptionBatch
(String key, Map<String, Serializable> fileEntries, String handlerName, TransientStore transientStore) Constructs a batch. -
Method Summary
Modifier and TypeMethodDescriptionaddChunk
(String index, Blob blob, int chunkCount, int chunkIndex, String fileName, String mimeType, long fileSize) Adds a chunk with the givenchunkIndex
to the batch file with the givenindex
.Adds a file with the givenindex
to the batch.void
clean()
getBlobs()
Returns the uploaded blobs in the order the user chose to upload them.getFileEntry
(String index) getFileEntry
(String index, boolean fetchBlobs) getKey()
boolean
removeFileEntry
(String index) boolean
removeFileEntry
(String index, TransientStore ts) protected Blob
retrieveBlob
(String index)
-
Field Details
-
CHUNKED_PARAM_NAME
- See Also:
-
key
-
fileEntries
-
handlerName
-
transientStore
-
properties
-
-
Constructor Details
-
Batch
public Batch(String key, Map<String, Serializable> fileEntries, String handlerName, TransientStore transientStore) Constructs a batch.- Parameters:
key
- the batch keyfileEntries
- the batch file entrieshandlerName
- the batch hrovider nametransientStore
- the transient store associated with this Batch- Since:
- 10.1
-
-
Method Details
-
getKey
-
getBlobs
Returns the uploaded blobs in the order the user chose to upload them. -
getBlob
-
getOrderedFileIndexes
-
retrieveBlob
-
getFileEntries
-
getFileEntry
-
getFileEntry
-
addFile
Adds a file with the givenindex
to the batch.- Returns:
- The key of the new
BatchFileEntry
. - Since:
- 10.1
-
addChunk
public String addChunk(String index, Blob blob, int chunkCount, int chunkIndex, String fileName, String mimeType, long fileSize) Adds a chunk with the givenchunkIndex
to the batch file with the givenindex
.- Returns:
- The key of the
BatchFileEntry
. - Since:
- 10.1
-
clean
public void clean()- Since:
- 7.4
-
removeFileEntry
- Since:
- 8.4
-
removeFileEntry
- Since:
- 8.4
-
getHandlerName
- Since:
- 10.1
-
getProperties
- Since:
- 10.1
-