No Description
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

extensions.py 1.1KB

123456789101112131415161718192021222324252627282930313233
  1. ## @package lodel.plugin.extensions A package to manage the Extension plugins
  2. from lodel.context import LodelContext
  3. LodelContext.expose_modules(globals(), {
  4. 'lodel.plugin.plugins': ['Plugin'],
  5. 'lodel.plugin.exceptions': ['PluginError', 'PluginTypeError',
  6. 'LodelScriptError', 'DatasourcePluginError'],
  7. 'lodel.validator.validator': ['Validator']})
  8. _glob_typename = 'extension'
  9. ## @brief A class representing a basic Extension plugin
  10. #
  11. # This class will be extended for each plugin of this type.
  12. class Extension(Plugin):
  13. ## @brief Specifies the settings linked to this plugin
  14. _plist_confspecs = {
  15. 'section': 'lodel2',
  16. 'key': 'extensions',
  17. 'default': None,
  18. 'validator': Validator(
  19. 'custom_list', none_is_valid = True,
  20. validator_name = 'plugin', validator_kwargs = {
  21. 'ptype': _glob_typename,
  22. 'none_is_valid': False})
  23. }
  24. ## @brief A property defining the type's name of this plugin.
  25. # By default, it's the global type name ("extension" here).
  26. _type_conf_name = _glob_typename