wt.visitor
Class BasicNodeExpander

java.lang.Object
  extended bywt.visitor.BasicNodeExpander
All Implemented Interfaces:
NodeExpander
Direct Known Subclasses:
ObjectGraphNodeExpander

public class BasicNodeExpander
extends Object
implements NodeExpander

This class implements NodeExpander by using an Expander and NodeLinkInfo delegates. The Expander is an interface used for selecting an implementation of the expand() method. The NodeLinkInfo interface specifies applicable assocation roles and the Expander instance to use for a given Persistable object.

Using this class, it is possible to completely customize a multi-level navigation by plugging-in the appropriate NodeLinkInfo and Expander implementations.

There is a tight coupling between the RoleLinkInfo and Expander objects that are used within this class. The Expander requires a specific type of roleObject for its implementation. The NodeLinkInfo is expected to return RoleInfoObjects that have the appropriate type of roleObject instances.

Supported API: true

Extendable: true

See Also:
wt.util.NodeLinkInfo, wt.util.Expander

Field Summary
private static String CLASSNAME
           
private static String RESOURCE
           
private  NodeExpandInfo theNodeExpandInfo
           
 
Constructor Summary
BasicNodeExpander()
           
 
Method Summary
 void expandNode(Persistable parentNode, Vector links, Vector nodes)
          Expands the node returning all of the links and nodes associated with the parent node.
 void expandNode(Persistable parentNode, Vector links, Vector nodes, ObjectGraphTemplate ogt)
           
 NodeExpandInfo getNodeExpandInfo()
          Gets the object for the association that plays role: theNodeExpandInfo.
 void setNodeExpandInfo(NodeExpandInfo a_NodeExpandInfo)
          Sets the object for the association that plays role: theNodeExpandInfo.
private  void theNodeExpandInfoValidate(NodeExpandInfo a_NodeExpandInfo)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

RESOURCE

private static final String RESOURCE
See Also:
Constant Field Values

CLASSNAME

private static final String CLASSNAME

theNodeExpandInfo

private NodeExpandInfo theNodeExpandInfo
Constructor Detail

BasicNodeExpander

public BasicNodeExpander()
Method Detail

getNodeExpandInfo

public NodeExpandInfo getNodeExpandInfo()
Gets the object for the association that plays role: theNodeExpandInfo.

Supported API: true

Returns:
NodeExpandInfo

setNodeExpandInfo

public void setNodeExpandInfo(NodeExpandInfo a_NodeExpandInfo)
                       throws WTPropertyVetoException
Sets the object for the association that plays role: theNodeExpandInfo.

Supported API: true

Parameters:
a_NodeExpandInfo -
Throws:
WTPropertyVetoException

theNodeExpandInfoValidate

private void theNodeExpandInfoValidate(NodeExpandInfo a_NodeExpandInfo)
                                throws WTPropertyVetoException
Parameters:
a_NodeExpandInfo -
Throws:
WTPropertyVetoException

expandNode

public void expandNode(Persistable parentNode,
                       Vector links,
                       Vector nodes)
                throws WTException
Expands the node returning all of the links and nodes associated with the parent node.

Supported API: true

Specified by:
expandNode in interface NodeExpander
Parameters:
parentNode -
links -
nodes -
Throws:
WTException

expandNode

public void expandNode(Persistable parentNode,
                       Vector links,
                       Vector nodes,
                       ObjectGraphTemplate ogt)
                throws WTException
Throws:
WTException