Package wt.graph
Class ObjectGraphCallback
java.lang.Object
wt.visitor.CompositeVisitor
wt.graph.ObjectGraphCallback
- All Implemented Interfaces:
Serializable,Visitor
Performs common pre/post-processing activities on each visited node as
a callback. This could also be a customization point where application
callbacks (visitors) are added to help satisfy a particular consumer's
specific requirements.
Supported API: true
Extendable: false
For instance, if an application had additional requirements to censor information in the object graph, based on say specific access control permissions, then the application could add their custom visitor to the object graph's set visitor. Then when the object graph was next traversed, not only would all of the previously added visitors be employed, but additionally the newly added application visitor as well.
Supported API: true
Extendable: false
- See Also:
-
Method Summary
Modifier and TypeMethodDescriptionbooleanvisit(Persistable fromNode, Link link, Persistable toNode, int level, boolean previouslyVisited) Visit a node.booleanvisitLevel(Vector fromNodes, Vector links, Vector toNodes, int level) Vist nodes at this level.booleanvisitLevel(Persistable fromNode, Vector links, Vector toNodes, int level) Vist nodes at this level.Methods inherited from class wt.visitor.CompositeVisitor
addVisitor, removeVisitor
-
Method Details
-
visit
public boolean visit(Persistable fromNode, Link link, Persistable toNode, int level, boolean previouslyVisited) throws WTException Visit a node. If false is returned, then the node will not be traversed.
Supported API: true- Specified by:
visitin interfaceVisitor- Overrides:
visitin classCompositeVisitor- Parameters:
fromNode-link-toNode-level-previouslyVisited-- Returns:
- boolean
- Throws:
WTException
-
visitLevel
public boolean visitLevel(Persistable fromNode, Vector links, Vector toNodes, int level) throws WTException Vist nodes at this level. If false is returned, then none of the nodes on this level will be traversed.
Supported API: true- Specified by:
visitLevelin interfaceVisitor- Overrides:
visitLevelin classCompositeVisitor- Parameters:
fromNode-links-toNodes-level-- Returns:
- boolean
- Throws:
WTException
-
visitLevel
public boolean visitLevel(Vector fromNodes, Vector links, Vector toNodes, int level) throws WTException Vist nodes at this level. If false is returned, then none of the nodes on this level will be traversed.
Supported API: true- Specified by:
visitLevelin interfaceVisitor- Overrides:
visitLevelin classCompositeVisitor- Parameters:
fromNodes-links-toNodes-level-- Returns:
- boolean
- Throws:
WTException
-