protected static class OwMultifileDownload.OwFolderArchiveEntry extends Object implements OwMultifileDownload.OwContentArchiveEntry
| Constructor and Description |
|---|
OwMultifileDownload.OwFolderArchiveEntry() |
| Modifier and Type | Method and Description |
|---|---|
void |
addChild(String childName_p,
OwMultifileDownload.OwContentArchiveEntry entry_p)
Add new child entry to current folder entry.
|
int |
fileCount() |
boolean |
isSingleFileEntry() |
void |
serveSingleFileOn(javax.servlet.http.HttpServletRequest request_p,
javax.servlet.http.HttpServletResponse response_p,
String fileName_p)
Serializes the content on the response output stream of the
HttpServletResponse parameter
as a single file ID this entry is a single-file-entry |
void |
zipIt(org.apache.tools.zip.ZipOutputStream zipOutputStream_p,
String path_p)
Adds the content represented by this archive entry to the specified
ZipOutputStream |
public OwMultifileDownload.OwFolderArchiveEntry()
public void addChild(String childName_p, OwMultifileDownload.OwContentArchiveEntry entry_p)
childName_p - the name under which the entry will be addedentry_p - the entry to addpublic int fileCount()
fileCount in interface OwMultifileDownload.OwContentArchiveEntrypublic boolean isSingleFileEntry()
true if the entries hierarchy represented
by this folder contains one and only one filepublic void serveSingleFileOn(javax.servlet.http.HttpServletRequest request_p,
javax.servlet.http.HttpServletResponse response_p,
String fileName_p)
throws OwInvalidOperationException
HttpServletResponse parameter
as a single file ID this entry is a single-file-entryserveSingleFileOn in interface OwMultifileDownload.OwContentArchiveEntryresponse_p - the HTTP response to serialize the content onfileName_p - the name under which the content should be serializedrequest_p - HttpServletRequestOwInvalidOperationException - if the response serialization is not possible (for example
because this entry contains multiple files)public void zipIt(org.apache.tools.zip.ZipOutputStream zipOutputStream_p,
String path_p)
throws Exception
OwMultifileDownload.OwContentArchiveEntryZipOutputStreamzipIt in interface OwMultifileDownload.OwContentArchiveEntryzipOutputStream_p - the ZipOutputStream to serialize the content onpath_p - the path under which the content should be serialized on the ZipOutputStreamException - if an error occurs during ZIP serialization (content access related errors
should not be treated locally and logged)Copyright © 2014 Alfresco Business Solutions. All Rights Reserved.