public abstract class AbstractModuleVersionHandler extends Object implements ModuleVersionHandler
DefaultModuleVersionHandler
Modifier and Type | Class and Description |
---|---|
class |
AbstractModuleVersionHandler.ModuleVersionToLatestTask
The task which modifies the "version" property to the version being installed.
|
class |
AbstractModuleVersionHandler.ModuleVersionUpdateTask
The task which modifies the "version" property to the version we're updating to.
|
Modifier and Type | Field and Description |
---|---|
protected org.slf4j.Logger |
log |
Constructor and Description |
---|
AbstractModuleVersionHandler() |
Modifier and Type | Method and Description |
---|---|
protected abstract List<Task> |
getBasicInstallTasks(InstallContext installContext) |
Version |
getCurrentlyInstalled(InstallContext ctx)
Gets the currently installed version number of this module.
|
protected Delta |
getDefaultUpdate(InstallContext installContext)
The minimal delta to be applied for each update, even if no delta was specifically registered
for the version being installed.
|
protected List<Condition> |
getDefaultUpdateConditions(Version forVersion) |
protected List<Task> |
getDefaultUpdateTasks(Version forVersion) |
List<Delta> |
getDeltas(InstallContext installContext,
Version from)
Returns the deltas to be applied to update from the given Version from
to the current one.
|
protected List<Task> |
getExtraInstallTasks(InstallContext installContext)
Override this method to add specific install tasks to your module.
|
protected Delta |
getInstall(InstallContext installContext) |
protected List<Condition> |
getInstallConditions() |
Delta |
getStartupDelta(InstallContext installContext)
Returns a
Delta that needs to be executed always before this module is started. |
protected List<Task> |
getStartupTasks(InstallContext installContext)
Override this method to add specific startup tasks to your module.
|
protected List<Delta> |
getUpdateDeltas(InstallContext installContext,
Version from) |
protected void |
register(Delta delta)
Registers the delta needed to update to version v from the previous one.
|
protected void register(Delta delta)
public Version getCurrentlyInstalled(InstallContext ctx)
ModuleVersionHandler
getCurrentlyInstalled
in interface ModuleVersionHandler
public List<Delta> getDeltas(InstallContext installContext, Version from)
ModuleVersionHandler
getDeltas
in interface ModuleVersionHandler
protected List<Delta> getUpdateDeltas(InstallContext installContext, Version from)
protected Delta getDefaultUpdate(InstallContext installContext)
protected Delta getInstall(InstallContext installContext)
protected abstract List<Task> getBasicInstallTasks(InstallContext installContext)
protected List<Task> getExtraInstallTasks(InstallContext installContext)
public Delta getStartupDelta(InstallContext installContext)
ModuleVersionHandler
Delta
that needs to be executed always before this module is started. These tasks will
be silently applied at startup.getStartupDelta
in interface ModuleVersionHandler
installContext
- InstallContextprotected List<Task> getStartupTasks(InstallContext installContext)
Copyright © 2003–2014 Magnolia International Ltd.. All rights reserved.