@ElementType(value=TRANSLATOR) public class UnzipPipe extends FixedForwardPipe
<results count="num_of_items"> <result item="1"> <zipEntry>name in ZIP archive of first item</zipEntry> <fileName>filename of first item</fileName> </result> <result item="2"> <zipEntry>name in ZIP archive of second item</zipEntry> <fileName>filename of second item</fileName> </result> ... </results>
<results count="num_of_items"> <result item="1"> <zipEntry>name in ZIP archive of first item</zipEntry> <fileContent>content of first item</fileContent> </result> <result item="2"> <zipEntry>name in ZIP archive of second item</zipEntry> <fileContent>content of second item</fileContent> </result> ... </results>
<basename> + "." + <extension>then the extracted filename (path omitted) becomes
<basename> + <unique number> + "." + <extension>
parameterNamesMustBeUnique
log
LONG_DURATION_MONITORING_EVENT, MESSAGE_SIZE_MONITORING_EVENT, PIPE_EXCEPTION_MONITORING_EVENT
Constructor and Description |
---|
UnzipPipe() |
Modifier and Type | Method and Description |
---|---|
void |
configure()
checks for correct configuration of forward
|
PipeRunResult |
doPipe(Message message,
PipeLineSession session)
This is where the action takes place.
|
protected InputStream |
getInputStream(Message message,
PipeLineSession session) |
void |
setAssumeDirectoryExists(boolean assumeDirectoryExists)
If set
true , validation of directory is ignored |
void |
setCheckDirectory(boolean checkDirectory)
Deprecated.
|
void |
setCollectFileContents(boolean b)
If set
true , the contents of the files in the zip are returned in the result xml message of this pipe. |
void |
setCollectFileContentsBase64Encoded(String string)
Comma separated list of file extensions.
|
void |
setCollectResults(boolean b)
If set
false , only a small summary (count of items in zip) is returned |
void |
setCreateSubDirectories(boolean b)
Deprecated.
|
void |
setDeleteOnExit(boolean b)
If true, file is automatically deleted upon normal JVM termination
|
void |
setDirectory(String string)
Directory to extract the archive to
|
void |
setDirectorySessionKey(String directorySessionKey)
Sessionkey with a directory value to extract the archive to
|
void |
setKeepOriginalFileName(boolean b)
If set
false , a suffix is added to the original filename to be sure it is unique |
void |
setKeepOriginalFilePath(boolean b)
If set
true , the path of the zip entry will be preserved. |
void |
setProcessFile(boolean b)
Deprecated.
|
getParameterValue, setIfParam, setIfValue, setOnlyIfSessionKey, setOnlyIfValue, setSkipOnEmptyInput, setUnlessSessionKey, setUnlessValue, skipPipe
addParameter, consumesSessionVariable, createBean, findForward, getAdapter, getEventSourceName, getForwards, getInSizeStatDummyObject, getOutSizeStatDummyObject, getParameterList, getParameterOverriddenAttributeValue, getParameterValueList, hasSizeStatistics, registerEvent, registerForward, setApplicationContext, setChompCharSize, setDurationThreshold, setElementToMove, setElementToMoveChain, setElementToMoveSessionKey, setEmptyInputReplacement, setGetInputFromFixedValue, setGetInputFromSessionKey, setHideRegex, setLocker, setLogIntermediaryResults, setMaxThreads, setName, setPreserveInput, setRemoveCompactMsgNamespaces, setRestoreMovedElements, setSecLogSessionKeys, setSizeStatistics, setStoreResultInSessionKey, setWriteToSecLog, start, stop, throwEvent
configureTransactionAttributes, isTransacted, isTransacted, setTransacted, setTransactionTimeout
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getChompCharSize, getDurationThreshold, getElementToMove, getElementToMoveChain, getElementToMoveSessionKey, getEmptyInputReplacement, getGetInputFromFixedValue, getGetInputFromSessionKey, getLocker, getSecLogSessionKeys, getStoreResultInSessionKey, isPreserveInput, isRemoveCompactMsgNamespaces, isRestoreMovedElements, isWriteToSecLog, setPipeLine
getMaxThreads
getName
getApplicationContext, getName
getConfigurationClassLoader
getName
getTransactionAttribute, getTransactionTimeout, getTxDef, setTransactionAttribute
public void configure() throws ConfigurationException
FixedForwardPipe
configure
in interface IConfigurable
configure
in interface IPipe
configure
in class FixedForwardPipe
ConfigurationException
protected InputStream getInputStream(Message message, PipeLineSession session) throws PipeRunException
PipeRunException
public PipeRunResult doPipe(Message message, PipeLineSession session) throws PipeRunException
AbstractPipe
doPipe
in interface IPipe
doPipe
in class AbstractPipe
PipeRunException
public void setDirectory(String string)
public void setDirectorySessionKey(String directorySessionKey)
public void setDeleteOnExit(boolean b)
public void setCollectResults(boolean b)
false
, only a small summary (count of items in zip) is returnedpublic void setCollectFileContents(boolean b)
true
, the contents of the files in the zip are returned in the result xml message of this pipe. Please note this can consume a lot of memory for large files or a large number of filespublic void setCollectFileContentsBase64Encoded(String string)
public void setKeepOriginalFileName(boolean b)
false
, a suffix is added to the original filename to be sure it is unique@Deprecated @ConfigurationWarning(value="the attribute \'createSubDirectories\' has been renamed to \'keepOriginalFilePath\'") public void setCreateSubDirectories(boolean b)
public void setKeepOriginalFilePath(boolean b)
true
, the path of the zip entry will be preserved. Otherwise, the zip entries will be extracted to the root folderpublic void setAssumeDirectoryExists(boolean assumeDirectoryExists)
true
, validation of directory is ignored@Deprecated @ConfigurationWarning(value="the attribute \'checkDirectory\' has been renamed to \'assumeDirectoryExists\'") public void setCheckDirectory(boolean checkDirectory)
@Deprecated @ConfigurationWarning(value="Please add a LocalFileSystemPipe with action=read in front of this pipe instead") public void setProcessFile(boolean b)
true
, the input is assumed to be the name of a file to be processed. Otherwise, the input itself is used.Copyright © 2023 Frank!Framework. All rights reserved.