public class Update extends AbstractCommand
Modifier and Type | Field and Description |
---|---|
protected boolean |
allowDowngrade |
protected File |
file
The source file.
|
static String |
ID |
protected static org.apache.commons.logging.Log |
log |
protected boolean |
removeOnExit |
protected File |
todir
The target file.
|
protected boolean |
upgradeOnly |
fail, guardVars, id, ignore
Modifier | Constructor and Description |
---|---|
|
Update() |
protected |
Update(String id) |
Modifier and Type | Method and Description |
---|---|
protected org.nuxeo.connect.update.task.Command |
doRun(org.nuxeo.connect.update.task.Task task,
Map<String,String> prefs)
Override to implement command actions
|
protected void |
doValidate(org.nuxeo.connect.update.task.Task task,
org.nuxeo.connect.update.ValidationStatus status)
Override to implement validation.
|
protected org.nuxeo.connect.update.task.Command |
getDeployCommand(UpdateManager updateManager,
org.nuxeo.connect.update.task.Command rollbackCommand)
Method to be overridden by subclasses to provide a deploy command for hot reload
|
void |
initialize(Element element) |
void |
readFrom(Element element)
Must be implemented to initialize the command arguments from an XML fragment.
|
protected CompositeCommand |
updateDirectory(org.nuxeo.connect.update.task.Task task,
File dir,
UpdateManager mgr) |
protected Rollback |
updateFile(org.nuxeo.connect.update.task.Task task,
File fileToUpdate,
UpdateManager mgr) |
void |
writeTo(org.nuxeo.connect.update.xml.XmlWriter writer) |
getId, ignore, isPostInstall, run, setFail, setIgnore, validate
protected static final org.apache.commons.logging.Log log
public static final String ID
protected boolean removeOnExit
protected boolean allowDowngrade
protected boolean upgradeOnly
public void initialize(Element element) throws org.nuxeo.connect.update.PackageException
initialize
in interface org.nuxeo.connect.update.task.Command
initialize
in class AbstractCommand
org.nuxeo.connect.update.PackageException
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)
protected void doValidate(org.nuxeo.connect.update.task.Task task, org.nuxeo.connect.update.ValidationStatus status) throws org.nuxeo.connect.update.PackageException
AbstractCommand
doValidate
in class AbstractCommand
task
- The task being validatedstatus
- Use ValidationStatus.addError(String)
or ValidationStatus.addWarning(String)
to
provide validation error/warning messagesorg.nuxeo.connect.update.PackageException
protected org.nuxeo.connect.update.task.Command doRun(org.nuxeo.connect.update.task.Task task, Map<String,String> prefs) throws org.nuxeo.connect.update.PackageException
AbstractCommand
doRun
in class AbstractCommand
org.nuxeo.connect.update.PackageException
protected CompositeCommand updateDirectory(org.nuxeo.connect.update.task.Task task, File dir, UpdateManager mgr) throws org.nuxeo.connect.update.PackageException
org.nuxeo.connect.update.PackageException
protected Rollback updateFile(org.nuxeo.connect.update.task.Task task, File fileToUpdate, UpdateManager mgr) throws org.nuxeo.connect.update.PackageException
org.nuxeo.connect.update.PackageException
protected org.nuxeo.connect.update.task.Command getDeployCommand(UpdateManager updateManager, org.nuxeo.connect.update.task.Command rollbackCommand)
Copyright © 2015 Nuxeo SA. All rights reserved.