Zip Converter
This adapter compresses and decompresses data into a ZIP archive.
Properties
Operation | Defines the operation executed by the adapter. Possible values:
|
Parameter
Adapter | Main class of the adapter (Do not change!) Possible values: de.softproject.x4.adapter.zipconverter.ZipConverter: Main class (default) |
sourcePath | File system path to the file to be compressed/decompressed. Possible values:
If this parameter is not set, the file is provided by the adapter input. In this case parameter |
targetPath | File system path to the memory location where the output is to be stored ("target file system"). Possible values:
If this parameter is not set, the file is provided by the adapter output. |
overwrite | Defines if existing files with the same name should be overwritten. Possible values:
|
mergeContent | Defines if existing files with the same name should be merged. Possible values:
|
inputName | Name of the input file. Is used if parameter Possible values:
|
encryptedFiles | Defines if encrypted files should be processed in the operation. With operation Possible values:
|
password | Password for encrypted files. Possible values: Any string |
encryptionMethod | Defines which encryption method is used for zipping when Possible values:
|
compressionMethod | Definies which compression algorithm is used for zipping. Possible values:
|
compressionLevel | Defines which compression algorithm when zipping if Possible values:
|
Status values
1 | The operation was executed successfully. |
-1 | An error occurred during the operation's execution. |
Input
The adapter expects input with following structure:
- Both operations (
Zip
/Unzip
) are able to work with two different places of origin or target.- Input/Output
- File system path for Input/Output
- Based on these two possibilities, different inputs can be used for both operations:
- Parameter
sourcePath
is set: Input from the directory specified in the file system path. - Parameter
sourcePath
is not set: Input of the parameter
- Parameter
- Based on these two possibilities, different outputs can be used for both operations:
- Parameter
targetPath
is set: The result of the operation is stored in the location specified as file system path. - Parameter
targetPath
is not set:- An XML file with one entry for each input file contained in the input zip file is output.
- The contents of the zip file are stored in the location specified as the directory path.
- Parameter
Output
Depending on the executed operation, the adapter returns different kinds of documents.
- Operation
Zip
withouttargetPath
: Zip file is provided in adapter output. - Operation
Zip
withtargetPath
: Zip file is stored in the target directory. Operation
Unzip
withouttargetPath
: An XML file that contains the various files within the zip file is provided in the adapter output. The XML file has the following structure:Sample output for operation Unzip
XML<?xml version="1.0" encoding="UTF-8" ?> <Zip> <File size="209" name="testToZip.xml" comment="...">PD94bWwgdmVyc2lvgj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz4KPFJvb3RFbGVtZW50P</File> </Zip>
- Operation
Unzip
withtargetPath
: The content of the zip file is stored in the target directory.