Package javax.jcr
Interface ItemVisitor
-
- All Known Implementing Classes:
ChildrenCollector
,ChildrenCollectorFilter
,FilteringItemVisitor
,TraversingItemVisitor
,TraversingItemVisitor.Default
public interface ItemVisitor
This interface defines two signatures of thevisit
method; one taking aNode
, the other aProperty
. When an object implementing this interface is passed to
the appropriateItem.accept(ItemVisitor visitor)
visit
method is automatically called, depending on whether theItem
in question is aNode
or aProperty
. Different implementations of this interface can be written for different purposes. It is, for example, possible for the
method to callvisit(Node node)
accept
on 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 void
visit(Node node)
This method is called when theItemVisitor
is passed to theaccept
method of aNode
.void
visit(Property property)
This method is called when theItemVisitor
is passed to theaccept
method of aProperty
.
-
-
-
Method Detail
-
visit
void visit(Property property) throws RepositoryException
This method is called when theItemVisitor
is passed to theaccept
method of aProperty
. If this method throws an exception the visiting process is aborted.- Parameters:
property
- TheProperty
that is accepting this visitor.- Throws:
RepositoryException
- if an error occurs
-
visit
void visit(Node node) throws RepositoryException
This method is called when theItemVisitor
is passed to theaccept
method of aNode
. If this method throws an exception the visiting process is aborted.- Parameters:
node
- TheNode
- Throws:
RepositoryException
- if an error occurs
-
-