info.magnolia.module.delta
Class BootstrapResourcesTask
java.lang.Object
info.magnolia.module.delta.AbstractTask
info.magnolia.module.delta.BootstrapResourcesTask
- All Implemented Interfaces:
- Task
- Direct Known Subclasses:
- BootstrapSingleModuleResource, BootstrapSingleResource, ModuleBootstrapTask
public abstract class BootstrapResourcesTask
- extends AbstractTask
Base class for tasks which bootstrap resources.
Method Summary |
protected boolean |
acceptResource(InstallContext installContext,
String resourceName)
Override this method to filter resources to bootstrap. |
void |
execute(InstallContext installContext)
A good-citizen task should execute itself responsibly: it should know
what to do in case of problems: for instance, fixable or irrelevant
issues should usually just be logged used the InstallContext methods,
when the user can fix them later on. |
protected String[] |
getResourcesToBootstrap(InstallContext installContext)
Override this method to bootstrap specific resource files. |
BootstrapResourcesTask
public BootstrapResourcesTask()
BootstrapResourcesTask
public BootstrapResourcesTask(int importUUIDBehavior)
BootstrapResourcesTask
public BootstrapResourcesTask(String name,
String description)
BootstrapResourcesTask
public BootstrapResourcesTask(String name,
String description,
int importUUIDBehavior)
execute
public void execute(InstallContext installContext)
throws TaskExecutionException
- Description copied from interface:
Task
- A good-citizen task should execute itself responsibly: it should know
what to do in case of problems: for instance, fixable or irrelevant
issues should usually just be logged used the InstallContext methods,
when the user can fix them later on. The task could also potentially
do backups of nodes it needs to modify extensively, so the user could
refer to the backups in case of problem. In the event of an unrecoverable
issue, the Task could also throw a TaskExecutionException, knowing that
will cancel the whole module's installation, update and startup. If
a TaskExecutionException must be thrown, keep in mind that the exception
message will still be shown to the end user, so try to keep them human
readable.
- Throws:
TaskExecutionException
getResourcesToBootstrap
protected String[] getResourcesToBootstrap(InstallContext installContext)
- Override this method to bootstrap specific resource files.
acceptResource
protected boolean acceptResource(InstallContext installContext,
String resourceName)
- Override this method to filter resources to bootstrap.
Copyright © 2003-2014 Magnolia International Ltd.. All Rights Reserved.