Package com.logicaldoc.core.transfer
Class ZipExport
java.lang.Object
com.logicaldoc.core.transfer.ZipExport
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 SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionprocess(FolderHistory transaction, boolean pdfConversion) Exports the specified folder contentprocess(Long[] docIds, boolean pdfConversion, DocumentHistory transaction) Exports a selection of documentsvoidprocess(Long[] docIds, OutputStream out, boolean pdfConversion, DocumentHistory transaction) Exports a selection of documentsvoidsetAllLevel(boolean level) If allLevel set true all children of a specified folder will be export.
- 
Constructor Details- 
ZipExportpublic ZipExport()
 
- 
- 
Method Details- 
processpublic 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
 
- 
processpublic 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
 
- 
processpublic 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
 
- 
setAllLevelpublic 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
 
 
-