Class ZipExport

java.lang.Object
com.logicaldoc.core.transfer.ZipExport

public class ZipExport extends Object
Exports a folder hierarchy and all documents in it as a zip file. Can also be used to export a selection of documents
Author:
Alessandro Gasparini - LogicalDOC, Matteo Caruso - LogicalDOC
  • Constructor Details

    • ZipExport

      public ZipExport()
  • Method Details

    • process

      public ByteArrayOutputStream process(FolderHistory transaction, boolean pdfConversion) throws PersistenceException
      Exports the specified folder content
      Parameters:
      transaction - Transaction with all informations about the export
      pdfConversion - True if the pdf conversion has to be used instead of the original files
      Returns:
      The Stream of the zip archive
      Throws:
      PersistenceException - error at database level
    • process

      public ByteArrayOutputStream process(Long[] docIds, boolean pdfConversion, DocumentHistory transaction) throws PersistenceException
      Exports a selection of documents
      Parameters:
      docIds - Identifiers of the documents
      pdfConversion - True if the pdf conversion has to be used instead of the original files
      transaction - session informations
      Returns:
      The Stream of the zip archive
      Throws:
      PersistenceException - error at data layer
    • process

      public void process(Long[] docIds, OutputStream out, boolean pdfConversion, DocumentHistory transaction) throws PersistenceException
      Exports a selection of documents
      Parameters:
      docIds - Identifiers of the documents
      out - The stream that will receive the zip
      pdfConversion - True if the pdf conversion has to be used instead of the original files
      transaction - session informations
      Throws:
      PersistenceException - error at database level
    • setAllLevel

      public void setAllLevel(boolean level)
      If allLevel set true all children of a specified folder will be export. Otherwise only the first level will be export.
      Parameters:
      level - the compression level