Class Delete
java.lang.Object
org.nuxeo.connect.update.task.standalone.commands.AbstractCommand
org.nuxeo.connect.update.task.standalone.commands.Delete
- All Implemented Interfaces:
org.nuxeo.connect.update.task.Command
The delete command. This command takes 2 arguments: the file path to delete and an optional md5. If md5 is set then
the command fails if the target file has not the same md5.
The inverse of the delete command is a copy command.
- Author:
- Bogdan Stefanescu
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected Filestatic final Stringprotected Stringprotected booleanFields inherited from class org.nuxeo.connect.update.task.standalone.commands.AbstractCommand
fail, guardVars, id, ignore -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected org.nuxeo.connect.update.task.CommandOverride to implement command actionsprotected voiddoValidate(org.nuxeo.connect.update.task.Task task, org.nuxeo.connect.update.ValidationStatus status) Override to implement validation.voidMust be implemented to initialize the command arguments from an XML fragment.voidwriteTo(org.nuxeo.connect.update.xml.XmlWriter writer) Methods inherited from class org.nuxeo.connect.update.task.standalone.commands.AbstractCommand
getId, ignore, initialize, isPostInstall, run, setFail, setIgnore, setPackageUpdateService, validate
-
Field Details
-
ID
- See Also:
-
file
-
md5
-
onExit
protected boolean onExit
-
-
Constructor Details
-
Delete
public Delete() -
Delete
-
Delete
-
-
Method Details
-
doValidate
protected void doValidate(org.nuxeo.connect.update.task.Task task, org.nuxeo.connect.update.ValidationStatus status) Description copied from class:AbstractCommandOverride to implement validation.- Specified by:
doValidatein classAbstractCommand- Parameters:
task- The task being validatedstatus- UseValidationStatus.addError(String)orValidationStatus.addWarning(String)to provide validation error/warning messages
-
doRun
protected org.nuxeo.connect.update.task.Command doRun(org.nuxeo.connect.update.task.Task task, Map<String, String> prefs) throws org.nuxeo.connect.update.PackageExceptionDescription copied from class:AbstractCommandOverride to implement command actions- Specified by:
doRunin classAbstractCommand- Returns:
- Rollback command
- Throws:
org.nuxeo.connect.update.PackageException
-
readFrom
Description copied from class:AbstractCommandMust be implemented to initialize the command arguments from an XML fragment.- Specified by:
readFromin classAbstractCommand- Throws:
org.nuxeo.connect.update.PackageException
-
writeTo
public void writeTo(org.nuxeo.connect.update.xml.XmlWriter writer)
-