I'd love to see a patch for this :)

I would suggest modeling the implementation on the JCR
ItemVisitor/TraversingItemVisitor classes as that is likely to be
something which at least some potential users are familiar.

Justin

On Thu, Aug 18, 2011 at 2:51 AM, Victor Saar <[email protected]> wrote:
> Hi,
>
> from time to time I have the need to walk a resource tree to do something 
> with a certain type of resource. I've written a very basic ResourceVisitor 
> abstract class where I can implement an accept() method. This effectively 
> decouples the traversal code from my application code.
>
> As I think this is a pretty common use case, I wanted to ask if it makes 
> sense to add such a helper class to Sling itself? Maybe with some added 
> functionality to stop traversing when a certain resource is found. WDYT?
>
> Ciao, Victor.

Reply via email to