Package javax.jcr
Interface ItemVisitor
-
- All Known Implementing Classes:
ChildrenCollector,ChildrenCollectorFilter,FilteringItemVisitor,TraversingItemVisitor,TraversingItemVisitor.Default
public interface ItemVisitorThis interface defines two signatures of thevisitmethod; one taking aNode, the other aProperty. When an object implementing this interface is passed tothe appropriateItem.accept(ItemVisitor visitor)visitmethod is automatically called, depending on whether theItemin question is aNodeor aProperty. Different implementations of this interface can be written for different purposes. It is, for example, possible for themethod to callvisit(Node node)accepton the children of the passed node and thus recurse through the tree performing some operation on eachItem.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description voidvisit(Node node)This method is called when theItemVisitoris passed to theacceptmethod of aNode.voidvisit(Property property)This method is called when theItemVisitoris passed to theacceptmethod of aProperty.
-
-
-
Method Detail
-
visit
void visit(Property property) throws RepositoryException
This method is called when theItemVisitoris passed to theacceptmethod of aProperty. If this method throws an exception the visiting process is aborted.- Parameters:
property- ThePropertythat is accepting this visitor.- Throws:
RepositoryException- if an error occurs
-
visit
void visit(Node node) throws RepositoryException
This method is called when theItemVisitoris passed to theacceptmethod of aNode. If this method throws an exception the visiting process is aborted.- Parameters:
node- TheNode- Throws:
RepositoryException- if an error occurs
-
-