Jazz Forum Welcome to the Jazz Community Forum Connect and collaborate with IBM Engineering experts and users

Programmatic get of all TeamAreas in a project

I'm sorry if this is very elementary, but I'm new at the java libs.

I am attempting to list out all of the Team Areas in a project.

I can get the projectArea just fine, and can print out. T

IProjectArea projectArea = SESSION.getProjectArea();
if (projectArea != null) {
System.out.println ("Project area: " + projectArea.getName ());
List teamAreas = projectArea.getTeamAreas();
for (int i=0;i<teamAreas.size();i++) {
ITeamAreaHandle teamArea = (ITeamAreaHandle)teamAreas.get(i);
}
}

It looks like I can do getTeamAreas() and get a list of the team areas. However, I have been very unsuccessful at printing out the names of the Team Areas. I have tried going through the list, and while I can get the ITeamAreaHandle, I don't find a way to actually get the name. If I try to use ITeamArea instead of ITeamAreaHandle, I get a ClassCastException:

ITeamArea teamArea = (ITeamArea)teamAreas.get(i);
System.out.println(teamArea.getName());

Thanks in Advance
Susan

0 votes



11 answers

Permanent link
Susan, were you able to resolve the issue?


For the most part ... I am able to the the bottom Team Area name but it doesn't give me the full path or hierarchy.

I see that I can get:
Name
Description
Members and their roles on the team

What I need in the end is:
Full Path Name (like Feature Teams/Security Feature Team vs Test Teams/Persona Test Team
Description (this is good I think)
Members (I can get the IContributor[], so I think I'm good here)
Roles ... I'm not sure how to get what Role "Joe" has in this TeamArea.

Susan

From IClientProcess#getContributorRoles, IServerProcess#getContributorRoles, you can get the role information for the specified teamarea and member. Looks IClientProcess is available for you.

0 votes

1–15 items
page 2of 1 pagesof 2 pages

Your answer

Register or log in 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.

Search context
Follow this question

By Email: 

Once you sign in you will be able to subscribe for any updates here.

By RSS:

Answers
Answers and Comments
Question details
× 11,101

Question asked: Jan 16 '11, 3:16 p.m.

Question was seen: 14,851 times

Last updated: Sep 28 '12, 3:13 a.m.

Confirmation Cancel Confirm