Find noderef of folder based on path without solr

cancel
Showing results for 
Search instead for 
Did you mean: 
yash_patel_c2
Established Member

Find noderef of folder based on path without solr

Hi Team,

I want to find noderef of the folder based on its path in java webscript. I have disabled solr in my Alfresco. How can I get it using cmis or any other way which does not use solr?

Thanks

2 Replies
afaust
Master

Re: Find noderef of folder based on path without solr

WIthout SOLR, you essentially have to use Alfresco's Java API (either FileFolderService.resolveNamePath(), SearchService.selectNodes() or iteratively NodeService.getChildByName()) to resolve a path to a node reference. Depending on which API you use, there are some differences in semantics / limitations. E.g. FileFolderService only allows you to deal with - as the name suggests - files and folders, and any nodes not fitting into those two base types will be unsupported. It also limits you to the cm:contains association for paths. SearchService.selectNodes() requires you to use an XPath, and NodeService.getChildByName() requires you to split your path and iteratively perform the lookup - but both are unrestricted with regards to type of nodes and child associations supported.

kaynezhang
Advanced

Re: Find noderef of folder based on path without solr

You can try to use getObjectByPath(String path) method of cmis Session interface