ZipHandling

Category: Modules
Subcategory: Import/Export

Overview

This module includes 2 Java actions, ZipDocuments and UnzipDocument The ZipDocuments action allows you to ZIp a list of FileDocuments The UnzipDocument allows you to unzip a zipfile and direct result in a list of FileDocuments 2021-april : UnzipDocument will now unzip zipfiles with folders

Documentation

Description

This module includes 2 Java actions, ZipDocuments and UnzipDocument

Typical usage scenario

When you want to interact with zipped files

Features and limitations

ZipDocuments : All Filedocuments from the list will be zipped in a new file, or in the given ZipFile.

UnzipDocument : Documents will be stored as a List of FileDocuments (Committed), delete the List at the end of microflow if you don't use all the files. UnzipDocuments can decompress these kind of archive formats: bzip2, gzip, pack200, lzma, xz, Snappy, traditional Unix Compress, DEFLATE, DEFLATE64, LZ4, Brotli, Zstandard and ar, cpio, jar, tar, zip, dump, 7z, arj.

Dependencies [optional]

  • Mendix Modeler 7.7.1 or greater
  • commons-compress-1.20.jar (included)

Installation [optional]

Import the module by using the default Import Module Package

Configuration [optional]

Use the Java Actions in a Microflow

For Unzip, give as imput parameter a FileDocument (that is the zipped file), as output you get a List of FileDocuments that include all the files in the zipfile

For ZIP, give as input parameter a list of FileDocuments, as output you get a output.zip zip file, including all files from the list. From verion 1.3.0 you can add a ZipFile parameter, it must be a generalization of FileDocument. The return zip will be stored in this ZipFile. If you let it empty , you need to use the return variable, which will be of type FileDocument.

 

Conversion to 3.x

The ZipDocument has a new parameter, for conversion you can make this parameter empty, the result Zip is as it was in lower versions. If you want to use the generalization of FileDocument, create the object and add this to the parameter en unuse return variable.

 

 

Releases

Version: 3.1.0
Framework Version: 8.12.0
Release Notes: For ZipDocument you can sent a generalization of the FileDocument type, so you can use this module now for users without giving them system administrator rights.
Version: 3.0.0
Framework Version: 7.23.19
Release Notes: For ZipDocument you can sent a generalization of the FileDocument type, so you can use this module now for users without giving them system administrator rights
Version: 2.2.0
Framework Version: 8.12.0
Release Notes: UnzipDocument will now unzip zipfiles with folders
Version: 2.1.0
Framework Version: 7.23.20
Release Notes: UnzipDocument will now unzip zipfiles with folders
Version: 1.3.0
Framework Version: 8.12.0
Release Notes: Release for Mendix 9