it.openutils.mgnltasks
Class ModuleConfigBootstrapTask

java.lang.Object
  extended by info.magnolia.module.delta.AbstractTask
      extended by info.magnolia.module.delta.BootstrapResourcesTask
          extended by it.openutils.mgnltasks.ModuleConfigBootstrapTask
All Implemented Interfaces:
info.magnolia.module.delta.Task
Direct Known Subclasses:
DiffModuleConfigBootstrapTask

public class ModuleConfigBootstrapTask
extends info.magnolia.module.delta.BootstrapResourcesTask

A task to bootstrap a module. Can be used to fully re-bootstrap a custom module after an update (useful to reload templates, dialogs, etc). This task will always ignore bootstrap files for the website repository. Please note that during an update this task will always delete the following nodes inside the affected module configuration: "dialogs", "templates", "paragraphs", "virtualURIMapping"

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

Field Summary
protected  Set<String> includedRepositories
           
protected  String modulename
           
protected  String[] resourcesToBootstrap
           
 
Constructor Summary
ModuleConfigBootstrapTask(String modulename)
           
ModuleConfigBootstrapTask(String modulename, List<String> excludeRepositories)
          Deprecated. 
ModuleConfigBootstrapTask(String modulename, Set<String> includedRepositories)
           
 
Method Summary
protected  boolean acceptResource(info.magnolia.module.InstallContext ctx, String name)
          
protected  void deleteNode(info.magnolia.module.InstallContext installContext, String nodePath)
          Deletes a node.
 void execute(info.magnolia.module.InstallContext installContext)
          
protected  boolean skipResource(String name)
          Skips a resource.
 
Methods inherited from class info.magnolia.module.delta.BootstrapResourcesTask
getResourcesToBootstrap
 
Methods inherited from class info.magnolia.module.delta.AbstractTask
getDescription, getName, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

modulename

protected String modulename

includedRepositories

protected Set<String> includedRepositories

resourcesToBootstrap

protected String[] resourcesToBootstrap
Constructor Detail

ModuleConfigBootstrapTask

public ModuleConfigBootstrapTask(String modulename)

ModuleConfigBootstrapTask

@Deprecated
public ModuleConfigBootstrapTask(String modulename,
                                            List<String> excludeRepositories)
Deprecated. 


ModuleConfigBootstrapTask

public ModuleConfigBootstrapTask(String modulename,
                                 Set<String> includedRepositories)
Method Detail

acceptResource

protected boolean acceptResource(info.magnolia.module.InstallContext ctx,
                                 String name)

Overrides:
acceptResource in class info.magnolia.module.delta.BootstrapResourcesTask

execute

public void execute(info.magnolia.module.InstallContext installContext)
             throws info.magnolia.module.delta.TaskExecutionException

Specified by:
execute in interface info.magnolia.module.delta.Task
Overrides:
execute in class info.magnolia.module.delta.BootstrapResourcesTask
Throws:
info.magnolia.module.delta.TaskExecutionException

skipResource

protected boolean skipResource(String name)
Skips a resource. Subclasses may override this method to avoid the import of some resources.

Parameters:
name -
Returns:

deleteNode

protected void deleteNode(info.magnolia.module.InstallContext installContext,
                          String nodePath)
                   throws javax.jcr.RepositoryException
Deletes a node.

Parameters:
installContext - install context
nodePath - node path
Throws:
javax.jcr.RepositoryException - for any exception wile operating on the repository


Copyright © 2008-2010 Openmind. All Rights Reserved.