Class 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 Detail

      • ZipExport

        public ZipExport()
    • Method Detail

      • process

        public ByteArrayOutputStream process​(FolderHistory transaction,
                                             boolean pdfConversion)
        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
      • process

        public ByteArrayOutputStream process​(Long[] docIds,
                                             boolean pdfConversion,
                                             DocumentHistory transaction)
        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
      • process

        public void process​(Long[] docIds,
                            OutputStream out,
                            boolean pdfConversion,
                            DocumentHistory transaction)
        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
      • 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