cancel
Showing results for 
Search instead for 
Did you mean: 

How to get all nodes of a content

sradha
Champ on-the-rise
Champ on-the-rise
Hi,

I have a content in my alfresco share using custom content model.I want to get all the parent root nodes for the content noderef.How to do that?
for example i got path as
path———-/{http://www.alfresco.org/model/application/1.0}company_home/{http://www.alfresco.org/model/site/1.0}s...


How can i get or map with only companyhome,sites,sia,documentLibrary,Test,New along with nodes of each of them?

Please suggest me


Regards,
Sradha
1 REPLY 1

angello0571
Champ on-the-rise
Champ on-the-rise
Using NodeService with Java API:

//Getting the parent nodes:
List<ChildAssociationRef> childs = serviceRegistry.getNodeService().getParentAssocs(yourNode);

//Getting the root nodes:
Set<NodeRef> rootNodes = serviceRegistry.getNodeService().getRootNode(yourNode);

I hope it helps.

Regards!