info.magnolia.module.delta
Class NodeCheckDelegateTask

java.lang.Object
  extended by info.magnolia.module.delta.AbstractTask
      extended by info.magnolia.module.delta.ConditionalDelegateTask
          extended by info.magnolia.module.delta.NodeCheckDelegateTask
All Implemented Interfaces:
Task
Direct Known Subclasses:
PropertyExistsDelegateTask, PropertyValueDelegateTask

public abstract class NodeCheckDelegateTask
extends ConditionalDelegateTask

A task that delegates to another if a checkNode is true, or to an optional other if it is false.

Version:
$Revision: $ ($Author: $)
Author:
gjoseph

Field Summary
protected  String nodePath
           
protected  String propertyName
           
protected  String workspaceName
           
 
Fields inherited from class info.magnolia.module.delta.AbstractTask
log
 
Constructor Summary
NodeCheckDelegateTask(String taskName, String taskDescription, String workspaceName, String nodePath, String propertyName, Task ifTrue, Task ifFalse)
           
 
Method Summary
protected abstract  boolean checkNode(Content node, InstallContext ctx)
           
protected  boolean condition(InstallContext ctx)
           
 
Methods inherited from class info.magnolia.module.delta.ConditionalDelegateTask
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
 

Field Detail

workspaceName

protected final String workspaceName

nodePath

protected final String nodePath

propertyName

protected final String propertyName
Constructor Detail

NodeCheckDelegateTask

public NodeCheckDelegateTask(String taskName,
                             String taskDescription,
                             String workspaceName,
                             String nodePath,
                             String propertyName,
                             Task ifTrue,
                             Task ifFalse)
Method Detail

condition

protected boolean condition(InstallContext ctx)
                     throws TaskExecutionException
Specified by:
condition in class ConditionalDelegateTask
Throws:
TaskExecutionException

checkNode

protected abstract boolean checkNode(Content node,
                                     InstallContext ctx)
                              throws javax.jcr.RepositoryException,
                                     TaskExecutionException
Throws:
javax.jcr.RepositoryException
TaskExecutionException


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