RepositoryServiceFactory.getPackageService().listPackages( new GenericCallback<PackageConfigData[]>() {
public void onSuccess( PackageConfigData[] values ) {
PackageView ph = new PackageHierarchicalView();
for (PackageConfigData val : values) {
ph.addPackage( val );
}
for (Folder hf : ph.getRootFolder().getChildren()) {
buildDeploymentTree( root, hf );
}
}