Class ZipDownload
java.lang.Object
de.businesscode.bcdui.web.servlets.ZipDownload
Class to provide zipping and downloading a specified number of files
which need to be accessible via ResourceServlet (which also provides the secured access)
Files are specified via a config
<Vfs xmlns="http://www.businesscode.de/schema/bcdui/vfs-1.0.0">
<Zip>
<Folder name="folder1">
<File name="/vfs/documents/ace9e8e7-548a-4410-aa52-c57fb32e34fa/xf"/>
</Folder>
<Folder .... />
</Zip>
</Vfs>
As an alternative, you can also provide a scope/instance pair instead of a path name.
This will get all matching entries from bcd_docUpload and adds them as files
<File scope="..." instance="..."/>
This class is triggered by the StaticResourceServlet if you provide an url with parameter zipInfo
which is the compressed config xml
-
Constructor Summary
Constructors -
Method Summary
-
Constructor Details
-
ZipDownload
-
-
Method Details
-
getZip
public ArrayList<String> getZip(jakarta.servlet.ServletContext context, jakarta.servlet.ServletOutputStream outputStream) throws IOException zips and downloads the files specified in the config if a file is not accessible, it is skipped and filenames within a subfolder are unique. In case there are more than one having the same name, a counter is added- Returns:
- ArrayList of skipped/bad files
- Throws:
IOException
-