Package wt.visitor

Class BasicNodeExpander

java.lang.Object
wt.visitor.BasicNodeExpander
All Implemented Interfaces:
NodeExpander

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
  • Method Details

    • 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
    • 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