It's all about the answers!

Ask a question

Get all members matching a specific name with RTC java-api


Luca Stanziano (811) | asked Feb 06 '15, 9:35 a.m.
 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


permanent link
Ralph Schoon (55.6k23642) | answered Feb 06 '15, 11:02 a.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER
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.
Luca Stanziano selected this answer as the correct answer

Comments
Ralph Schoon commented Feb 06 '15, 11:03 a.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER

One other answer



permanent link
Luca Stanziano (811) | answered Feb 06 '15, 11:15 a.m.
 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.

Your answer


Register or to post your answer.