public class ParameterizedCopy extends Copy
If md5 is set then the copy command will be validated only if the target file has the same md5 as the one specified in the command.
The Copy command has as inverse either Delete either another Copy command. If the file was copied without overwriting then Delete is the inverse (with a md5 set to the one of the copied file). If the file was overwritten then the Copy command has an inverse another copy command with the md5 to the one of the copied file and the overwrite flag to true. The file to copy will be the backup of the overwritten file.
Modifier and Type | Field and Description |
---|---|
static String |
ID |
append, file, LAUNCHER_CHANGED_PROPERTY, LAUNCHER_JAR, log, md5, overwrite, removeOnExit, tofile
fail, guardVars, id, ignore
Constructor and Description |
---|
ParameterizedCopy() |
ParameterizedCopy(File file,
File tofile,
String md5,
boolean overwrite) |
Modifier and Type | Method and Description |
---|---|
protected String |
getContentToCopy(File fileToCopy,
Map<String,String> prefs)
Override in subclass to parameterize content.
|
doCopy, doRun, doValidate, getContentToCopy, readFrom, writeTo
getId, ignore, initialize, isPostInstall, run, setFail, setIgnore, validate
public static final String ID
public ParameterizedCopy()
public ParameterizedCopy(File file, File tofile, String md5, boolean overwrite)
protected String getContentToCopy(File fileToCopy, Map<String,String> prefs) throws org.nuxeo.connect.update.PackageException
Copy
getContentToCopy
in class Copy
Copy.append
parameter to determine if returned content is
replacing or appending to destination file.org.nuxeo.connect.update.PackageException
Copyright © 2015 Nuxeo SA. All rights reserved.