it.openutils.mgnltasks
Class SimpleModuleVersionHandler

java.lang.Object
  extended by info.magnolia.module.AbstractModuleVersionHandler
      extended by info.magnolia.module.DefaultModuleVersionHandler
          extended by it.openutils.mgnltasks.SimpleModuleVersionHandler
All Implemented Interfaces:
info.magnolia.module.ModuleVersionHandler
Direct Known Subclasses:
DiffSimpleModuleVersionHandler

public class SimpleModuleVersionHandler
extends info.magnolia.module.DefaultModuleVersionHandler

A base module version handler that re-bootstrap its configuration each time the version number changes. Can be used as is or subclasses (usually overriding getStartupTasks() for configuration tweaks).

All the bootstrap files placed in "/mgnl-bootstrap/(modulename)" will be reloaded every time the version number changes, while xml files placed in "/mgnl-bootstrap/(modulename)-nooverwrite" will be bootstrapped only if the node is not already existing in the repository.

Version:
$Id: SimpleModuleVersionHandler.java 2461 2010-05-17 10:25:48Z diego_schivo $
Author:
fgiust

Nested Class Summary
 
Nested classes/interfaces inherited from class info.magnolia.module.AbstractModuleVersionHandler
info.magnolia.module.AbstractModuleVersionHandler.ModuleVersionToLatestTask, info.magnolia.module.AbstractModuleVersionHandler.ModuleVersionUpdateTask
 
Field Summary
protected  Set<String> includedRepositoriesInBootstrap
          Repositories to include in bootstrap.
protected  org.slf4j.Logger log
          Logger.
 
Constructor Summary
SimpleModuleVersionHandler()
           
 
Method Summary
 void addExcludeRepositoryFromBootstrap(String repository)
          Deprecated. 
 void addIncludedRepositoryInmBootstrap(String repository)
          Add a repository to bootstrap *inclusion* list
protected  void addModuleConfigBootstrapTasks(String modulename, info.magnolia.module.delta.Delta delta)
          Deletes any existing module configuration node (templates, paragraphs, virtualURI and dialogs) before reimporting all the content of the bootstrap folder, to avoid any leftover or problems with renamed items.
 List<info.magnolia.module.delta.Delta> getDeltas(info.magnolia.module.InstallContext ctx, info.magnolia.module.model.Version from)
          
 
Methods inherited from class info.magnolia.module.DefaultModuleVersionHandler
getBasicInstallTasks
 
Methods inherited from class info.magnolia.module.AbstractModuleVersionHandler
getCurrentlyInstalled, getDefaultUpdate, getDefaultUpdateConditions, getDefaultUpdateTasks, getExtraInstallTasks, getInstall, getInstallConditions, getStartupDelta, getStartupTasks, getUpdate, getUpdateDeltas, register
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

log

protected org.slf4j.Logger log
Logger.


includedRepositoriesInBootstrap

protected Set<String> includedRepositoriesInBootstrap
Repositories to include in bootstrap.

Constructor Detail

SimpleModuleVersionHandler

public SimpleModuleVersionHandler()
Method Detail

addExcludeRepositoryFromBootstrap

@Deprecated
public void addExcludeRepositoryFromBootstrap(String repository)
Deprecated. 

Add a repository to bootstrap exclusion list

Parameters:
repository - repository to exclude from bootstrap

addIncludedRepositoryInmBootstrap

public void addIncludedRepositoryInmBootstrap(String repository)
Add a repository to bootstrap *inclusion* list

Parameters:
repository - repository to include in bootstrap

getDeltas

public List<info.magnolia.module.delta.Delta> getDeltas(info.magnolia.module.InstallContext ctx,
                                                        info.magnolia.module.model.Version from)

Specified by:
getDeltas in interface info.magnolia.module.ModuleVersionHandler
Overrides:
getDeltas in class info.magnolia.module.AbstractModuleVersionHandler

addModuleConfigBootstrapTasks

protected void addModuleConfigBootstrapTasks(String modulename,
                                             info.magnolia.module.delta.Delta delta)
Deletes any existing module configuration node (templates, paragraphs, virtualURI and dialogs) before reimporting all the content of the bootstrap folder, to avoid any leftover or problems with renamed items. Subclasses may override this method to implement a more sophisticated logic for bootstrapping module configuration.

Parameters:
modulename -
delta -


Copyright © 2008-2010 Openmind. All Rights Reserved.