[12286] | 1 | ## $Id: batching.py 12499 2015-01-20 08:31:25Z henrik $ |
---|
[12274] | 2 | ## |
---|
[12493] | 3 | ## Copyright (C) 2014 Uli Fouquet & Henrik Bettermann |
---|
[12274] | 4 | ## This program is free software; you can redistribute it and/or modify |
---|
| 5 | ## it under the terms of the GNU General Public License as published by |
---|
| 6 | ## the Free Software Foundation; either version 2 of the License, or |
---|
| 7 | ## (at your option) any later version. |
---|
| 8 | ## |
---|
| 9 | ## This program is distributed in the hope that it will be useful, |
---|
| 10 | ## but WITHOUT ANY WARRANTY; without even the implied warranty of |
---|
| 11 | ## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
---|
| 12 | ## GNU General Public License for more details. |
---|
| 13 | ## |
---|
| 14 | ## You should have received a copy of the GNU General Public License |
---|
| 15 | ## along with this program; if not, write to the Free Software |
---|
| 16 | ## Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
---|
| 17 | ## |
---|
[12371] | 18 | """Batch processing for pcn documents. |
---|
[12274] | 19 | """ |
---|
| 20 | import grok |
---|
| 21 | from waeup.ikoba.customers.batching import ( |
---|
[12284] | 22 | CustomerProcessor, |
---|
| 23 | CustomerDocumentProcessorBase, ContractProcessorBase) |
---|
[12371] | 24 | from ikobacustom.pcn.customers.interfaces import ( |
---|
| 25 | IPCNCustomer, |
---|
[12384] | 26 | IPCNCustomerJPGDocument, |
---|
| 27 | IPCNCustomerPDFDocument, |
---|
[12499] | 28 | IRONContract, |
---|
| 29 | IROPContract) |
---|
[12371] | 30 | from ikobacustom.pcn.interfaces import MessageFactory as _ |
---|
[12274] | 31 | |
---|
| 32 | |
---|
[12371] | 33 | class PCNCustomerProcessor(CustomerProcessor): |
---|
[12284] | 34 | """A batch processor for ICustomer objects. |
---|
| 35 | """ |
---|
[12371] | 36 | util_name = 'pcncustomerprocessor' |
---|
[12284] | 37 | grok.name(util_name) |
---|
[12371] | 38 | name = _('PCN Customer Processor') |
---|
| 39 | iface = IPCNCustomer |
---|
[12284] | 40 | |
---|
| 41 | |
---|
[12384] | 42 | class PCNCustomerJPGDocumentProcessor(CustomerDocumentProcessorBase): |
---|
| 43 | """A batch processor for IPCNCustomerJPGDocument objects. |
---|
[12274] | 44 | """ |
---|
[12384] | 45 | util_name = 'pcncustomerjpgdocumentprocessor' |
---|
[12274] | 46 | grok.name(util_name) |
---|
[12384] | 47 | name = _('PCN Customer JPG Document Processor') |
---|
| 48 | iface = IPCNCustomerJPGDocument |
---|
| 49 | factory_name = 'waeup.PCNCustomerJPGDocument' |
---|
[12274] | 50 | |
---|
[12384] | 51 | class PCNCustomerPDFDocumentProcessor(CustomerDocumentProcessorBase): |
---|
| 52 | """A batch processor for IPCNCustomerPDFDocument objects. |
---|
| 53 | """ |
---|
| 54 | util_name = 'pcncustomerpdfdocumentprocessor' |
---|
| 55 | grok.name(util_name) |
---|
| 56 | name = _('PCN Customer PDF Document Processor') |
---|
| 57 | iface = IPCNCustomerPDFDocument |
---|
| 58 | factory_name = 'waeup.PCNCustomerPDFDocument' |
---|
[12274] | 59 | |
---|
[12484] | 60 | class RONContractProcessor(ContractProcessorBase): |
---|
| 61 | """A batch processor for IRONContract objects. |
---|
[12274] | 62 | """ |
---|
[12484] | 63 | util_name = 'roncontractprocessor' |
---|
[12274] | 64 | grok.name(util_name) |
---|
[12499] | 65 | name = _('Retention of Name Contract Processor') |
---|
[12484] | 66 | iface = IRONContract |
---|
[12499] | 67 | factory_name = 'waeup.RONContract' |
---|
| 68 | |
---|
| 69 | class ROPContractProcessor(ContractProcessorBase): |
---|
| 70 | """A batch processor for IROPContract objects. |
---|
| 71 | """ |
---|
| 72 | util_name = 'ropcontractprocessor' |
---|
| 73 | grok.name(util_name) |
---|
| 74 | name = _('Registration of Premises Contract Processor') |
---|
| 75 | iface = IROPContract |
---|
| 76 | factory_name = 'waeup.ROPContract' |
---|