It's all about the answers!

Ask a question

how to fetch user names and their email address who belong to a team area?

shruti gudagur (281115) | asked Jun 04 '14, 6:46 a.m.
edited Jun 10 '14, 2:41 a.m. by Ralph Schoon (62.7k33643)
can i fetch all the user names and their email address who belong to a particular team area?
are their any OSLC/REST api's to meet this requirement?


Accepted answer

permanent link
Ajay Mallikarjunaiah (148310) | answered Jun 04 '14, 7:05 a.m.
 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()
                            IItemManager.DEFAULT, monitor);
            System.out.println(iContributor.getName() + "\t"
                    + iContributor.getUserId() + "\t"
                    + iContributor.getEmailAddress());


shruti gudagur selected this answer as the correct answer

shruti gudagur commented Jun 04 '14, 7:15 a.m.

Thank you Ajay.

shruti gudagur commented Jun 10 '14, 2:02 a.m. | edited Jun 10 '14, 2:30 a.m.


Your answer

Register or to post your answer.