It's all about the answers!

Ask a question

Plugin - How to set the "configuration options" ?


Jagadish R Rao (1062111) | asked Jan 18 '10, 1:53 a.m.
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

5 answers



permanent link
Patrick Streule (4.9k21) | answered Jan 18 '10, 4:08 a.m.
JAZZ DEVELOPER
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

permanent link
Jagadish R Rao (1062111) | answered Jan 20 '10, 6:45 a.m.
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

permanent link
Patrick Streule (4.9k21) | answered Jan 20 '10, 11:53 a.m.
JAZZ DEVELOPER
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

permanent link
Jagadish R Rao (1062111) | answered Jan 21 '10, 11:14 a.m.
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

permanent link
Muthukumar C (32712733) | answered Sep 07 '12, 4:08 a.m.
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.

Your answer


Register or to post your answer.