08-20-2009 10:45 AM
public List<String> getAllFoldersIn(String root) {
// path is PATH:"//app:company_home/app:user_homes/cm:Test/cm:MySpace/cm:Projects/cm:Job//."
String path = "PATH:\"/" + root + "//.\"";
final List<String> result = new ArrayList<String>();
final Query query = new Query(Constants.QUERY_LANG_LUCENE, path);
Node [] nodes = null;
try {
nodes = WebServiceFactory.getRepositoryService().get(new Predicate(null,STORE,query));
} catch (RepositoryFault e) {
e.printStackTrace();
} catch (RemoteException e) {
e.printStackTrace();
}
if (null != nodes){
for (final Node node : nodes) {
result.add(node.getReference().getPath();
}
}
return result;
}
Test
|_ __MySpace
|_____Projects
|______Job
|_____Job Subfolder 1
|_________File 1.txt
|______Job Subfolder 2
08-20-2009 11:13 AM
08-20-2009 11:18 AM
Tags
Find what you came for
We want to make your experience in Hyland Connect as valuable as possible, so we put together some helpful links.