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.
Comments
Hi, Ralph,
Thanks a lot, your blog and workshop document are very helpful!
I am looking forward to the latest version of the Extensions Workshop article and my E-mail is yjyaoyj@cn.ibm.com
You should have access now. The additional section is the last one in Lab1. I will add some more information about which search options are available. To the Ext Workshop.
By the way, if you are developing a client side Eclipse plugin, all these search capabilities should be available naturally if you have set up your environment following the Extensions Workshop. The workshop uses options such as find references. I will try to figure out how I can add a bit more information about search for API.
The added section is only meant to help developers of Plain Java Client Library application with seeing the API code during development.
I have got the document, I will study it, many thanks and appreciate your help!