cern::gp::nodes::NodeFactory Class Reference

List of all members.

Static Public Member Functions

static GPNode createNode (Object bean, ChildrenManager childrenManager) throws IntrospectionException
static GPNode createNode (Object bean) throws IntrospectionException
static GPNode[] createNode (Object[] beans) throws IntrospectionException

Private Member Functions

 NodeFactory ()

Detailed Description

This factory can be used to build a node representing a given bean. The node will extract the information it needs directly from the bean. As nodes are used to build up a hierarchy of objects (a node having children that can also have children) and as beans don't carry the concept of a hierarchy, it is possible to specify the children of the node representing a given bean by passing a ChildrenManager.

Example of creating a node with children

 GPNode node = NodeFactory.createNode(equipmentBean, new EquipmentChildrenListManager(euipmentBean));
 

Example of creating a node without children

 GPNode leaf = NodeFactory.createNode(equipmentBean);
 
See also:
GPNode
cern.gp.nodes.children.ChildrenManager
Version:
Revision
1.2
Date
2006/09/25 08:52:36
Author:
Lionel Mestre

Constructor & Destructor Documentation

cern::gp::nodes::NodeFactory::NodeFactory (  )  [inline, private]

cannot be instantiated


Member Function Documentation

static GPNode [] cern::gp::nodes::NodeFactory::createNode ( Object[]  beans  )  throws IntrospectionException [inline, static]

Instantiates new leaf Nodes for the given beans

Parameters:
beans the beans to represent by nodes
Returns:
an array of leaf Nodes representing the beans
static GPNode cern::gp::nodes::NodeFactory::createNode ( Object  bean  )  throws IntrospectionException [inline, static]

Instantiates a new leaf Node for the given bean

Parameters:
bean the bean the new node represents
Returns:
a leaf Node representing the bean
static GPNode cern::gp::nodes::NodeFactory::createNode ( Object  bean,
ChildrenManager  childrenManager 
) throws IntrospectionException [inline, static]

Instantiates a new Node for the given bean and NodeManager

Parameters:
bean the bean the new node represents
childrenManager the children manager controlling the children of the new node
Returns:
a Node representing the bean whose children are controlled by the given manager

The documentation for this class was generated from the following file:

Generated by  doxygen 1.6.2