Uploaded image for project: 'Sling'
  1. Sling
  2. SLING-8271

Improve AbstractResourceVisitor to allow to stop visiting child resources

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Resolved
    • Major
    • Resolution: Won't Fix
    • API 2.20.0
    • None
    • API
    • None

    Description

      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 child resources.

      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.

      Attachments

        Issue Links

          Activity

            People

              kwin Konrad Windszus
              kwin Konrad Windszus
              Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0h
                  0h
                  Logged:
                  Time Spent - 1h 10m
                  1h 10m