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
Ralph Schoon (63.5k●3●36●46)
| 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
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.
|
Your answer
Dashboards and work items are no longer publicly available, so some links may be invalid. We now provide similar information through other means. Learn more here.