info.magnolia.nodebuilder
Class RecursiveOp

java.lang.Object
  extended by info.magnolia.nodebuilder.RecursiveOp
All Implemented Interfaces:
NodeOperation

public class RecursiveOp
extends java.lang.Object

Visits the hierarchy recursively and executes the operations on all nodes matching the filter. The recursion does not stop if a node does not match! The class has some static methods to build recursive operations easily.

Version:
$Id: RecursiveOp.java 32667 2010-03-13 00:37:06Z gjoseph $
Author:
pbracher

Constructor Summary
RecursiveOp(Content.ContentFilter filter, NodeOperation[] childrenOps)
          Visits the hierarchy recursively and executes the operations on all nodes matching the filter.
 
Method Summary
 void exec(Content context, ErrorHandler errorHandler)
           
static NodeOperation recursive(Content.ContentFilter filter, NodeOperation... childrenOps)
           
static NodeOperation recursive(ItemType type, NodeOperation... childrenOps)
          Visits the hierarchy recursively and executes the operations on all nodes matching a certain type.
static NodeOperation recursive(NodeOperation... childrenOps)
          Visits the hierarchy recursively and executes the operations on all nodes excluding meta data and jcr base nodes.
static NodeOperation recursive(java.lang.String type, NodeOperation... childrenOps)
          Visits the hierarchy recursively and executes the operations on all nodes matching a certain type.
 NodeOperation then(NodeOperation... childrenOps)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

RecursiveOp

public RecursiveOp(Content.ContentFilter filter,
                   NodeOperation[] childrenOps)
Visits the hierarchy recursively and executes the operations on all nodes matching the filter. The recursion does not stop if a node does not match!

Method Detail

recursive

public static NodeOperation recursive(NodeOperation... childrenOps)
Visits the hierarchy recursively and executes the operations on all nodes excluding meta data and jcr base nodes. The recursion does not stop if a node does not match!


recursive

public static NodeOperation recursive(java.lang.String type,
                                      NodeOperation... childrenOps)
Visits the hierarchy recursively and executes the operations on all nodes matching a certain type. The recursion does not stop if a node does not match!


recursive

public static NodeOperation recursive(ItemType type,
                                      NodeOperation... childrenOps)
Visits the hierarchy recursively and executes the operations on all nodes matching a certain type. The recursion does not stop if a node does not match!


recursive

public static NodeOperation recursive(Content.ContentFilter filter,
                                      NodeOperation... childrenOps)

exec

public void exec(Content context,
                 ErrorHandler errorHandler)
Specified by:
exec in interface NodeOperation

then

public NodeOperation then(NodeOperation... childrenOps)
Specified by:
then in interface NodeOperation


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