info.magnolia.module.cache
Class RegisterWorkspaceForCacheFlushingTask

java.lang.Object
  extended by info.magnolia.module.delta.AbstractTask
      extended by info.magnolia.module.cache.RegisterWorkspaceForCacheFlushingTask
All Implemented Interfaces:
Task

public class RegisterWorkspaceForCacheFlushingTask
extends AbstractTask
implements Task

Adds repository to the list of repositories observed for cache flushing upon activation. Tasks checks for existence of the repository in the list before adding it so it is safe to execute multiple times.

Author:
had

Field Summary
 
Fields inherited from class info.magnolia.module.delta.AbstractTask
log
 
Constructor Summary
RegisterWorkspaceForCacheFlushingTask(String workspaceName)
           
 
Method Summary
 void execute(InstallContext ctx)
          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.
 
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
 
Methods inherited from interface info.magnolia.module.delta.Task
getDescription, getName
 

Constructor Detail

RegisterWorkspaceForCacheFlushingTask

public RegisterWorkspaceForCacheFlushingTask(String workspaceName)
Method Detail

execute

public void execute(InstallContext ctx)
             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.

Specified by:
execute in interface Task
Throws:
TaskExecutionException


Copyright © 2003–2014 Magnolia International Ltd.. All rights reserved.