Get all members matching a specific name with RTC java-api
I would like to create a "Select user" form in a java application where the user write a name, press search, a get all the RTC members matching that name.
In the RTC API currently I just found the function IProjectArea.getMembers() which returns an IContributorHandle array of all project area members, but because I have more than 1000 users in the database, query for all the members at once and then filter them on client side is not feasible.
Is it possible to query the database for only members matching a specific name?
In some way the IBM RTC Eclipse client does it, does anybody know how I could replicate it?
Accepted answer
I would suggest to use Yari with RTC with a SDK set up to look into the RTC Client code and how it does this.
Comments
See https://rsjazz.wordpress.com/2014/02/21/adding-context-menus-for-jazz-objects-to-the-rtc-eclipse-client/ for how you can use Yari.
One other answer
Wow!! This Yari looks really powerful!! I will reuse it many time I think! That you very much!
In the meanwhile I think to have solved my issue fetching all the member items at the same time with the function:
List memberItems = itemManager.fetchCompleteItems(IContributorHandleList, 0, null);
instead of
for( IContributorHandle member : members){
IContributor memberItem = itemManager.fetchCompleteItem( member, 0, null);
}
now it takes just 6 seconds to fetch all the members instead of 77seconds of the previous solution. and this is a lot more feasible.