|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object info.magnolia.module.AbstractModuleVersionHandler
public abstract class AbstractModuleVersionHandler
Extend this and register your deltas in the constructor using the register method. Add your own install tasks by overriding the getExtraInstallTasks() method. In most cases, modules won't need to override any other method.
DefaultModuleVersionHandler
Nested Class Summary | |
---|---|
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. |
Field Summary | |
---|---|
protected org.slf4j.Logger |
log
|
Constructor Summary | |
---|---|
AbstractModuleVersionHandler()
|
Method Summary | |
---|---|
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 Delta |
getUpdate(InstallContext installContext)
Deprecated. since 4.2, renamed to getDefaultUpdate(InstallContext installContext) |
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. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected org.slf4j.Logger log
Constructor Detail |
---|
public AbstractModuleVersionHandler()
Method Detail |
---|
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)
@Deprecated protected Delta getUpdate(InstallContext installContext)
protected Delta getDefaultUpdate(InstallContext installContext)
protected List<Task> getDefaultUpdateTasks(Version forVersion)
protected List<Condition> getDefaultUpdateConditions(Version forVersion)
protected Delta getInstall(InstallContext installContext)
override this method if you need a different set of default install tasks.
,
override this method if you need extra tasks for install.
protected abstract List<Task> getBasicInstallTasks(InstallContext installContext)
protected List<Task> getExtraInstallTasks(InstallContext installContext)
protected List<Condition> getInstallConditions()
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)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |