What is the Plain Java API(RTC Client side) corresponding to the Server side API-processServerService.getContributorsWithRole?
In my RTC server side, I can develop my own advisor/participant plug-in and use this API to get the users/contributors by a specific role in a project area directly like this:
IContributorHandle[] contributorHandles = processServerService.getContributorsWithRole(processArea.getMembers(), processArea, new String[] {"Stakeholder"})
But In my RTC client side, when I use processClientService.getContributorsWithRole() by analogy, the error happens:
The method getContributorsWithRole(IContributorHandle[], IProjectArea, String[]) is undefined for the type IProcessClientService
Could anyone help?
Accepted answer
Hi Albert,
there is absolutely no reasons for experimental development like that. It is, and always has been possible to look up the supported client API in the plain Java Client Libraries JavaDoc documentation. I would however consider even that as too clumsy.
It is possible to setup the RTC SDK and search for Methods and look into unit tests and other source code shipped with the SDK. By using Java Search in an Eclipse workspace set up with the RTC SDK, searching for method "getContributorsWithRole" finds this source code:
IAuditableCommonProcess auditableCommonProcess= workItemCommon.getAuditableCommon().getProcess(processArea, monitor);
IContributorHandle[] userhandles = auditableCommonProcess.getContributorsWithRole(processArea.getMembers(), processArea, lookupRoles.toArray(new String[lookupRoles.size()]), monitor);
return workItemCommon.getAuditableCommon().resolveAuditables(Arrays.asList(userhandles), ItemProfile.CONTRIBUTOR_DEFAULT, monitor);
I have tried to explain how to do that and get there in several posts on my blog. If you follow https://rsjazz.wordpress.com/2015/09/30/learning-to-fly-getting-started-with-the-rtc-java-apis/ you find the Extensions Workshop and a link to https://rsjazz.wordpress.com/2013/02/28/setting-up-rational-team-concert-for-api-development/ where I explain that in detail. The Extensions Workshop itself shows how you can find stuff.
I have added a new section to the Extensions Workshop article overhaul that I am going to publish soon. I can send you the latest version, if you let me know the e-mail.