Constructs an array of tree nodes that represents one level in the hierarchy of source nodes.
Syntax
public TreeNode[] getTreeNodes(String parentNodePath, String searchPattern);
Parameters
Return values
An array of TreeNode objects, which tree-node object is a child node in the hierarchy of specified objects.
Exceptions
Notes
The getTreeNodes() method is the source-node-generation method for the IGeneratesBoDefs interface. Business Object Wizard invokes getTreeNodes() to obtain the array of tree nodes that initializes its Select Source (Step 3) dialog box. From this dialog box, the user selects specific source nodes for business-object-definition generation. Within the getTreeNodes() method, you must construct tree nodes to represent the hierarchy of source nodes in the data source. The getTreeNode() method returns this source-node hierarchy as an array of TreeNode objects to its caller, Business Object Wizard.
The tree-node array that getTreeNodes() returns provides the source nodes at one particular level of the source-node hierarchy. At any given level, some source nodes might be expandable (have child nodes) and some might be leaf (terminating) nodes. The user can traverse the hierarchy by expanding any source node that displays a plus (+) sign to its left. When the user expands a node, Business Object Wizard calls getTreeNodes() again, providing as its parentNodePath argument the name of the node the user wants to expand. This node name consists of the names of each of the nodes in the path, separated by a colon (:).
The getTreeNodes() method performs the following basic tasks to generate the source nodes:
If Business Object Wizard provides a searchPattern argument to getTreeNodes(), the user has specified search criteria. Therefore, getTreeNodes() must return only those child nodes of the parentNodePath node that match searchPattern search criteria. The ability to apply a search pattern to source nodes requires that the following conditions are true:
The searchPatternDesc member variable in the ODA's metadata (AgentMetaData) object provides a description to the user of the supported search criteria. However, the getTreeNodes() method must parse the user-specified searchPattern to ensure that it matches the supported search criteria.
The searchableNodes member variable in the ODA's metadata (AgentMetaData) object is true. If searchableNodes is false, the Search for items menu item (which initiates the user's entry of search criteria) is not available. Therefore, the user cannot enter search criteria.
For more information on how to implement getTreeNodes(), see Generating source nodes.
See also
For related reference information, see TreeNode class.