Class TreeFilteringResourceVisitor
java.lang.Object
com.adobe.acs.commons.util.visitors.SimpleFilteringResourceVisitor
com.adobe.acs.commons.util.visitors.TreeFilteringResourceVisitor
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 -
Constructor Summary
ConstructorsConstructorDescriptionCreate a standard visitor for commonly used folder structures.TreeFilteringResourceVisitor(String... treeTypes) Create a visitor for a specific set of folder structures. -
Method Summary
Modifier and TypeMethodDescriptionfinal 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 Details
-
TREE_TYPES
-
-
Constructor Details
-
TreeFilteringResourceVisitor
public TreeFilteringResourceVisitor()Create a standard visitor for commonly used folder structures. -
TreeFilteringResourceVisitor
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.
-
-
Method Details
-
isFolder
public final boolean isFolder(org.apache.sling.api.resource.Resource res)
-