use of org.pentaho.repo.model.RepositoryTree in project pentaho-kettle by pentaho.
the class RepositoryBrowserController method loadDirectoryTree.
public RepositoryTree loadDirectoryTree(String filter) {
if (getRepository() != null) {
try {
if (getRepository() instanceof RepositoryExtended) {
rootDirectory = ((RepositoryExtended) getRepository()).loadRepositoryDirectoryTree(false);
} else {
rootDirectory = getRepository().loadRepositoryDirectoryTree();
}
RepositoryTree repositoryTree = new RepositoryTree();
RepositoryDirectory repositoryDirectory = RepositoryDirectory.build(null, rootDirectory);
populateFolders(repositoryDirectory, rootDirectory);
boolean isPentahoRepository = getRepository().getRepositoryMeta().getId().equals(PENTAHO_ENTERPRISE_REPOSITORY);
repositoryTree.setIncludeRoot(!isPentahoRepository);
repositoryTree.addChild(repositoryDirectory);
return repositoryTree;
} catch (Exception e) {
return null;
}
}
return null;
}
Aggregations