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 Stringprotected Map<String, Serializable> protected Stringprotected Stringprotected 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 givenchunkIndexto the batch file with the givenindex.Adds a file with the givenindexto the batch.voidclean()getBlobs()Returns the uploaded blobs in the order the user chose to upload them.getFileEntry(String index) getFileEntry(String index, boolean fetchBlobs) getKey()booleanremoveFileEntry(String index) booleanremoveFileEntry(String index, TransientStore ts) protected BlobretrieveBlob(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 givenindexto 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 givenchunkIndexto 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
-