Class AbstractResourceVisitor

  • Direct Known Subclasses:
    ActivityResourceVisitor

    public abstract class AbstractResourceVisitor
    extends java.lang.Object
    This visitor will traverse the given resource and all its children in a depth-first approach and call the visit(Resource) method for each visited resource. It decouples the actual traversal code from application code. Concrete subclasses must implement the visit(Resource) method. There is no possibility to stop traversal in this visitor. If you want to skip certain parts of the subtree or stop traversal at a certain point rather use ResourceStream or ResourceFilterStream.
    Since:
    2.2 (Sling API Bundle 2.2.0)
    See Also:
    Depth-First-Search
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void accept​(Resource res)
      Visit the given resource and all its descendants.
      • Methods inherited from class java.lang.Object

        equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • AbstractResourceVisitor

        public AbstractResourceVisitor()
    • Method Detail

      • accept

        public void accept​(Resource res)
        Visit the given resource and all its descendants.
        Parameters:
        res - The resource