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

Modify TeamConfiguration in a ProjectArea

So I want to be able to configure the precondition/followup-actions for
a specific operations in the Team Configuration. How could I do that
programmatically?

I got a IProjectArea object and tried all getters/setters, but couldn't
find APIs to do what I want to do.

I look at the source of the ProjectAreaEditor and
ProcessConfigurationPage, but couldn't figure out how it's done.

Thanks.

1

0 votes



2 answers

Permanent link
We don't provide API to manipulate process configurations. When you want
to conduct some experiments you can try to use the internal
implementation classes (which can change at any point in time). This
would look somewhat like this:

Map<String> data= projectArea.getProcessData();
IContent cnt = data.get(ProcessContentKeys.PROCESS_SPECIFICATION_KEY);
if (cnt!= null) {
String xmlSource = createStringFromContent(cnt);
ProcessSpecificationModel model = new ProcessSpecificationModel();
Exception exception= model.initialize(xmlSource);
if (exception != null) {
handleException(exception);
} else {
xmlSource = manipulate(xmlSource);
set new source to project area working copy
save project area working copy
}
}


Kai
Jazz Process team


hvlam wrote:
So I want to be able to configure the precondition/followup-actions for
a specific operations in the Team Configuration. How could I do that
programmatically?

I got a IProjectArea object and tried all getters/setters, but couldn't
find APIs to do what I want to do.

I look at the source of the ProjectAreaEditor and
ProcessConfigurationPage, but couldn't figure out how it's done.

Thanks.

0 votes


Permanent link
Thanks Kai,
Before I posted the question, I did try to get the IContent. However,
after I got the IContent, I didn't know what to do.

But after reading your response, I searched for the
createStringFromContent(..) method and was able to find it.

So I am able to get the ProcessSpecificationModel, and I use that model
to get the TeamConfiguration, then use the TeamConfiguration to get the
other needed elements. I don't know if this is the right way to do or
should I parse the xmlSource and make changes using XML parser.

Again, thank you.



Kai-Uwe Maetzel wrote:
We don't provide API to manipulate process configurations. When you want
to conduct some experiments you can try to use the internal
implementation classes (which can change at any point in time). This
would look somewhat like this:

Map<String> data= projectArea.getProcessData();
IContent cnt = data.get(ProcessContentKeys.PROCESS_SPECIFICATION_KEY);
if (cnt!= null) {
String xmlSource = createStringFromContent(cnt);
ProcessSpecificationModel model = new ProcessSpecificationModel();
Exception exception= model.initialize(xmlSource);
if (exception != null) {
handleException(exception);
} else {
xmlSource = manipulate(xmlSource);
set new source to project area working copy
save project area working copy
}
}


Kai
Jazz Process team


hvlam wrote:
So I want to be able to configure the precondition/followup-actions
for a specific operations in the Team Configuration. How could I do
that programmatically?

I got a IProjectArea object and tried all getters/setters, but
couldn't find APIs to do what I want to do.

I look at the source of the ProjectAreaEditor and
ProcessConfigurationPage, but couldn't figure out how it's done.

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,938

Question asked: Jul 29 '08, 10:02 p.m.

Question was seen: 6,942 times

Last updated: Jul 29 '08, 10:02 p.m.

Confirmation Cancel Confirm