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

Plugin - How to set the "configuration options" ?

Hi

I have a server side plugin for work item where the workitem synchronization, currently it does for all work item parameters I would like to give the option to users to set as to what in workitem they would like synchronization like comments , status etc

How do I set the configuration options ? I heard it is possible by writting a schema , but did not find any help on this ...

Any help would be great

Thanks & Regards
Jagadish

0 votes



5 answers

Permanent link
I have a server side plugin for work item where the workitem
synchronization, currently it does for all work item parameters I
would like to give the option to users to set as to what in workitem
they would like synchronization like comments , status etc

How do I set the configuration options ? I heard it is possible by
writting a schema , but did not find any help on this ...

Any help would be great

It depends a bit on your implementation.

1) All AbstractServices have access to their configuration properties in
the teamserver.properties file.

See e.g.:
com.ibm.team.repository.service.AbstractService.getStringConfigProperty(String)

2) If your implementation is an IOperationAdvisor, you get its
configuration passed in to the run(...) method. In the declaration of
the advisor in the plugin.xml, you can specify a schema file that
describes the possible configuration structure. The configuration itself
is part of the Process Configuration XML.

--
Regards,
Patrick
Jazz Work Item Team

0 votes


Permanent link
Hi Patrick

Many thanks for the help...

The plugin does implement IOperationAdvisor . I have writtent the schema file and also the code which can read from ProcessConfiguration.xml and get the values.

However I am stuck in not able to provide the user interface like checkbox (example like in operation behavior of Implied Properties for workitem save operation) to select, however if the user pastes the code in ProcessConfiguration xml directly as

<precondition>
<features>
<feature>
</features>
</precondition>

I am puzzled as to what's missing .. Any help will be great

Thanks
Jagadish


I have a server side plugin for work item where the workitem
synchronization, currently it does for all work item parameters I
would like to give the option to users to set as to what in workitem
they would like synchronization like comments , status etc

How do I set the configuration options ? I heard it is possible by
writting a schema , but did not find any help on this ...

Any help would be great

It depends a bit on your implementation.

1) All AbstractServices have access to their configuration properties in
the teamserver.properties file.

See e.g.:
com.ibm.team.repository.service.AbstractService.getStringConfigProperty(String)

2) If your implementation is an IOperationAdvisor, you get its
configuration passed in to the run(...) method. In the declaration of
the advisor in the plugin.xml, you can specify a schema file that
describes the possible configuration structure. The configuration itself
is part of the Process Configuration XML.

--
Regards,
Patrick
Jazz Work Item Team

0 votes


Permanent link
The plugin does implement IOperationAdvisor . I have writtent the
schema file and also the code which can read from
ProcessConfiguration.xml and get the values.

However I am stuck in not able to provide the user interface like
checkbox (example like in operation behavior of Implied Properties
for workitem save operation) to select, however if the user pastes
the code in ProcessConfiguration xml directly as

The UI is not generated from the schema (the schema provides code
completion for the XML editor and validation information).

You need an explicit implementation for the UI. A quick outline:

1) Implement a com.ibm.team.process.ide.ui.IProcessAspectEditorFactory
2) Register it via the extension point
<extension>
<factory>
</factory>
....
3) Implement a com.ibm.team.process.ide.ui.OperationDetailsAspectEditor
and return an instance of it from the factory implemented in step 1)

In the RTC source code, you can take a look at e.g.
com.ibm.team.workitem.ide.ui.internal.aspecteditor.teamoperation.ImpliedPropertiesEditor

--
Regards,
Patrick
Jazz Work Item Team

0 votes


Permanent link
Hi Patrick,

Many Thanks , it is working beautifully now :-)

Thanks & Regards
Jagadish


The plugin does implement IOperationAdvisor . I have writtent the
schema file and also the code which can read from
ProcessConfiguration.xml and get the values.

However I am stuck in not able to provide the user interface like
checkbox (example like in operation behavior of Implied Properties
for workitem save operation) to select, however if the user pastes
the code in ProcessConfiguration xml directly as

The UI is not generated from the schema (the schema provides code
completion for the XML editor and validation information).

You need an explicit implementation for the UI. A quick outline:

1) Implement a com.ibm.team.process.ide.ui.IProcessAspectEditorFactory
2) Register it via the extension point
<extension>
<factory>
</factory>
....
3) Implement a com.ibm.team.process.ide.ui.OperationDetailsAspectEditor
and return an instance of it from the factory implemented in step 1)

In the RTC source code, you can take a look at e.g.
com.ibm.team.workitem.ide.ui.internal.aspecteditor.teamoperation.ImpliedPropertiesEditor

--
Regards,
Patrick
Jazz Work Item Team

0 votes


Permanent link
hi PatricK,

I want to explore this functionality.

Any workshop / document will be helpful. I am not able to find the example source com.ibm.team.workitem.ide.ui.internal.aspecteditor.teamoperation.ImpliedPropertiesEditor in my system


Thanks in advance.

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

Question asked: Jan 18 '10, 1:53 a.m.

Question was seen: 6,614 times

Last updated: Sep 07 '12, 4:08 a.m.

Confirmation Cancel Confirm