Package com.day.cq.commons.jcr
Class JcrRecursiveRemove
java.lang.Object
com.day.cq.commons.jcr.JcrRecursiveRemove
Recursive Node removal utility
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionint
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 Details
-
DEFAULT_SAVE_EVERY_HOW_MANY
public static final int DEFAULT_SAVE_EVERY_HOW_MANY- See Also:
-
-
Constructor Details
-
JcrRecursiveRemove
public JcrRecursiveRemove()
-
-
Method Details
-
removeRecursive
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
-