Went with adding the Stream<Resource>  to the Resource interface directly as a 
default method. This is more intuitive and results in less code.

There has been a concern expressed about the naming methodology as to whether 
Resource.stream() should by default be the children or the entire subtree.

- Jason

On Thu, May 31, 2018, at 1:43 PM, Jason E Bailey wrote:
> Per some feedback from Stefan. I added the streaming capability directly 
> to the Resource interface as default methods. Which is just really, 
> really, cool. 
> 
> The current pull request has both the separate class and the Resource 
> modifications. Once I've gathered feedback I'll remove the option that 
> we won't be going with.
> 
> - Jason
> 
> On Thu, May 31, 2018, at 10:39 AM, Jason E Bailey wrote:
> > https://github.com/apache/sling-org-apache-sling-api/pull/4
> > 
> > I've created a pull request to add a new class to the Sling API bundle 
> > that would allow you to create a Stream<Resource> object which traverses 
> > a resource tree.
> > 
> > Additionally, the ResourceStream class has convenience methods to 
> > specify a predicate that identifies valid resources, a limit to the 
> > number of valid items that are returned and a range method. There is 
> > also a core feature of branch selection that allows you to customize the 
> > traversal so that it you can limit the branches that the traversal 
> > proceeds down.
> > 
> > If you have concerns or questions, now's the time to raise it.
> > 
> > - Jason

Reply via email to