Class TreeFilteringResourceVisitor
- java.lang.Object
-
- com.adobe.acs.commons.util.visitors.SimpleFilteringResourceVisitor
-
- com.adobe.acs.commons.util.visitors.TreeFilteringResourceVisitor
-
public class TreeFilteringResourceVisitor extends SimpleFilteringResourceVisitor
Tree visitor which allows special cases such as how to handle child nodes which will not be traversed further. In short, all nodes identified as container/folder items will be visited recursively, and any child which is not a folder will be visited via a special case method. This allows a cleaner delineation of leaf nodes vs structure nodes.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class com.adobe.acs.commons.util.visitors.SimpleFilteringResourceVisitor
SimpleFilteringResourceVisitor.TraversalMode
-
-
Field Summary
Fields Modifier and Type Field Description protected static String[]TREE_TYPES
-
Constructor Summary
Constructors Constructor Description TreeFilteringResourceVisitor()Create a standard visitor for commonly used folder structures.TreeFilteringResourceVisitor(String... treeTypes)Create a visitor for a specific set of folder structures.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanisFolder(org.apache.sling.api.resource.Resource res)-
Methods inherited from class com.adobe.acs.commons.util.visitors.SimpleFilteringResourceVisitor
accept, getDepth, setBreadthFirstMode, setDepthFirstMode, setLeafVisitor, setLeafVisitorChecked, setPropertyFilter, setPropertyFilterChecked, setPropertyVisitor, setPropertyVisitorChecked, setResourceVisitor, setResourceVisitorChecked, setTraversalFilter, setTraversalFilterChecked, toList
-
-
-
-
Field Detail
-
TREE_TYPES
protected static final String[] TREE_TYPES
-
-
Constructor Detail
-
TreeFilteringResourceVisitor
public TreeFilteringResourceVisitor()
Create a standard visitor for commonly used folder structures.
-
TreeFilteringResourceVisitor
public TreeFilteringResourceVisitor(String... treeTypes)
Create a visitor for a specific set of folder structures. This is useful for including other things such as nt:unstructured or oak folder types.- Parameters:
treeTypes- List of all node types to consider as folder-level containers.
-
-