ZipHandling

Content Type: Module
Categories: Utility

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.

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

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

Installation [optional]

Import the module by using the default Import Module Package

Configuration 

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 4.6.x

Removed the input parameter ZipFile, that was used for specializated FileDocuments. Mendix does not allow to change input parameters anymore. Use the communityCommons DuplicateFileDocument  to  change the FileDocument to your own specialization. For this you have to reassign parameters for current use op ZipDocuments

Removed commons-compress jar. So it can be deleted from userlib folder if it is not used by other modules.

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: 4.6.0
Framework Version: 10.6.9
Release Notes: Removed the input parameter ZipFile, that was used for specializated FileDocuments. Mendix does not allow to change input parameters anymore. Use the communityCommons DuplicateFileDocument to change the FileDocument to your own specialization. For this you have to reassign parameters for current use op ZipDocuments Removed commons-compress jar. So it can be deleted from userlib folder if it is not used by other modules.
Version: 4.5.1
Framework Version: 10.0.0
Release Notes: Fix Unused bytes for unzip
Version: 4.4.1
Framework Version: 9.18.4
Release Notes: Mendix 9.18 > : Fix for unused bytes for unzipdocuments
Version: 4.3.1
Framework Version: 8.18.24
Release Notes: Mendix 8 , Fix for unused bytes for unzipdocuments
Version: 4.0.3
Framework Version: 10.0.0
Release Notes: Fix for Mendix 10
Version: 4.0.2
Framework Version: 9.18.4
Release Notes: Available for Mendix 10
Version: 4.0.1
Framework Version: 8.12.0
Release Notes: New licensemodel
Version: 4.0.0
Framework Version: 8.12.0
Release Notes: Mendix modeller 8 version
Version: 3.2.2
Framework Version: 8.12.0
Release Notes: updated commons-compress-1.21.jar remove all other common-compress from userlib folder
Version: 3.2.1
Framework Version: 7.23.19
Release Notes: updated commons-compress-1.21.jar remove all other common-compress from userlib folder