Hi,
i get patient lastname and firstname as parameters
I need to retrieve the people list by using these parameters as fliters.
I don't know what is the best way to do that in java.
I have found this javascript function used in my project but it's in javascript and i need to know what is the best way to do that in java :
var group = "GROUP_PATIENTS";
var personRefs = people.getPeoplePaging("*", paging, "lastName", true);
for each(var personRef in personRefs){
if(isPersonInGroup(personRef, group)){
logger.log("personRef = " + personRef);
}
}
There is a lot of function in PersonService.class or SiteService.class....and I don't know which one is the most suitable
Thank you
Hi,
Please refer this class (org.alfresco.repo.jscript.People) in Alfresco, Actually people it implicit javascript object of this class and calls all the methods. Refer this method getPeoplePaging which has java code for the people.
In internal method calls finally it uses following code for getting people:
personService.getPeople(filter, filterProps, sort, pagingRequest).getPage();
For for getting group you should use AuthorityService and can get member of the groups.
Best Regards,
Rupesh Sawaliya
EnProwess Technologies
Ask for and offer help to other Alfresco Content Services Users and members of the Alfresco team.
Related links:
By using this site, you are agreeing to allow us to collect and use cookies as outlined in Alfresco’s Cookie Statement and Terms of Use (and you have a legitimate interest in Alfresco and our products, authorizing us to contact you in such methods). If you are not ok with these terms, please do not use this website.