Class AbstractTask
java.lang.Object
org.nuxeo.connect.update.task.standalone.AbstractTask
- All Implemented Interfaces:
org.nuxeo.connect.update.task.Task
- Direct Known Subclasses:
CommandsTask
- Author:
- Bogdan Stefanescu
-
Field Summary
Modifier and TypeFieldDescriptionA map of environment key/values that can be used in XML install files as variables.static final String
static final String
static final String
Set only on JBoss - the EAR root directory pathstatic final String
static final String
The host application name.static final String
The host application versionstatic final String
static final String
static final String
static final String
static final String
protected org.nuxeo.connect.update.LocalPackage
static final String
static final String
static final String
static final String
protected boolean
protected String
protected org.nuxeo.connect.update.PackageUpdateService
protected UpdateManager
protected boolean
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptioncreateContextMap
(Map<String, String> params) protected abstract void
protected abstract void
abstract void
doValidate
(org.nuxeo.connect.update.ValidationStatus status) Get a file given its key in the environment map.org.nuxeo.connect.update.LocalPackage
getRelativeFilePath
(File file) void
initialize
(org.nuxeo.connect.update.LocalPackage pkg, boolean restart) abstract boolean
boolean
protected String
loadParametrizedFile
(File file, Map<String, String> params) void
rollback()
protected abstract void
void
protected void
saveParams
(Map<String, String> params) void
setRestartRequired
(boolean isRestartRequired) protected abstract void
taskDone()
org.nuxeo.connect.update.ValidationStatus
validate()
protected org.nuxeo.connect.update.LocalPackage
validateInstall
(org.nuxeo.connect.update.ValidationStatus status)
-
Field Details
-
PKG_ID
- See Also:
-
PKG_NAME
- See Also:
-
PKG_VERSION
- See Also:
-
PKG_ROOT
- See Also:
-
ENV_HOME
- See Also:
-
ENV_SERVER_HOME
- Since:
- 5.5
- See Also:
-
ENV_EAR
Set only on JBoss - the EAR root directory path- See Also:
-
ENV_LIB
- See Also:
-
ENV_SYSLIB
- See Also:
-
ENV_BUNDLES
- See Also:
-
ENV_CONFIG
- See Also:
-
ENV_TEMPLATES
- Since:
- 5.5
- See Also:
-
ENV_TIMESTAMP
- See Also:
-
ENV_HOSTAPP_NAME
The host application name. -
ENV_HOSTAPP_VERSION
The host application version -
restart
protected boolean restart -
pkg
protected org.nuxeo.connect.update.LocalPackage pkg -
serverPathPrefix
-
updateMgr
-
updateMgrLoaded
protected boolean updateMgrLoaded -
service
protected org.nuxeo.connect.update.PackageUpdateService service -
env
A map of environment key/values that can be used in XML install files as variables.
-
-
Constructor Details
-
AbstractTask
public AbstractTask(org.nuxeo.connect.update.PackageUpdateService pus)
-
-
Method Details
-
isInstallTask
public abstract boolean isInstallTask() -
initialize
public void initialize(org.nuxeo.connect.update.LocalPackage pkg, boolean restart) throws org.nuxeo.connect.update.PackageException - Specified by:
initialize
in interfaceorg.nuxeo.connect.update.task.Task
- Throws:
org.nuxeo.connect.update.PackageException
-
getFile
Get a file given its key in the environment map. If no key exists then null is returned. -
isRestartRequired
public boolean isRestartRequired()- Specified by:
isRestartRequired
in interfaceorg.nuxeo.connect.update.task.Task
-
getPackage
public org.nuxeo.connect.update.LocalPackage getPackage()- Specified by:
getPackage
in interfaceorg.nuxeo.connect.update.task.Task
-
createContextMap
-
loadParametrizedFile
- Throws:
IOException
-
saveParams
protected void saveParams(Map<String, String> params) throws org.nuxeo.connect.update.PackageException- Throws:
org.nuxeo.connect.update.PackageException
-
run
- Specified by:
run
in interfaceorg.nuxeo.connect.update.task.Task
- Throws:
org.nuxeo.connect.update.PackageException
-
getUpdateManager
- Throws:
org.nuxeo.connect.update.PackageException
-
rollbackDone
protected abstract void rollbackDone() throws org.nuxeo.connect.update.PackageException- Throws:
org.nuxeo.connect.update.PackageException
-
taskDone
protected abstract void taskDone() throws org.nuxeo.connect.update.PackageException- Throws:
org.nuxeo.connect.update.PackageException
-
rollback
public void rollback() throws org.nuxeo.connect.update.PackageException- Specified by:
rollback
in interfaceorg.nuxeo.connect.update.task.Task
- Throws:
org.nuxeo.connect.update.PackageException
-
setRestartRequired
public void setRestartRequired(boolean isRestartRequired) - Specified by:
setRestartRequired
in interfaceorg.nuxeo.connect.update.task.Task
-
doRun
protected abstract void doRun(Map<String, String> params) throws org.nuxeo.connect.update.PackageException- Throws:
org.nuxeo.connect.update.PackageException
-
doRollback
protected abstract void doRollback() throws org.nuxeo.connect.update.PackageException- Throws:
org.nuxeo.connect.update.PackageException
-
validate
public org.nuxeo.connect.update.ValidationStatus validate() throws org.nuxeo.connect.update.PackageException- Specified by:
validate
in interfaceorg.nuxeo.connect.update.task.Task
- Throws:
org.nuxeo.connect.update.PackageException
-
doValidate
public abstract void doValidate(org.nuxeo.connect.update.ValidationStatus status) throws org.nuxeo.connect.update.PackageException - Throws:
org.nuxeo.connect.update.PackageException
-
validateInstall
protected org.nuxeo.connect.update.LocalPackage validateInstall(org.nuxeo.connect.update.ValidationStatus status) throws org.nuxeo.connect.update.PackageException - Throws:
org.nuxeo.connect.update.PackageException
-
getRelativeFilePath
- Specified by:
getRelativeFilePath
in interfaceorg.nuxeo.connect.update.task.Task
-