boolean iterateOverChildren()

in src/main/java/org/apache/sling/pipes/internal/FilterPipe.java [90:106]


    boolean iterateOverChildren(Resource currentResource, Resource filterResource) throws RepositoryException {
        Node filterNode = filterResource.adaptTo(Node.class);
        Node currentNode = currentResource.adaptTo(Node.class);
        if (filterNode != null) {
            boolean returnValue = true;
            for (NodeIterator children = filterNode.getNodes(); returnValue && children.hasNext(); ) {
                String childName = children.nextNode().getName();
                if (currentNode != null && !currentNode.hasNode(childName)) {
                    return false;
                } else {
                    returnValue &= filterPasses(currentResource.getChild(childName), filterResource.getChild(childName));
                }
            }
            return returnValue;
        }
        return false;
    }