Changeset 4831 for waeup/branches
- Timestamp:
- 16 Jan 2010, 13:18:45 (15 years ago)
- 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 31 31 from zope.session.interfaces import ISession 32 32 33 from waeup.interfaces import I Importer33 from waeup.interfaces import IBatchProcessor 34 34 from zope.component import getAllUtilitiesRegisteredFor 35 35 … … 385 385 386 386 def getImporters(self): 387 importers = getAllUtilitiesRegisteredFor(I Importer)387 importers = getAllUtilitiesRegisteredFor(IBatchProcessor) 388 388 importers = [ 389 389 dict(title=x.name, name=x.util_name) for x in importers] … … 504 504 return 505 505 506 self.importer = getUtility(I Importer, name=self.importername)506 self.importer = getUtility(IBatchProcessor, name=self.importername) 507 507 self.reader = csv.DictReader(open(self.fullpath, 'rb')) 508 508 … … 541 541 542 542 self.fullpath = os.path.join(self.context.storage, self.filename) 543 self.importer = getUtility(I Importer, name=self.importername)543 self.importer = getUtility(IBatchProcessor, name=self.importername) 544 544 (linenum, warnings) = self.importer.doImport( 545 545 self.fullpath, self.headerfields, self.mode, -
waeup/branches/ulif-importers/src/waeup/interfaces.py
r4830 r4831 355 355 """ 356 356 357 class I Importer(Interface):358 """A CSV file importer.357 class IBatchProcessor(Interface): 358 """A batch processor that handles mass-operations. 359 359 """ 360 360 name = schema.TextLine( -
waeup/branches/ulif-importers/src/waeup/utils/batching.py
r4829 r4831 13 13 from zope.schema import getFields 14 14 from zope.schema.interfaces import IText 15 from waeup.interfaces import (I Importer, IFacultyContainer, IFaculty, ICourse,16 I Department, ICertificate, ISchemaTypeConverter,17 FatalCSVError)15 from waeup.interfaces import (IBatchProcessor, IFacultyContainer, IFaculty, 16 ICourse, IDepartment, ICertificate, 17 ISchemaTypeConverter, FatalCSVError) 18 18 19 19 class BatchProcessor(grok.GlobalUtility): … … 22 22 This is a non-active baseclass. 23 23 """ 24 grok.provides(I Importer)24 grok.provides(IBatchProcessor) 25 25 grok.context(Interface) 26 26 grok.baseclass() … … 266 266 """A batch processor for IFaculty objects. 267 267 """ 268 grok.provides(I Importer)268 grok.provides(IBatchProcessor) 269 269 grok.context(Interface) 270 270 util_name = 'facultyimporter' … … 305 305 """A batch processor for IDepartment objects. 306 306 """ 307 grok.provides(I Importer)307 grok.provides(IBatchProcessor) 308 308 grok.context(Interface) 309 309 util_name = 'departmentimporter' … … 349 349 """A batch processor for ICourse objects. 350 350 """ 351 grok.provides(I Importer)351 grok.provides(IBatchProcessor) 352 352 grok.context(Interface) 353 353 util_name = 'courseimporter' … … 397 397 """A batch processor for ICertificate objects. 398 398 """ 399 grok.provides(I Importer)399 grok.provides(IBatchProcessor) 400 400 grok.context(Interface) 401 401 util_name = 'certificateimporter'
Note: See TracChangeset for help on using the changeset viewer.