Details
-
Bug
-
Resolution: Won't Do
-
Neutral
-
None
-
5.4.2
-
None
-
None
Description
I wanted to visit all nodes in the DAM workspace and figured I could do that like this in Groovy:
Node damRoot = SessionUtil.getNode(DamConstants.WORKSPACE, '/') NodeUtil.visit(damRoot, new NodeVisitor() { @Override void visit(Node node) throws RepositoryException { // TODO: Do my business } })
To my surprise this visitor did not visit a mgnl:resource node that I knew existed in this workspace at a path like /folder/asset/jcr:content.
The reason for this seems to be that NodeUtil.visit(Node node, NodeVisitor visitor) applies the info.magnolia.jcr.util.NodeUtil#EXCLUDE_META_DATA_FILTER predicate and this predicate makes sure that any node that has a name starting with NodeTypes.JCR_PREFIX (jcr:). However, as far as I know those jcr:content nodes are not meta data nodes (MetaData subnodes don't even exist in Magnolia 5 anymore). I feel that that jcr:content node should also have been visited by calling NodeUtil.visit.
Checklists
Acceptance criteria