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
Asked
Active
Viewed 1,049 times
2
-
Those should all be available as the properties on the folder object. What did you try? How far did you get? Where did you get stuck? etc – Gagravarr Dec 12 '15 at 18:40
-
I used those...but didn't get succeed .. For ex: My docId is "workspace://SpacesStore/XXXXXXXX" then how can I get Folder name from this particular id?? This document is belongs to which folder??? I didn't get those api..please let me know if any..Thanks – user3855589 Dec 14 '15 at 05:49
2 Answers
2
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());

Florian Müller
- 3,215
- 1
- 14
- 11
1
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());

user3855589
- 1,113
- 2
- 15
- 43