public class ExtractorZipFileVisitor extends Object implements ZipUtil.ZipEntryVisitor
| Constructor and Description |
|---|
ExtractorZipFileVisitor(File rootDir,
Pattern filesToRealizeRegex,
TemplateEngine templateEngine,
Set<String> filesToNotExtract,
DeployDifferences diff,
boolean dryRun)
Creates the visitor.
|
| Modifier and Type | Method and Description |
|---|---|
FileHashcodeMap |
getFileHashcodeMap()
Returns the file/hashcode data this visitor has collected.
|
boolean |
visit(ZipEntry entry,
ZipInputStream stream)
Visits a specific zip file entry.
|
public ExtractorZipFileVisitor(File rootDir, Pattern filesToRealizeRegex, TemplateEngine templateEngine, Set<String> filesToNotExtract, DeployDifferences diff, boolean dryRun)
rootDir - the top level directory where all zip file entries will be extracted to.
In other words, all zip file entries' paths are relative to this directory.filesToRealizeRegex - pattern of files that are to be realized prior to hashcodes being computedtemplateEngine - the template engine that replaces replacement variables in files to be realizedfilesToNotExtract - set of files that are not to be extracted from the zip and stored; these are to be skippeddiff - optional object that is told when files are realizeddryRun - if true, this won't actually write files to the filesystempublic FileHashcodeMap getFileHashcodeMap()
public boolean visit(ZipEntry entry, ZipInputStream stream) throws Exception
ZipUtil.ZipEntryVisitorvisit in interface ZipUtil.ZipEntryVisitorentry - the entry being visitedstream - the stream containing the zip contenttrue if everything is OK and processing of the zip content
should continue; returning false will tell the walker to abort further traversing
of the zip content.Exception - if the visitation failed for some reason - this will abort further walking of the zip contentCopyright © 2008-2014 Red Hat, Inc.. All Rights Reserved.