cancel
Showing results for 
Search instead for 
Did you mean: 

Get path without qname

spilby
Confirmed Champ
Confirmed Champ
If I want the path of a node, I do the following:


getNodeService().getPath(nodeRef)


It returns something like this:


/{http://www.alfresco.org/model/application/1.0}company_home/{http://www.alfresco.org/model/applicatio...


But I want a path like:


/company_home/User Homes/AGP/AGP2/New Documents/Test.pdf


Without the qnames, types, and with the correct format without _x0020_ codes.

Are there a method from the Alfresco API to get this type of path? Or I must decode it writing an own method in Java?

Thanks!

PD: I answer myself Smiley Surprised)


getNodeService().getPath(nodeRef).toDisplayPath(getNodeService(), getPermissionService())
2 REPLIES 2

amineelhaddaj
Champ in-the-making
Champ in-the-making
Hello Spilby !

I need to return a path as you do, could you tell me which import you've done in order to use
getNodeService().getPath(nodeRef).toDisplayPath(getNodeService(), getPermissionService())
please ?

Thank you in advance !

Hello Amine,

I obtain the nodeService doing this:


this.serviceRegistry.getNodeService()


Hope it helps