public class Copy extends AbstractCommand
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 inverse of Copy command is 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.
Constructor and Description |
---|
Copy() |
Copy(File file,
File tofile,
String md5,
boolean overwrite) |
Copy(File file,
File tofile,
String md5,
boolean overwrite,
boolean removeOnExit) |
Modifier and Type | Method and Description |
---|---|
void |
readFrom(Element element)
Must be implemented to initialize the command arguments from an XML
fragment.
|
void |
writeTo(org.nuxeo.connect.update.xml.XmlWriter writer) |
getId, ignore, initialize, isPostInstall, run, setFail, setIgnore, validate
public static final String ID
public void readFrom(Element element) throws org.nuxeo.connect.update.PackageException
AbstractCommand
readFrom
in class AbstractCommand
org.nuxeo.connect.update.PackageException
public void writeTo(org.nuxeo.connect.update.xml.XmlWriter writer)
Copyright © 2013 Nuxeo SA. All Rights Reserved.