diff --git a/force_bdss/base_extension_plugin.py b/force_bdss/base_extension_plugin.py index 28c543d080387a3880579f67ce3c4aa44d2de50f..3627b137961a3dcea0fb44068d42abdcdd5e08e3 100644 --- a/force_bdss/base_extension_plugin.py +++ b/force_bdss/base_extension_plugin.py @@ -8,17 +8,33 @@ from force_bdss.mco.i_multi_criteria_optimizer_bundle import \ class BaseExtensionPlugin(Plugin): + """Base class for extension plugins, that is, plugins that are + provided by external contributors. + + It provides a set of slots to be populated that end up contributing + to the application extension points. To use the class, simply inherit it + in your plugin, and then define the trait default initializer for the + specific trait you want to populate. For example:: + + class MyPlugin(BaseExtensionPlugin): + def _data_source_bundles(self): + return [MyDataSourceBundle1(), + MyDataSourceBundle2()] + """ + + #: A list of available Multi Criteria Optimizers this plugin exports. mco_bundles = List( IMultiCriteriaOptimizerBundle, contributes_to='force.bdss.mco.bundles' ) - #: A list of the available Data Sources. - #: It will be populated by plugins. + #: A list of the available Data Sources this plugin exports. data_source_bundles = List( IDataSourceBundle, - contributes_to='force.bdss.data_sources.bundles') + contributes_to='force.bdss.data_sources.bundles' + ) + #: A list of the available KPI calculators this plugin exports. kpi_calculator_bundles = List( IKPICalculatorBundle, contributes_to='force.bdss.kpi_calculators.bundles'