Class Batch
java.lang.Object
org.nuxeo.ecm.automation.server.jaxrs.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
Modifier and TypeFieldDescriptionstatic final String
protected Map<String,
Serializable> protected String
protected String
protected TransientStore
-
Constructor Summary
ConstructorDescriptionBatch
(String key, Map<String, Serializable> fileEntries, String handlerName, TransientStore transientStore) Constructs a batch. -
Method Summary
Modifier and TypeMethodDescriptionaddChunk
(String index, InputStream is, int chunkCount, int chunkIndex, String fileName, String mimeType, long fileSize) Deprecated.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
.addFile
(String index, InputStream is, String name, String mime) Deprecated.since 10.1, use theBlob
-based signature insteadAdds 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
@Deprecated public String addFile(String index, InputStream is, String name, String mime) throws IOException Deprecated.since 10.1, use theBlob
-based signature insteadAdds a file with the givenindex
to the batch.- Returns:
- The key of the new
BatchFileEntry
. - Throws:
IOException
-
addFile
Adds a file with the givenindex
to the batch.- Returns:
- The key of the new
BatchFileEntry
. - Since:
- 10.1
-
addChunk
@Deprecated public String addChunk(String index, InputStream is, int chunkCount, int chunkIndex, String fileName, String mimeType, long fileSize) throws IOException Deprecated.since 10.1, use theBlob
-based signature insteadAdds a chunk with the givenchunkIndex
to the batch file with the givenindex
.- Returns:
- The key of the
BatchFileEntry
. - Throws:
IOException
- Since:
- 7.4
-
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
-
Blob
-based signature instead