Hi,
I have created a user "Jack" using PersonService
psrvc.createPerson(contentProps);
I have verified using webclient, that user's folder gets created under /company_home/user home/Jack.
Now I am trying to get NodeRef from absolute path which can be /company_home/user home/Jack,/company_home/user home/Jack/folder1,/company_home/user home/Jack/folder2 .
I am able to get the NodeRef for following path (/company_home/user home/)
ResultSet resultSet = searchService.query(new StoreRef(StoreRef.PROTOCOL_WORKSPACE, "SpacesStore") , SearchService.LANGUAGE_LUCENE, "PATH:\"/app:company_home/app:user_homes\"");
but when I am trying to get Jack folder (/company_home/user home/Jack) with following query , the resultset is empty
ResultSet resultSet = searchService.query(new StoreRef(StoreRef.PROTOCOL_WORKSPACE, "SpacesStore") , SearchService.LANGUAGE_LUCENE, :"PATH:\"/app:company_home/app:user_homes/cm:Jack\"");
OR the following also returns empty resultset
ResultSet resultSet = searchService.query(new StoreRef(StoreRef.PROTOCOL_WORKSPACE, "SpacesStore") , SearchService.LANGUAGE_LUCENE, :"PATH:\"/app:company_home/app:user_homes/cm:Jack/cm:folder1\"");
Please let me know if I am doing anything wrong ?
Is there a better way to get NodeRef from absolute path with Alfresco API's (I know it can be done using JCR API's but looking for doing it using Alfresco API's)?
Thanks in advance.
arshad