Class BatchFileEntry
java.lang.Object
org.nuxeo.ecm.automation.server.jaxrs.batch.BatchFileEntry
Represents a batch file backed by the
TransientStore
.
The file can be chunked or not. If it is chunked it references its chunks as TransientStore
entry keys.
- Since:
- 7.4
- See Also:
-
Field Summary
Modifier and TypeFieldDescriptionprotected Blob
protected Blob
protected String
protected Map<String,
Serializable> protected TransientStore
-
Constructor Summary
ModifierConstructorDescriptionprotected
BatchFileEntry
(TransientStore transientStore, String key, boolean chunked) BatchFileEntry
(TransientStore transientStore, String key, int chunkCount, String fileName, String mimeType, long fileSize) Returns a file entry that references the file chunks.BatchFileEntry
(TransientStore transientStore, String key, Map<String, Serializable> params) Returns a file entry that holds the given parameters.BatchFileEntry
(TransientStore transientStore, String key, Blob blob) Returns a file entry that holds the given blob, not chunked. -
Method Summary
Modifier and TypeMethodDescriptionvoid
getBlob()
protected Blob
getChunk
(TransientStore ts, String key) int
long
getKey()
boolean
boolean
protected void
transferTo
(Blob blob, File file) Appends the given blob to the given file.
-
Field Details
-
transientStore
-
key
-
params
-
blob
-
chunkedBlob
-
-
Constructor Details
-
BatchFileEntry
Returns a file entry that holds the given blob, not chunked. -
BatchFileEntry
public BatchFileEntry(TransientStore transientStore, String key, int chunkCount, String fileName, String mimeType, long fileSize) Returns a file entry that references the file chunks. -
BatchFileEntry
Returns a file entry that holds the given parameters. -
BatchFileEntry
-
-
Method Details
-
getKey
-
getParams
-
isChunked
public boolean isChunked() -
getFileName
-
getMimeType
-
getFileSize
public long getFileSize() -
getChunkCount
public int getChunkCount() -
getChunks
-
getOrderedChunkIndexes
-
getChunkEntryKeys
-
isChunksCompleted
public boolean isChunksCompleted() -
getBlob
-
getChunk
-
transferTo
Appends the given blob to the given file.- Throws:
IOException
-
addChunk
-
beforeRemove
public void beforeRemove()
-