cancel
Showing results for 
Search instead for 
Did you mean: 

Convert node info to Location Name [SOLVED]

jimcornmell
Champ in-the-making
Champ in-the-making
Hi,

Probably a simple question but I've been unable to find the answer.  Thanks in advance.  I'm using v2.1.

When querying nodes, spaces etc you can get a variety of references which point to the location within Alfresco as follows:

workspace://SpacesStore/094730c4-990c-11dc-a1db-cb1c0162c03d
or
094730c4-990c-11dc-a1db-cb1c0162c03d
or
store://2007/12/5/8/55/e4d519d6-a30f-11dc-a82f-79e869b7a1fa.bin
etc.

My question is how can I convert these to the actual name of the location, i.e. "Company Home/User Space/Some Doc Space Name"?  I've tried toString on nodeRef and various other API calls, but all return one of the above.

Jim
2 REPLIES 2

rivarola
Champ on-the-rise
Champ on-the-rise
Hello,

You can try
nodeService.getPath(nodeRef).toDisplayPath(nodeService)

jimcornmell
Champ in-the-making
Champ in-the-making
Hi rivarola,

Spot on.  Many thanks for your help.

Jim