[12286] | 1 | ## $Id: batching.py 12591 2015-02-11 10:44:28Z 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, |
---|
[12571] | 29 | IROPContract, |
---|
[12591] | 30 | IRPRContract, |
---|
| 31 | IRPCContract) |
---|
[12371] | 32 | from ikobacustom.pcn.interfaces import MessageFactory as _ |
---|
[12274] | 33 | |
---|
| 34 | |
---|
[12371] | 35 | class PCNCustomerProcessor(CustomerProcessor): |
---|
[12284] | 36 | """A batch processor for ICustomer objects. |
---|
| 37 | """ |
---|
[12371] | 38 | util_name = 'pcncustomerprocessor' |
---|
[12284] | 39 | grok.name(util_name) |
---|
[12371] | 40 | name = _('PCN Customer Processor') |
---|
| 41 | iface = IPCNCustomer |
---|
[12284] | 42 | |
---|
| 43 | |
---|
[12384] | 44 | class PCNCustomerJPGDocumentProcessor(CustomerDocumentProcessorBase): |
---|
| 45 | """A batch processor for IPCNCustomerJPGDocument objects. |
---|
[12274] | 46 | """ |
---|
[12384] | 47 | util_name = 'pcncustomerjpgdocumentprocessor' |
---|
[12274] | 48 | grok.name(util_name) |
---|
[12384] | 49 | name = _('PCN Customer JPG Document Processor') |
---|
| 50 | iface = IPCNCustomerJPGDocument |
---|
| 51 | factory_name = 'waeup.PCNCustomerJPGDocument' |
---|
[12274] | 52 | |
---|
[12384] | 53 | class PCNCustomerPDFDocumentProcessor(CustomerDocumentProcessorBase): |
---|
| 54 | """A batch processor for IPCNCustomerPDFDocument objects. |
---|
| 55 | """ |
---|
| 56 | util_name = 'pcncustomerpdfdocumentprocessor' |
---|
| 57 | grok.name(util_name) |
---|
| 58 | name = _('PCN Customer PDF Document Processor') |
---|
| 59 | iface = IPCNCustomerPDFDocument |
---|
| 60 | factory_name = 'waeup.PCNCustomerPDFDocument' |
---|
[12274] | 61 | |
---|
[12484] | 62 | class RONContractProcessor(ContractProcessorBase): |
---|
| 63 | """A batch processor for IRONContract objects. |
---|
[12274] | 64 | """ |
---|
[12484] | 65 | util_name = 'roncontractprocessor' |
---|
[12274] | 66 | grok.name(util_name) |
---|
[12499] | 67 | name = _('Retention of Name Contract Processor') |
---|
[12484] | 68 | iface = IRONContract |
---|
[12499] | 69 | factory_name = 'waeup.RONContract' |
---|
| 70 | |
---|
| 71 | class ROPContractProcessor(ContractProcessorBase): |
---|
| 72 | """A batch processor for IROPContract objects. |
---|
| 73 | """ |
---|
| 74 | util_name = 'ropcontractprocessor' |
---|
| 75 | grok.name(util_name) |
---|
| 76 | name = _('Registration of Premises Contract Processor') |
---|
| 77 | iface = IROPContract |
---|
[12571] | 78 | factory_name = 'waeup.ROPContract' |
---|
| 79 | |
---|
| 80 | class RPRContractProcessor(ContractProcessorBase): |
---|
| 81 | """A batch processor for IRPRContract objects. |
---|
| 82 | """ |
---|
| 83 | util_name = 'rprcontractprocessor' |
---|
| 84 | grok.name(util_name) |
---|
| 85 | name = _('Registration in the Provisional Register Contract Processor') |
---|
| 86 | iface = IRPRContract |
---|
[12591] | 87 | factory_name = 'waeup.RPRContract' |
---|
| 88 | |
---|
| 89 | class RPCContractProcessor(ContractProcessorBase): |
---|
| 90 | """A batch processor for IRPRContract objects. |
---|
| 91 | """ |
---|
| 92 | util_name = 'rpccontractprocessor' |
---|
| 93 | grok.name(util_name) |
---|
| 94 | name = _('Registration as Pharmaceutical Chemist Contract Processor') |
---|
| 95 | iface = IRPCContract |
---|
| 96 | factory_name = 'waeup.RPCContract' |
---|