how to fetch user names and their email address who belong to a team area?
Accepted answer
Hi,
Using java client api, method would look something like this.
public void fetchContributorsFromTeamArea(ITeamArea iTeamArea) throws TeamRepositoryException {
IContributorHandle[] iContributorHandles = iTeamArea.getMembers();
int i = 0;
for (IContributorHandle iContributorHandle : iContributorHandles) {
IContributor iContributor = (IContributor) repository.itemManager()
.fetchCompleteItem(iContributorHandle,
IItemManager.DEFAULT, monitor);
System.out.println(iContributor.getName() + "\t"
+ iContributor.getUserId() + "\t"
+ iContributor.getEmailAddress());
}
}
Using java client api, method would look something like this.
public void fetchContributorsFromTeamArea(ITeamArea iTeamArea) throws TeamRepositoryException {
IContributorHandle[] iContributorHandles = iTeamArea.getMembers();
int i = 0;
for (IContributorHandle iContributorHandle : iContributorHandles) {
IContributor iContributor = (IContributor) repository.itemManager()
.fetchCompleteItem(iContributorHandle,
IItemManager.DEFAULT, monitor);
System.out.println(iContributor.getName() + "\t"
+ iContributor.getUserId() + "\t"
+ iContributor.getEmailAddress());
}
}