public class BatchFileEntry extends Object
TransientStore.
 
 The file can be chunked or not. If it is chunked it references its chunks as TransientStore entry keys.
Batch| Modifier and Type | Field and Description | 
|---|---|
protected Blob | 
blob  | 
protected Blob | 
chunkedBlob  | 
protected String | 
key  | 
protected static org.apache.commons.logging.Log | 
log  | 
protected Map<String,Serializable> | 
params  | 
protected TransientStore | 
transientStore  | 
| Modifier | Constructor and Description | 
|---|---|
  | 
BatchFileEntry(TransientStore transientStore,
              String key,
              Blob blob)
Returns a file entry that holds the given blob, not chunked. 
 | 
protected  | 
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. 
 | 
| Modifier and Type | Method and Description | 
|---|---|
String | 
addChunk(int index,
        Blob blob)  | 
void | 
beforeRemove()  | 
Blob | 
getBlob()  | 
protected Blob | 
getChunk(TransientStore ts,
        String key)  | 
int | 
getChunkCount()  | 
Collection<String> | 
getChunkEntryKeys()  | 
Map<Integer,String> | 
getChunks()  | 
String | 
getFileName()  | 
long | 
getFileSize()  | 
String | 
getKey()  | 
String | 
getMimeType()  | 
List<Integer> | 
getOrderedChunkIndexes()  | 
Map<String,Serializable> | 
getParams()  | 
boolean | 
isChunked()  | 
boolean | 
isChunksCompleted()  | 
protected void | 
transferTo(Blob blob,
          File file)
Appends the given blob to the given file. 
 | 
protected static final org.apache.commons.logging.Log log
protected TransientStore transientStore
protected Map<String,Serializable> params
protected Blob chunkedBlob
public BatchFileEntry(TransientStore transientStore, String key, Blob blob)
public BatchFileEntry(TransientStore transientStore, String key, int chunkCount, String fileName, String mimeType, long fileSize)
public BatchFileEntry(TransientStore transientStore, String key, Map<String,Serializable> params)
protected BatchFileEntry(TransientStore transientStore, String key, boolean chunked)
public Map<String,Serializable> getParams()
public boolean isChunked()
public String getFileName()
public String getMimeType()
public long getFileSize()
public int getChunkCount()
public List<Integer> getOrderedChunkIndexes()
public Collection<String> getChunkEntryKeys()
public boolean isChunksCompleted()
protected Blob getChunk(TransientStore ts, String key)
protected void transferTo(Blob blob, File file) throws IOException
IOExceptionpublic void beforeRemove()
Copyright © 2019 Nuxeo. All rights reserved.