Reputation: 1103
I have one question. How can I get Folder Name,Id etc...(Folder details) from document Id in alfresco using cmis api? Is there any way??? Thanks
Upvotes: 2
Views: 1213
Reputation: 3235
This one is shorter:
// get the first parent of the document
Folder parent = doc.getParents().get(0);
System.out.println("ID: "+ parent.getId());
System.out.println("Name: "+ parent.getName());
Upvotes: 2
Reputation: 1103
Finally I got the answer..use following line..
ObjectData bindingParent=cmisSession.getBinding().getNavigationService().getFolderParent(cmisSession.getRepositoryInfo().getId(), doc.getId(), null, null);
System.out.println("\n --> id "+ bindingParent.getId());
Upvotes: 1