Getting members and roles programmatically for team area
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
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
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)