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

How to get Project Area Name on Source Control?

Hi.

I want to know how to get Project Area Name on source control.

so, i searched repository workspace, stream, user, changeset for Project Area Name

but, i didn't find (repository workspace, stream, user, changeset).

"String projectName = operation.getProcessArea().getName();"

this code get stream's owner value.

but if stream's owner is team area, i can't get project area name.

How do you get Project Area Name on source control?

thanks.

0 votes



3 answers

Permanent link
The tree structure that Geoff mentions is maintained at project area level (not as parent/children links in each team area). You can get at the info using:

IProjectArea projectArea = /* see above */
ITeamAreaHierarchy hierarchy = projectArea.getTeamAreaHierarchy();
ITeamAreaHandle teamArea = /* handle for some team area */
ITeamAreaHandle parent = hiearchy.getParent(teamArea); // null means project is parent
Set children = hierarchy.getChildren(teamArea); // set of ITeamAreaHandle

1 vote


Permanent link
If you have the stream, use:

IWorkspace stream = ...
IProcessAreaHandle processAreaHandle = stream.getOwner();
IProcessArea processArea = /* fetch processAreaHandle */
IProjectAreaHandle projectAreaHandle = processArea.getProjectArea();
IProjectArea projectArea = /* fetch projectAreaHandle */
String name = projectArea.getName();


On the client side, you'd use IItemManager to fetch the items, on the server side you'd use IRepositoryItemService.

1 vote


Permanent link
I don't know the API details, but team areas are arranged in a tree, the
root of which is a project area. So you'll want to look for some kind
of a "parent" relation from a team area (and keep traversing it until
you reach the project area), or a team area might have a direct pointer
to the root of the hierarchy (i.e. the project area).

Cheers,
Geoff

On 6/15/2011 3:38 AM, jjangrang wrote:
Hi.

I want to know how to get Project Area Name on source control.

so, i searched repository workspace, stream, user, changeset for
Project Area Name

but, i didn't find (repository workspace, stream, user, changeset).

"String projectName =
operation.getProcessArea().getName();"

this code get stream's owner value.

but if stream's owner is team area, i can't get project area name.

How do you get Project Area Name on source control?

thanks.

0 votes

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
× 10,930

Question asked: Jun 15 '11, 3:23 a.m.

Question was seen: 5,751 times

Last updated: Jun 15 '11, 3:23 a.m.

Confirmation Cancel Confirm