Decision Center API

ilog.rules.teamserver.web.tree
Interface IlrTreeDataProvider

All Known Implementing Classes:
IlrPackageDataProvider, IlrPreLoadedDataProvider, IlrRuleExplorerDataProvider

public interface IlrTreeDataProvider

A tree data provider represents the tree's model and provides the tree component with the data to render.

See Also:
IlrTreeController.getTreeDataProvider()

Method Summary
 List<IlrTreeNode> getChildren(IlrTreeNode parent)
          Returns the children of a node.
 IlrTreeNode getNodeById(String id)
          Returns a node with a given ID.
 IlrTreeNode getParent(IlrTreeNode child)
          Returns the parent of a node.
 IlrTreeNode getRoot()
          Returns the root node of the tree's model.
 boolean hasChildren(IlrTreeNode node)
          Indicates if a node has children.
 void reset()
          Resets the tree's model.
 

Method Detail

reset

void reset()
Resets the tree's model.

This method is intended to clear caches potentially used by the implementation.


getRoot

IlrTreeNode getRoot()
Returns the root node of the tree's model.

This node is given to the getChildren(IlrTreeNode) method to start to render the tree component.

Returns:
The root node.

getParent

IlrTreeNode getParent(IlrTreeNode child)
Returns the parent of a node.

Parameters:
child - The node to get the parent from.
Returns:
The parent node, or null if it has none or if the parent cannot be computed.

hasChildren

boolean hasChildren(IlrTreeNode node)
Indicates if a node has children.

Parameters:
node - The node.
Returns:
true if the given node has children, and false otherwise.

getChildren

List<IlrTreeNode> getChildren(IlrTreeNode parent)
Returns the children of a node.

Parameters:
parent - The parent node to get the children from.
Returns:
A list of IlrTreeNode.

getNodeById

IlrTreeNode getNodeById(String id)
Returns a node with a given ID.

It is up to the user to manage the mapping between a node and its ID.

Parameters:
id - The ID of the node.
Returns:
The node with a given ID.

Decision Center API

© Copyright IBM Corp. 1987, 2013