Class BatchFileEntry

java.lang.Object
org.nuxeo.ecm.automation.server.jaxrs.batch.BatchFileEntry

public class BatchFileEntry extends Object
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 Details

  • Constructor Details

    • BatchFileEntry

      public BatchFileEntry(TransientStore transientStore, String key, Blob blob)
      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

      public BatchFileEntry(TransientStore transientStore, String key, Map<String,Serializable> params)
      Returns a file entry that holds the given parameters.
    • BatchFileEntry

      protected BatchFileEntry(TransientStore transientStore, String key, boolean chunked)
  • Method Details

    • getKey

      public String getKey()
    • getParams

      public Map<String,Serializable> getParams()
    • isChunked

      public boolean isChunked()
    • getFileName

      public String getFileName()
    • getMimeType

      public String getMimeType()
    • getFileSize

      public long getFileSize()
    • getChunkCount

      public int getChunkCount()
    • getChunks

      public Map<Integer,String> getChunks()
    • getOrderedChunkIndexes

      public List<Integer> getOrderedChunkIndexes()
    • getChunkEntryKeys

      public Collection<String> getChunkEntryKeys()
    • isChunksCompleted

      public boolean isChunksCompleted()
    • getBlob

      public Blob getBlob()
    • getChunk

      protected Blob getChunk(TransientStore ts, String key)
    • transferTo

      protected void transferTo(Blob blob, File file) throws IOException
      Appends the given blob to the given file.
      Throws:
      IOException
    • addChunk

      public String addChunk(int index, Blob blob)
    • beforeRemove

      public void beforeRemove()