Ignore:
Timestamp:
10 May 2024, 13:49:33 (8 months ago)
Author:
Henrik Bettermann
Message:

Add custom exporter.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • main/kofacustom.iuokada/trunk/src/kofacustom/iuokada/configuration.py

    r15563 r17756  
    2121import grok
    2222from zope.interface import implementedBy
    23 from waeup.kofa.utils.helpers import attrs_to_fields
     23from waeup.kofa.utils.helpers import attrs_to_fields, iface_names
    2424from waeup.kofa.configuration import (
    25     SessionConfigurationFactory, SessionConfiguration)
     25    SessionConfigurationFactory, SessionConfiguration,
     26    ConfigurationProcessor, ConfigurationExporter)
    2627from kofacustom.iuokada.interfaces import (
    2728    ICustomSessionConfiguration, ICustomSessionConfigurationAdd)
     
    4647    def getInterfaces(self):
    4748        return implementedBy(CustomSessionConfiguration)
     49
     50class CustomConfigurationExporter(ConfigurationExporter):
     51    """The Configuration Exporter exports all configuration data. It iterates over all
     52    objects of the ``configuration`` container.
     53    """
     54    fields = tuple(sorted(iface_names(ICustomSessionConfiguration)))
     55
     56class CustomConfigurationProcessor(ConfigurationProcessor):
     57    """The Configuration Processor processes session configuration objects in
     58    the ``configuration`` container.
     59
     60    """
     61    iface = ICustomSessionConfiguration
     62
Note: See TracChangeset for help on using the changeset viewer.