06-13-2013 01:39 PM
private Folder getChildFolder(Folder parentFolder, String folderName) {
log.info("Getting child folder");
log.info("Parent folder: "+parentFolder.getName());
log.info("Folder Name:"+folderName);
for (Tree<FileableCmisObject> t : parentFolder.getFolderTree(-1)) {
log.info("Comparando "+t.getItem().getName()+" con "+folderName);
if (t.getItem().getName().equals(folderName)) {
log.info("Folder Encontrado");
return (Folder) t.getItem();
}
}
log.info("Folder No Encontrado, creandolo");
// If we get here no folder existed thus we create it
return buildChildFolder(parentFolder, folderName);
}
06-25-2013 03:22 AM
for (Tree<FileableCmisObject> t : parentFolder.getFolderTree(-1))
for (Tree<FileableCmisObject> t : parentFolder.getDescendants(-1))
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.