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

Modifier and Type
Method
Description
`ByteArrayOutputStream`
`process(FolderHistory transaction, boolean pdfConversion)`
Exports the specified folder content
`ByteArrayOutputStream`
`process(Long[] docIds, boolean pdfConversion, DocumentHistory transaction)`
Exports a selection of documents
`void`
`process(Long[] docIds, OutputStream out, boolean pdfConversion, DocumentHistory transaction)`
Exports a selection of documents
`void`
`setAllLevel(boolean level)`
If allLevel set true all children of a specified folder will be export.

### Methods inherited from class java.lang.Object

`equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

## 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