com.sri.emo.controller
Class TreeViewFactory

java.lang.Object
  extended by com.sri.emo.controller.TreeViewFactory

public class TreeViewFactory
extends Object

A factory for building the data structure needed for a tree view. It does so by first building a 'tree' model of the database node, and then using a visitor to transform it into something useful for the TreeView control.

Author:
Michael Rimov

Constructor Summary
TreeViewFactory(Node rootNode, ExpressoResponse response, int maxNestingLevels)
          Constructs a tree view factory.
 
Method Summary
 TreeNode buildTree()
          Builds a Tree for the Tree node.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TreeViewFactory

public TreeViewFactory(Node rootNode,
                       ExpressoResponse response,
                       int maxNestingLevels)
Constructs a tree view factory.

Parameters:
rootNode - Node
response - ControllerResponse
maxNestingLevels - int
Method Detail

buildTree

public TreeNode buildTree()
Builds a Tree for the Tree node. It is the callers responsibility to save the Nodes to the request, session or wherever.

Returns:
TreeNode the tree node.


Copyright © 2004-2006 Codeguild, Inc.. All Rights Reserved.