public class ChildrenCollectorFilter
extends TraversingItemVisitor.Default
ChildrenCollectorFilter is a utility class
which can be used to 'collect' child items of a
node whose names match a certain pattern. It implements the
ItemVisitor interface.| Constructor and Description |
|---|
ChildrenCollectorFilter(java.lang.String[] nameGlobs,
java.util.Collection<Item> children,
boolean collectNodes,
boolean collectProperties,
int maxLevel)
Constructs a
ChildrenCollectorFilter |
ChildrenCollectorFilter(java.lang.String namePattern,
java.util.Collection<Item> children,
boolean collectNodes,
boolean collectProperties,
int maxLevel)
Constructs a
ChildrenCollectorFilter |
| Modifier and Type | Method and Description |
|---|---|
static NodeIterator |
collectChildNodes(Node node,
java.lang.String namePattern) |
static NodeIterator |
collectChildNodes(Node node,
java.lang.String[] nameGlobs) |
static PropertyIterator |
collectProperties(Node node,
java.lang.String namePattern) |
static PropertyIterator |
collectProperties(Node node,
java.lang.String[] nameGlobs) |
static boolean |
matches(java.lang.String name,
java.lang.String pattern)
|
static boolean |
matches(java.lang.String name,
java.lang.String[] nameGlobs)
|
public ChildrenCollectorFilter(java.lang.String namePattern,
java.util.Collection<Item> children,
boolean collectNodes,
boolean collectProperties,
int maxLevel)
ChildrenCollectorFilternamePattern - the pattern which should be applied to the names
of the childrenchildren - where the matching children should be addedcollectNodes - true, if child nodes should be collected; otherwise falsecollectProperties - true, if child properties should be collected; otherwise falsemaxLevel - number of hierarchy levels to traverse
(e.g. 1 for direct children only, 2 for children and their children, and so on)public ChildrenCollectorFilter(java.lang.String[] nameGlobs,
java.util.Collection<Item> children,
boolean collectNodes,
boolean collectProperties,
int maxLevel)
ChildrenCollectorFilternameGlobs - an array of globbing strings which should be
applied to the names of the childrenchildren - where the matching children should be addedcollectNodes - true, if child nodes should be collected; otherwise falsecollectProperties - true, if child properties should be collected; otherwise falsemaxLevel - number of hierarchy levels to traverse
(e.g. 1 for direct children only, 2 for children and their children, and so on)public static NodeIterator collectChildNodes(Node node,
java.lang.String namePattern)
throws RepositoryException
RepositoryExceptionpublic static NodeIterator collectChildNodes(Node node,
java.lang.String[] nameGlobs)
throws RepositoryException
RepositoryExceptionpublic static PropertyIterator collectProperties(Node node,
java.lang.String namePattern)
throws RepositoryException
RepositoryExceptionpublic static PropertyIterator collectProperties(Node node,
java.lang.String[] nameGlobs)
throws RepositoryException
RepositoryExceptionpublic static boolean matches(java.lang.String name,
java.lang.String pattern)
javax.jcr.Node#getNodes(String)public static boolean matches(java.lang.String name,
java.lang.String[] nameGlobs)
javax.jcr.Node#getNodes(String)"Copyright © 2010 - 2018 Adobe Systems Incorporated. All Rights Reserved"