getChildByName method

cancel
Showing results for 
Search instead for 
Did you mean: 
anakin98000
Active Member

getChildByName method

Jump to solution

Hi,

I would like to check if a node contains a child with specific name.

I try with 

alfrescoApiService.nodesApi.getNodeChildren(node)

but I don't know how to add the name  of the child

and I try 

that.alfrescoApiService.searchApi.search(filterRequest)

but I don't know how to add the node Id of the parent in filterRequest

Is it possible to reproduce java method getChildByName with ADF ?

Thank's

1 Solution

Accepted Solutions
EddieMay
Alfresco Employee

Re: getChildByName method

Jump to solution

Hi @anakin98000 

NodesAPI doesn't support this - instead you'll need to use the searchAPI - see here.

HTH,

Digital Community Manager, Alfresco Software.
Problem solved? Click Accept as Solution!

View solution in original post

2 Replies
EddieMay
Alfresco Employee

Re: getChildByName method

Jump to solution

Hi @anakin98000 

NodesAPI doesn't support this - instead you'll need to use the searchAPI - see here.

HTH,

Digital Community Manager, Alfresco Software.
Problem solved? Click Accept as Solution!
sanjaybandhniya
Intermediate

Re: getChildByName method

Jump to solution

You can use SearchService in ADF.

 

Ex.

              const defaultQueryBody: QueryBody = {
                  query: {
                    "query":"PATH:\"app:company_home/st:sites/cm:demo/cm:documentLibrary/cm:Test/cm:folder1//*\" AND cm:name:\"Letter.pdf*\""
                  }
              };
               this.searchService.searchByQueryBody(defaultQueryBody).subscribe(res=>{
                console.log(res);
               });