You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@sling.apache.org by "Konrad Windszus (JIRA)" <ji...@apache.org> on 2019/02/11 15:15:00 UTC
[jira] [Created] (SLING-8271) Improve AbstractResourceVisitor to
allow breaking to descend
Konrad Windszus created SLING-8271:
--------------------------------------
Summary: Improve AbstractResourceVisitor to allow breaking to descend
Key: SLING-8271
URL: https://issues.apache.org/jira/browse/SLING-8271
Project: Sling
Issue Type: Improvement
Components: API
Affects Versions: API 2.20.0
Reporter: Konrad Windszus
Fix For: API 2.20.2
Currently the AbstractResourceVisitor (https://github.com/apache/sling-org-apache-sling-api/blob/master/src/main/java/org/apache/sling/api/resource/AbstractResourceVisitor.java) completely decouples the {{visit}} method from the actual resource traversal. That means it is currently rather hard to programmatically add a break condition which should lead to no further descending into subresources.
I propose to extend {{AbstractResourceVisitor}} by an additional visit method which is supposed to return a boolean value. Only if {{true}} is returned it will further descend into the children of the current resource. The default implementation should just return {{true}} to make this change backwards compatible.
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)