public class ZipUpgrader extends FileUpgrader
| Constructor and Description |
|---|
ZipUpgrader(java.net.URI source,
java.lang.String dest,
java.util.Map<java.lang.String,java.lang.String> files,
java.lang.String marker,
net.ssehub.easy.basics.progress.ProgressObserver observer)
Creates an upgrader instance.
|
| Modifier and Type | Method and Description |
|---|---|
protected boolean |
doUpgrade(ReasoningResult result)
Performs the upgrade operations.
|
private void |
unpackEntryToInstallPath(java.util.zip.ZipInputStream zis,
java.util.zip.ZipEntry entry,
java.lang.String targetName)
Unpacks a ZIP entry to the bundle installation path.
|
private void |
unpackZip(java.util.zip.ZipInputStream zis)
Unpacks a JESS installation zip.
|
getExtension, upgradeallFileMappings, bundleLocationToFile, copy, error, getMappedFile, getMarker, getObserver, getSource, obtainTargetFile, toBundleLocationpublic ZipUpgrader(java.net.URI source,
java.lang.String dest,
java.util.Map<java.lang.String,java.lang.String> files,
java.lang.String marker,
net.ssehub.easy.basics.progress.ProgressObserver observer)
source - the source containing the files to upgradedest - the destination bundle locationfiles - the file mapping describing the upgrademarker - an optional marker file within dest (may be null)observer - a progress observer, use ProgressObserver.NO_OBSERVER if no observer shall be informedprotected boolean doUpgrade(ReasoningResult result)
doUpgrade in class FileUpgraderresult - the reasoning result to be modified as a side effecttrue if performed, false if nodeprivate void unpackZip(java.util.zip.ZipInputStream zis)
throws java.io.IOException
zis - the ZIP input streamjava.io.IOException - any occuring I/O exceptionprivate void unpackEntryToInstallPath(java.util.zip.ZipInputStream zis,
java.util.zip.ZipEntry entry,
java.lang.String targetName)
throws java.io.IOException
zis - the ZIP input streamentry - the ZIP entry to unpacktargetName - the relative name of the target filejava.io.IOException - any occuring I/O exceptionCopyright © 2009 - 2018 SSE. All Rights Reserved.