1 | ## $Id: batching.py 12591 2015-02-11 10:44:28Z henrik $ |
---|
2 | ## |
---|
3 | ## Copyright (C) 2014 Uli Fouquet & Henrik Bettermann |
---|
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 | ## |
---|
18 | """Batch processing for pcn documents. |
---|
19 | """ |
---|
20 | import grok |
---|
21 | from waeup.ikoba.customers.batching import ( |
---|
22 | CustomerProcessor, |
---|
23 | CustomerDocumentProcessorBase, ContractProcessorBase) |
---|
24 | from ikobacustom.pcn.customers.interfaces import ( |
---|
25 | IPCNCustomer, |
---|
26 | IPCNCustomerJPGDocument, |
---|
27 | IPCNCustomerPDFDocument, |
---|
28 | IRONContract, |
---|
29 | IROPContract, |
---|
30 | IRPRContract, |
---|
31 | IRPCContract) |
---|
32 | from ikobacustom.pcn.interfaces import MessageFactory as _ |
---|
33 | |
---|
34 | |
---|
35 | class PCNCustomerProcessor(CustomerProcessor): |
---|
36 | """A batch processor for ICustomer objects. |
---|
37 | """ |
---|
38 | util_name = 'pcncustomerprocessor' |
---|
39 | grok.name(util_name) |
---|
40 | name = _('PCN Customer Processor') |
---|
41 | iface = IPCNCustomer |
---|
42 | |
---|
43 | |
---|
44 | class PCNCustomerJPGDocumentProcessor(CustomerDocumentProcessorBase): |
---|
45 | """A batch processor for IPCNCustomerJPGDocument objects. |
---|
46 | """ |
---|
47 | util_name = 'pcncustomerjpgdocumentprocessor' |
---|
48 | grok.name(util_name) |
---|
49 | name = _('PCN Customer JPG Document Processor') |
---|
50 | iface = IPCNCustomerJPGDocument |
---|
51 | factory_name = 'waeup.PCNCustomerJPGDocument' |
---|
52 | |
---|
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' |
---|
61 | |
---|
62 | class RONContractProcessor(ContractProcessorBase): |
---|
63 | """A batch processor for IRONContract objects. |
---|
64 | """ |
---|
65 | util_name = 'roncontractprocessor' |
---|
66 | grok.name(util_name) |
---|
67 | name = _('Retention of Name Contract Processor') |
---|
68 | iface = IRONContract |
---|
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 |
---|
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 |
---|
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' |
---|