It's all about the answers!

Ask a question

What is the Plain Java API(RTC Client side) corresponding to the Server side API-processServerService.getContributorsWithRole?

Albert Yao (5411222) | asked Apr 07 '21, 2:58 p.m.
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

permanent link
Ralph Schoon (62.7k33643) | answered Apr 08 '21, 2:37 a.m.

 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 you find the Extensions Workshop and a link to 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.

Albert Yao selected this answer as the correct answer

Albert Yao commented Apr 08 '21, 3:01 a.m.
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

Ralph Schoon commented Apr 08 '21, 3:10 a.m. | edited Apr 08 '21, 3:12 a.m.

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.

Albert Yao commented Apr 09 '21, 4:26 a.m.

I have got the document, I will study it, many thanks and appreciate your help!

Your answer

Register or to post your answer.