info.magnolia.module
Interface ModuleVersionHandler

All Known Implementing Classes:
AbstractModuleVersionHandler, AdminModuleVersionHandler, CacheModuleVersionHandler, CoreModuleVersionHandler, DefaultModuleVersionHandler, ExchangeSimpleModuleVersionHandler, FCKEditorModuleVersionHandler, MagnoliaStoreModuleVersionHandler, MailModuleVersionHandler, RenderingModuleVersionHandler, SamplesVersionHandler, SimpleContentVersionHandler, TemplatingModuleVersionHandler, WebappVersionHandler, WorkflowModuleVersionHandler

public interface ModuleVersionHandler

This class provides Delta's to be applied to install/update/uninstall modules. A module that needs to handle its own install/updates should provide an implementation of this interface.

Version:
$Revision: $ ($Author: $)
Author:
gjoseph
See Also:
for a convenient super class.

Method Summary
 Version getCurrentlyInstalled(InstallContext ctx)
          Gets the currently installed version number of this module.
 List<Delta> getDeltas(InstallContext installContext, Version from)
          Returns the deltas to be applied to update from the given Version from to the current one.
 Delta getStartupDelta(InstallContext installContext)
          Deprecated. It seems irrelevant to have startup tasks in a VersionHandler. These should probably be moved to ModuleLifecycle.
 

Method Detail

getCurrentlyInstalled

Version getCurrentlyInstalled(InstallContext ctx)
Gets the currently installed version number of this module.


getDeltas

List<Delta> getDeltas(InstallContext installContext,
                      Version from)
Returns the deltas to be applied to update from the given Version from to the current one. If from is null, it means the module is being installed, and we should thus return the necessary deltas to install it. It is also responsible for updating the current version number of the module, wherever it is stored.


getStartupDelta

Delta getStartupDelta(InstallContext installContext)
Deprecated. It seems irrelevant to have startup tasks in a VersionHandler. These should probably be moved to ModuleLifecycle.

Returns a Delta that needs to be executed always before this module is started. These tasks will be silently applied at startup.

Parameters:
installContext - InstallContext


Copyright © 2003-2012 Magnolia International Ltd.. All Rights Reserved.