|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.sling.api.resource.AbstractResourceVisitor
public abstract class AbstractResourceVisitor
The AbstractResourceVisitor
helps in traversing a
resource tree by decoupling the actual traversal code
from application code. Concrete subclasses should implement
the ResourceVisitor#visit(Resource)
method.
Constructor Summary | |
---|---|
AbstractResourceVisitor()
|
Method Summary | |
---|---|
void |
accept(Resource res)
Visit the given resource and all its descendants. |
protected void |
traverseChildren(java.util.Iterator<Resource> children)
Visit the given resources. |
protected abstract void |
visit(Resource res)
Implement this method to do actual work on the resources. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public AbstractResourceVisitor()
Method Detail |
---|
public void accept(Resource res)
res
- The resourceprotected void traverseChildren(java.util.Iterator<Resource> children)
children
- The list of resourcesprotected abstract void visit(Resource res)
res
- The resource
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |