It's all about the answers!

Ask a question

Getting members and roles programmatically for team area


0
2
Templier Thierry (11) | asked Feb 18 '11, 6:07 a.m.
Hello,

I'm trying to use the RTC API to get members and their roles programmatically for a team area. I'm using ITeamRepository and IProjectArea interfaces but I don't know how to handle the array of IContributorHandle returned by the getMembers method... I need to get all informations regarding these members. Moreover how to get roles then?

Are there any samples or documentations on how to use the RTC API?

Thanks very much for your help!
Thierry

One answer



permanent link
David Lafreniere (4.8k7) | answered Feb 18 '11, 1:58 p.m.
FORUM MODERATOR / JAZZ DEVELOPER
Hello,

I'm trying to use the RTC API to get members and their roles programmatically for a team area. I'm using ITeamRepository and IProjectArea interfaces but I don't know how to handle the array of IContributorHandle returned by the getMembers method... I need to get all informations regarding these members. Moreover how to get roles then?

Are there any samples or documentations on how to use the RTC API?

Thanks very much for your help!
Thierry


Hi Thierry,

I think something like this might help:

 IItem[] items = fItemService.fetchItems(processArea.getMembers(), IRepositoryItemService.COMPLETE);

for (IItem item : items) {
IContributor contributor = (IContributor) item;
if (contributor != null) {
IRole[] contributorRoles = serverProcess.getContributorRoles(contributor, processArea);


Where processArea can be your IProjectArea that you already have.
and the serverProcess is an IServerProcess (IProcessServerService)

Your answer


Register or to post 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.