info.magnolia.setup.for5_0
Class CheckOrCreateLastActivatedPropertyTask

java.lang.Object
  extended by info.magnolia.module.delta.AbstractTask
      extended by info.magnolia.module.delta.AbstractRepositoryTask
          extended by info.magnolia.setup.for5_0.CheckOrCreateLastActivatedPropertyTask
All Implemented Interfaces:
Task

public class CheckOrCreateLastActivatedPropertyTask
extends AbstractRepositoryTask

This task checks whether the node specified by workspace and path constructor parameters has the mgnl:lastActivated property set, and if not, sets it to the current date &time (by calling NodeTypes.Activatable#update(Node, String, boolean).


Constructor Summary
CheckOrCreateLastActivatedPropertyTask(String taskName, String taskDescription, String workspace, String path)
           
 
Method Summary
protected  void doExecute(InstallContext installContext)
           
 
Methods inherited from class info.magnolia.module.delta.AbstractRepositoryTask
execute
 
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
 

Constructor Detail

CheckOrCreateLastActivatedPropertyTask

public CheckOrCreateLastActivatedPropertyTask(String taskName,
                                              String taskDescription,
                                              String workspace,
                                              String path)
Parameters:
path - the workspace of the node mgnl:lastActivated property has to be set
workspace - the path of the node the mgnl:lastActivated property has to be set
Method Detail

doExecute

protected void doExecute(InstallContext installContext)
                  throws javax.jcr.RepositoryException,
                         TaskExecutionException
Specified by:
doExecute in class AbstractRepositoryTask
Throws:
javax.jcr.RepositoryException
TaskExecutionException


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