Changeset 4831 for waeup/branches


Ignore:
Timestamp:
16 Jan 2010, 13:18:45 (15 years ago)
Author:
uli
Message:

Rename IImporter to IBatchProcessor

Location:
waeup/branches/ulif-importers/src/waeup
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • waeup/branches/ulif-importers/src/waeup/browser/pages.py

    r4823 r4831  
    3131from zope.session.interfaces import ISession
    3232
    33 from waeup.interfaces import IImporter
     33from waeup.interfaces import IBatchProcessor
    3434from zope.component import getAllUtilitiesRegisteredFor
    3535
     
    385385
    386386    def getImporters(self):
    387         importers = getAllUtilitiesRegisteredFor(IImporter)
     387        importers = getAllUtilitiesRegisteredFor(IBatchProcessor)
    388388        importers = [
    389389            dict(title=x.name, name=x.util_name) for x in importers]
     
    504504            return
    505505       
    506         self.importer = getUtility(IImporter, name=self.importername)
     506        self.importer = getUtility(IBatchProcessor, name=self.importername)
    507507        self.reader = csv.DictReader(open(self.fullpath, 'rb'))
    508508
     
    541541
    542542        self.fullpath = os.path.join(self.context.storage, self.filename)
    543         self.importer = getUtility(IImporter, name=self.importername)
     543        self.importer = getUtility(IBatchProcessor, name=self.importername)
    544544        (linenum, warnings) = self.importer.doImport(
    545545            self.fullpath, self.headerfields, self.mode,
  • waeup/branches/ulif-importers/src/waeup/interfaces.py

    r4830 r4831  
    355355        """
    356356
    357 class IImporter(Interface):
    358     """A CSV file importer.
     357class IBatchProcessor(Interface):
     358    """A batch processor that handles mass-operations.
    359359    """
    360360    name = schema.TextLine(
  • waeup/branches/ulif-importers/src/waeup/utils/batching.py

    r4829 r4831  
    1313from zope.schema import getFields
    1414from zope.schema.interfaces import IText
    15 from waeup.interfaces import (IImporter, IFacultyContainer, IFaculty, ICourse,
    16                               IDepartment, ICertificate, ISchemaTypeConverter,
    17                               FatalCSVError)
     15from waeup.interfaces import (IBatchProcessor, IFacultyContainer, IFaculty,
     16                              ICourse, IDepartment, ICertificate,
     17                              ISchemaTypeConverter, FatalCSVError)
    1818
    1919class BatchProcessor(grok.GlobalUtility):
     
    2222    This is a non-active baseclass.
    2323    """
    24     grok.provides(IImporter)
     24    grok.provides(IBatchProcessor)
    2525    grok.context(Interface)
    2626    grok.baseclass()
     
    266266    """A batch processor for IFaculty objects.
    267267    """
    268     grok.provides(IImporter)
     268    grok.provides(IBatchProcessor)
    269269    grok.context(Interface)
    270270    util_name = 'facultyimporter'
     
    305305    """A batch processor for IDepartment objects.
    306306    """
    307     grok.provides(IImporter)
     307    grok.provides(IBatchProcessor)
    308308    grok.context(Interface)
    309309    util_name = 'departmentimporter'
     
    349349    """A batch processor for ICourse objects.
    350350    """
    351     grok.provides(IImporter)
     351    grok.provides(IBatchProcessor)
    352352    grok.context(Interface)
    353353    util_name = 'courseimporter'
     
    397397    """A batch processor for ICertificate objects.
    398398    """
    399     grok.provides(IImporter)
     399    grok.provides(IBatchProcessor)
    400400    grok.context(Interface)
    401401    util_name = 'certificateimporter'
Note: See TracChangeset for help on using the changeset viewer.