Package com.logicaldoc.core.transfer
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 Summary
Constructors Constructor Description ZipExport()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ByteArrayOutputStream
process(FolderHistory transaction, boolean pdfConversion)
Exports the specified folder contentByteArrayOutputStream
process(Long[] docIds, boolean pdfConversion, DocumentHistory transaction)
Exports a selection of documentsvoid
process(Long[] docIds, OutputStream out, boolean pdfConversion, DocumentHistory transaction)
Exports a selection of documentsvoid
setAllLevel(boolean level)
If allLevel set true all children of a specified folder will be export.
-
-
-
Method Detail
-
process
public ByteArrayOutputStream process(FolderHistory transaction, boolean pdfConversion) throws PersistenceException
Exports the specified folder content- Parameters:
transaction
- Transaction with all informations about the exportpdfConversion
- 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 documentspdfConversion
- True if the pdf conversion has to be used instead of the original filestransaction
- 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 documentsout
- The stream that will receive the zippdfConversion
- True if the pdf conversion has to be used instead of the original filestransaction
- 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
-
-