com.jaspersoft.jasperserver.war.model.impl
Class RepositoryTreeDataProviderImpl

java.lang.Object
  extended by com.jaspersoft.jasperserver.war.model.impl.RepositoryTreeDataProviderImpl
All Implemented Interfaces:
TreeDataProvider

public class RepositoryTreeDataProviderImpl
extends java.lang.Object
implements TreeDataProvider

Implementation of TreeDataProvider. Provides Repository browsing. It takes in account the current user's privileges and adds Extra Property to each TreeNode which is an object that has property 'isWritable'. On the client side you can access it by referencing to node.param.extra.isWritable

Author:
asokolnikov
See Also:
TreeNode

Constructor Summary
RepositoryTreeDataProviderImpl()
           
 
Method Summary
 java.util.List getChildren(ExecutionContext executionContext, java.lang.String parentUri, int depth)
          Returns an instance of TreeNode for a given URI.
 TreeDataFilter getFilter()
           
 TreeNode getNode(ExecutionContext executionContext, java.lang.String uri, int depth)
          Returns a list of TreeNode instances which are immediate children of a node identified by a given URI.
 RepositoryService getRepositoryService()
           
 RepositoryServiceSecurityChecker getRepositoryServiceSecurityChecker()
           
 void setFilter(TreeDataFilter filter)
           
 void setRepositoryService(RepositoryService repositoryService)
           
 void setRepositoryServiceSecurityChecker(RepositoryServiceSecurityChecker repositoryServiceSecurityChecker)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

RepositoryTreeDataProviderImpl

public RepositoryTreeDataProviderImpl()
Method Detail

getChildren

public java.util.List getChildren(ExecutionContext executionContext,
                                  java.lang.String parentUri,
                                  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.)

Specified by:
getChildren in interface TreeDataProvider
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

getNode

public TreeNode getNode(ExecutionContext executionContext,
                        java.lang.String uri,
                        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.

Specified by:
getNode in interface TreeDataProvider
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

getRepositoryService

public RepositoryService getRepositoryService()

setRepositoryService

public void setRepositoryService(RepositoryService repositoryService)

getRepositoryServiceSecurityChecker

public RepositoryServiceSecurityChecker getRepositoryServiceSecurityChecker()

setRepositoryServiceSecurityChecker

public void setRepositoryServiceSecurityChecker(RepositoryServiceSecurityChecker repositoryServiceSecurityChecker)

getFilter

public TreeDataFilter getFilter()

setFilter

public void setFilter(TreeDataFilter filter)


Copyright © 2007. All Rights Reserved.