com.jaspersoft.jasperserver.war.model
Interface TreeDataProvider

All Known Implementing Classes:
RepositoryTreeDataProviderImpl

public interface TreeDataProvider

The base interface for tree data provider. Implementing classes make a bridge to any datasource (Repository, File System, etc.)

Author:
asokolnikov

Method Summary
 java.util.List getChildren(ExecutionContext executionContext, java.lang.String parentUri, int depth)
          Returns a list of TreeNode instances which are immediate children of a node identified by a given URI.
 TreeNode getNode(ExecutionContext executionContext, java.lang.String uri, int depth)
          Returns an instance of TreeNode for a given URI.
 

Method Detail

getNode

TreeNode getNode(ExecutionContext executionContext,
                 java.lang.String uri,
                 int depth)
Returns an instance of TreeNode for a given URI. depth parameter controls how many levels of children are going to be preloaded within the requested node (0 - no children preloaded, 1 - only immeadiate children preloaded, etc.)

Parameters:
executionContext - ExecutionContext instance
uri - a unique string indentifying the node (uses "/node1/node11" convention)
depth - children tree depth to be preloaded
Returns:
TreeNode instance OR null of not found

getChildren

java.util.List getChildren(ExecutionContext executionContext,
                           java.lang.String parentUri,
                           int depth)
Returns a list of TreeNode instances which are immediate children of a node identified by a given URI. Each node in the list may have its children preloaded if depth is greater that 0 Returns an empty list if no children found.

Parameters:
executionContext - ExecutionContext instance
parentUri - a unique string indentifying the node
depth - children tree depth to be preloaded
Returns:
List of TreeNode instances OR null if parent not found


Copyright © 2007. All Rights Reserved.