wt.visitor
Interface Walker

All Known Subinterfaces:
ObjectGraph, ObjectGraphTemplate
All Known Implementing Classes:
AbstractObjectGraph, AbstractObjectGraphTemplate, BasicWalker, ObjectGraphWalker

public interface Walker

This interface is responsible for controlling the overall traversal mechanism. It includes a single traverse() method that provides multi-level navigation of associations between Persistable objects. Depth-first traversal is an example of an implementation. It uses a NodeExpander object to do the actual expansion of nodes. It also is responsible for calling the visit methods on the Visitor object as the structure is traversed. If any visit method returns a boolean false value, then that node will not be traversed any further.

Supported API: true

Extendable: true


Field Summary
static String NODE_EXPANDER
          Label for the attribute.
static String VISITOR
          Label for the attribute.
 
Method Summary
 NodeExpander getNodeExpander()
          Gets the object for the association that plays role: NODE_EXPANDER.
 Visitor getVisitor()
          Gets the object for the association that plays role: VISITOR.
 void setNodeExpander(NodeExpander a_NodeExpander)
          Sets the object for the association that plays role: NODE_EXPANDER.
 void setVisitor(Visitor a_Visitor)
          Sets the object for the association that plays role: VISITOR.
 void traverse(Persistable root)
          Traverses the root node.
 

Field Detail

VISITOR

public static final String VISITOR
Label for the attribute.

Supported API: false

See Also:
Constant Field Values

NODE_EXPANDER

public static final String NODE_EXPANDER
Label for the attribute.

Supported API: false

See Also:
Constant Field Values
Method Detail

getVisitor

public Visitor getVisitor()
Gets the object for the association that plays role: VISITOR.

Supported API: false

Returns:
Visitor

setVisitor

public void setVisitor(Visitor a_Visitor)
                throws WTPropertyVetoException
Sets the object for the association that plays role: VISITOR.

Supported API: false

Parameters:
a_Visitor -
Throws:
WTPropertyVetoException

getNodeExpander

public NodeExpander getNodeExpander()
Gets the object for the association that plays role: NODE_EXPANDER.

Supported API: false

Returns:
NodeExpander

setNodeExpander

public void setNodeExpander(NodeExpander a_NodeExpander)
                     throws WTPropertyVetoException
Sets the object for the association that plays role: NODE_EXPANDER.

Supported API: false

Parameters:
a_NodeExpander -
Throws:
WTPropertyVetoException

traverse

public void traverse(Persistable root)
              throws WTException
Traverses the root node.

Supported API: true

Parameters:
root -
Throws:
WTException