Package com.day.cq.commons.jcr
Class JcrRecursiveRemove
- java.lang.Object
-
- com.day.cq.commons.jcr.JcrRecursiveRemove
-
public class JcrRecursiveRemove extends java.lang.Object
Recursive Node removal utility
-
-
Field Summary
Fields Modifier and Type Field Description static int
DEFAULT_SAVE_EVERY_HOW_MANY
-
Constructor Summary
Constructors Constructor Description JcrRecursiveRemove()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description int
removeRecursive(Node n, int saveEveryHowManyNodes)
Remove Node n and its children recursively, saving every N nodes as specified (to avoid growing the transient space too much)
-
-
-
Field Detail
-
DEFAULT_SAVE_EVERY_HOW_MANY
public static final int DEFAULT_SAVE_EVERY_HOW_MANY
- See Also:
- Constant Field Values
-
-
Method Detail
-
removeRecursive
public int removeRecursive(Node n, int saveEveryHowManyNodes) throws RepositoryException
Remove Node n and its children recursively, saving every N nodes as specified (to avoid growing the transient space too much)- Parameters:
n
- node to deletesaveEveryHowManyNodes
- if < 1, DEFAULT_SAVE_EVERY_HOW_MANY is used- Returns:
- number of nodes deleted
- Throws:
RepositoryException
- if some error occurs
-
-