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
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
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
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
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
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
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
Hi Patrick,
Many Thanks , it is working beautifully now :-)
Thanks & Regards
Jagadish
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
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