Ignore:
Timestamp:
22 Apr 2015, 19:14:14 (12 years ago)
Author:
Henrik Bettermann
Message:

Start documenting batch processors.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • main/waeup.kofa/trunk/src/waeup/kofa/utils/batching.py

    r12868 r12869  
    5656
    5757    # Internal name...
    58     util_name = 'baseprocessor'
     58    util_name = ''
    5959
    6060    # Items for this processor need an interface with zope.schema fields.
    … …  
    6666
    6767    # Headers needed to locate items...
    68     location_fields = ['code', 'faculty_code']
     68    location_fields = []
    6969
    7070    # A factory with this name must be registered...
    71     factory_name = 'waeup.Department'
     71    factory_name = ''
    7272
    7373    @property
    … …  
    128128    def applyMapping(self, row, mapping):
    129129        """Apply mapping to a row of CSV data.
    130 
    131130        """
    132131        result = dict()
    … …  
    284283    def doImport(self, path, headerfields, mode='create', user='Unknown',
    285284                 logger=None, ignore_empty=True):
    286         """In contrast to most other methods, ``doImport`` is not supposed to
     285        """In contrast to most other methods, `doImport` is not supposed to
    287286        be customized, neither in custom packages nor in derived batch
    288287        processor classes. Therefore, this is the only place where we
    … …  
    317316           record is stored in the pending data file.
    318317
    319            Now ``doImport`` tries to add the new object with the data
     318           Now `doImport` tries to add the new object with the data
    320319           from the conversion dictionary. In some cases this
    321            may fail and a DuplicationError is raised. For example, a new
     320           may fail and a `DuplicationError` is raised. For example, a new
    322321           payment ticket is created but the same payment for same session
    323322           has already been made. In this case the object id is unique, no
    … …  
    339338           transitions or states.
    340339
    341            Finally, ``doImport`` updates the existing object with the data
     340           Finally, `doImport` updates the existing object with the data
    342341           from the conversion dictionary.
    343342
    … …  
    348347           stored in the pending data file.
    349348
    350            Finally, ``doImport`` removes the existing object.
     349           Finally, `doImport` removes the existing object.
    351350
    352351        """
Note: See TracChangeset for help on using the changeset viewer.