public abstract class CommandsTask extends AbstractTask
Modifier and Type | Field and Description |
---|---|
protected LinkedList<org.nuxeo.connect.update.task.Command> |
commandLog
The log is generated in the inverse order of commands to ensure last command is rollbacked first.
|
protected List<org.nuxeo.connect.update.task.Command> |
commands |
env, ENV_BUNDLES, ENV_CONFIG, ENV_EAR, ENV_HOME, ENV_HOSTAPP_NAME, ENV_HOSTAPP_VERSION, ENV_LIB, ENV_SERVER_HOME, ENV_SYSLIB, ENV_TEMPLATES, ENV_TIMESTAMP, pkg, PKG_ID, PKG_NAME, PKG_ROOT, PKG_VERSION, restart, serverPathPrefix, service, updateMgr, updateMgrLoaded
Constructor and Description |
---|
CommandsTask(org.nuxeo.connect.update.PackageUpdateService pus) |
Modifier and Type | Method and Description |
---|---|
void |
addCommand(org.nuxeo.connect.update.task.Command command)
Adds a command to this task.
|
protected void |
doRollback() |
protected void |
doRun(Map<String,String> params)
User parameters are not handled by default.
|
void |
doValidate(org.nuxeo.connect.update.ValidationStatus status) |
protected abstract void |
flush() |
List<org.nuxeo.connect.update.task.Command> |
getCommandLog()
Gets the command log.
|
List<org.nuxeo.connect.update.task.Command> |
getCommands()
Gets the commands to execute.
|
protected abstract File |
getCommandsFile()
Get the commands file from where to load commands for this task.
|
void |
initialize(org.nuxeo.connect.update.LocalPackage pkg,
boolean restart) |
protected void |
loadCommands()
Load the commands of this task given the user parameters.
|
String |
parametrizePaths(String content) |
void |
readLog(Reader reader) |
void |
writeLog(File file) |
createContextMap, getFile, getPackage, getRelativeFilePath, getUpdateManager, isInstallTask, isRestartRequired, loadParametrizedFile, rollback, rollbackDone, run, saveParams, setRestartRequired, taskDone, validate, validateInstall
protected final LinkedList<org.nuxeo.connect.update.task.Command> commandLog
public CommandsTask(org.nuxeo.connect.update.PackageUpdateService pus)
protected abstract File getCommandsFile() throws org.nuxeo.connect.update.PackageException
org.nuxeo.connect.update.PackageException
public void initialize(org.nuxeo.connect.update.LocalPackage pkg, boolean restart) throws org.nuxeo.connect.update.PackageException
initialize
in interface org.nuxeo.connect.update.task.Task
initialize
in class AbstractTask
org.nuxeo.connect.update.PackageException
protected void loadCommands() throws org.nuxeo.connect.update.PackageException
org.nuxeo.connect.update.PackageException
public List<org.nuxeo.connect.update.task.Command> getCommands()
public List<org.nuxeo.connect.update.task.Command> getCommandLog()
public void addCommand(org.nuxeo.connect.update.task.Command command)
protected void doRun(Map<String,String> params) throws org.nuxeo.connect.update.PackageException
doRun
in class AbstractTask
org.nuxeo.connect.update.PackageException
protected abstract void flush() throws org.nuxeo.connect.update.PackageException
org.nuxeo.connect.update.PackageException
protected void doRollback() throws org.nuxeo.connect.update.PackageException
doRollback
in class AbstractTask
org.nuxeo.connect.update.PackageException
public void doValidate(org.nuxeo.connect.update.ValidationStatus status) throws org.nuxeo.connect.update.PackageException
doValidate
in class AbstractTask
org.nuxeo.connect.update.PackageException
public void writeLog(File file) throws org.nuxeo.connect.update.PackageException
org.nuxeo.connect.update.PackageException
public String parametrizePaths(String content)
Copyright © 2018 Nuxeo. All rights reserved.