AnsweredAssumed Answered

Turning a qname path into a NodeRef, not by searching

Question asked by nickburch on Sep 13, 2012
Latest reply on Apr 5, 2017 by nicolasraoul
I thought that one of the core services supported this, but I can't for the life of me find it… I have a qname based path, something like "/app:company_home/app:dictionary/app:email_templates", and I want to get the NodeRef of that. However, I don't want to use the SearchService to do that lookup, as I'm using SOLR and I need to ensure I can find things that have just been added. (As I understand it, if I follow the various examples out there which use the SearchService to do that style of lookup, they risk missing anything that has just been added as SOLR doesn't guarantee to have things immediately, just fairly soon)

The FileFolderService offers a resolveNamePath method, which turns a list of node Names into a NodeRef. That would let me turn {"Company Home","Data Dictionary", "Email Templates"} into the NodeRef, but not the qname form.

All it needs to do is split the path by /, and lookup each child assoc qname in turn, so it's not too complicated. I just don't want to re-invent the wheel every time… Is there already a service that will do this, which I've missed, or have I found a gap left by the de-lucene work?