Changeset 12267 for main/waeup.ikoba/trunk/src/waeup/ikoba/documents
- Timestamp:
- 20 Dec 2014, 15:59:04 (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
main/waeup.ikoba/trunk/src/waeup/ikoba/documents/batching.py
r12260 r12267 41 41 42 42 43 class PDFDocumentProcessor(BatchProcessor):44 """A ba tch processor for IPDFDocument objects.43 class DocumentProcessorBase(BatchProcessor): 44 """A base for batch processors for IDocument objects. 45 45 """ 46 46 grok.implements(IBatchProcessor) 47 47 grok.provides(IBatchProcessor) 48 48 grok.context(Interface) 49 util_name = 'pdfdocumentprocessor' 50 grok.name(util_name) 49 grok.baseclass() 51 50 52 name = _('Public PDF Document Processor') 53 iface = IPDFDocument 51 util_name = None 52 name = None 53 iface = None 54 54 55 55 location_fields = ['document_id',] 56 factory_name = 'waeup.PDFDocument'56 factory_name = None 57 57 58 58 additional_fields = ['class_name'] … … 98 98 """Update obj to the values given in row. 99 99 """ 100 items_changed = super( PDFDocumentProcessor, self).updateEntry(100 items_changed = super(DocumentProcessorBase, self).updateEntry( 101 101 obj, row, site, filename) 102 102 # Log actions... … … 111 111 """ 112 112 errs, inv_errs, conv_dict = super( 113 PDFDocumentProcessor, self).checkConversion(row, mode=mode)113 DocumentProcessorBase, self).checkConversion(row, mode=mode) 114 114 # We need to check if the class_name corresponds with the 115 115 # processor chosen. This is to avoid accidentally wrong imports. … … 121 121 return errs, inv_errs, conv_dict 122 122 123 class PDFDocumentProcessor(DocumentProcessorBase): 124 """A batch processor for IPDFDocument objects. 125 """ 126 util_name = 'pdfdocumentprocessor' 127 grok.name(util_name) 128 129 name = _('Public PDF Document Processor') 130 iface = IPDFDocument 131 132 factory_name = 'waeup.PDFDocument' 123 133 124 134 class HTMLDocumentProcessor(PDFDocumentProcessor):
Note: See TracChangeset for help on using the changeset viewer.