|
||||||||||
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
|
class |
AbstractModuleVersionHandler.ModuleVersionUpdateTask
|
Field Summary | |
---|---|
protected org.slf4j.Logger |
log
|
Constructor Summary | |
---|---|
AbstractModuleVersionHandler()
|
Method Summary | |
---|---|
protected abstract java.util.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 java.util.List<Condition> |
getDefaultUpdateConditions(Version forVersion)
|
protected java.util.List<Task> |
getDefaultUpdateTasks(Version forVersion)
|
java.util.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 java.util.List<Task> |
getExtraInstallTasks(InstallContext installContext)
Override this method to add specific install tasks to your module. |
protected Delta |
getInstall(InstallContext installContext)
|
protected java.util.List<Condition> |
getInstallConditions()
|
Delta |
getStartupDelta(InstallContext installContext)
Returns a Delta that needs to be executed always before this module is started. |
protected java.util.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 java.util.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 java.util.List<Delta> getDeltas(InstallContext installContext, Version from)
ModuleVersionHandler
getDeltas
in interface ModuleVersionHandler
protected java.util.List<Delta> getUpdateDeltas(InstallContext installContext, Version from)
protected Delta getUpdate(InstallContext installContext)
protected Delta getDefaultUpdate(InstallContext installContext)
protected java.util.List<Task> getDefaultUpdateTasks(Version forVersion)
protected java.util.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 java.util.List<Task> getBasicInstallTasks(InstallContext installContext)
protected java.util.List<Task> getExtraInstallTasks(InstallContext installContext)
protected java.util.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 java.util.List<Task> getStartupTasks(InstallContext installContext)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |