1
0
Fork 0
mirror of https://github.com/yweber/lodel2.git synced 2025-10-29 18:49:03 +01:00
lodel2_mirror/lodel/plugin/extensions.py

33 lines
1.1 KiB
Python

## @package lodel.plugin.extensions A package to manage the Extension plugins
from lodel.context import LodelContext
LodelContext.expose_modules(globals(), {
'lodel.plugin.plugins': ['Plugin'],
'lodel.plugin.exceptions': ['PluginError', 'PluginTypeError',
'LodelScriptError', 'DatasourcePluginError'],
'lodel.validator.validator': ['Validator']})
_glob_typename = 'extension'
## @brief A class representing a basic Extension plugin
#
# This class will be extended for each plugin of this type.
class Extension(Plugin):
## @brief Specifies the settings linked to this plugin
_plist_confspecs = {
'section': 'lodel2',
'key': 'extensions',
'default': None,
'validator': Validator(
'custom_list', none_is_valid = True,
validator_name = 'plugin', validator_kwargs = {
'ptype': _glob_typename,
'none_is_valid': False})
}
## @brief A property defining the type's name of this plugin.
# By default, it's the global type name ("extension" here).
_type_conf_name = _glob_typename