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
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
11 answers
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.
page 2of 1 pagesof 2 pages