1 | ## $Id: batching.py 12615 2015-02-14 08:55:35Z 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 | IIPPMVLContract, |
---|
33 | IRPPMVLContract, |
---|
34 | IAPPITContract, |
---|
35 | IRPTContract |
---|
36 | ) |
---|
37 | from ikobacustom.pcn.interfaces import MessageFactory as _ |
---|
38 | |
---|
39 | |
---|
40 | class PCNCustomerProcessor(CustomerProcessor): |
---|
41 | """A batch processor for ICustomer objects. |
---|
42 | """ |
---|
43 | util_name = 'pcncustomerprocessor' |
---|
44 | grok.name(util_name) |
---|
45 | name = _('PCN Customer Processor') |
---|
46 | iface = IPCNCustomer |
---|
47 | |
---|
48 | |
---|
49 | class PCNCustomerJPGDocumentProcessor(CustomerDocumentProcessorBase): |
---|
50 | """A batch processor for IPCNCustomerJPGDocument objects. |
---|
51 | """ |
---|
52 | util_name = 'pcncustomerjpgdocumentprocessor' |
---|
53 | grok.name(util_name) |
---|
54 | name = _('PCN Customer JPG Document Processor') |
---|
55 | iface = IPCNCustomerJPGDocument |
---|
56 | factory_name = 'waeup.PCNCustomerJPGDocument' |
---|
57 | |
---|
58 | class PCNCustomerPDFDocumentProcessor(CustomerDocumentProcessorBase): |
---|
59 | """A batch processor for IPCNCustomerPDFDocument objects. |
---|
60 | """ |
---|
61 | util_name = 'pcncustomerpdfdocumentprocessor' |
---|
62 | grok.name(util_name) |
---|
63 | name = _('PCN Customer PDF Document Processor') |
---|
64 | iface = IPCNCustomerPDFDocument |
---|
65 | factory_name = 'waeup.PCNCustomerPDFDocument' |
---|
66 | |
---|
67 | class RONContractProcessor(ContractProcessorBase): |
---|
68 | """A batch processor for IRONContract objects. |
---|
69 | """ |
---|
70 | util_name = 'roncontractprocessor' |
---|
71 | grok.name(util_name) |
---|
72 | name = _('Retention of Name Contract Processor') |
---|
73 | iface = IRONContract |
---|
74 | factory_name = 'waeup.RONContract' |
---|
75 | |
---|
76 | class ROPContractProcessor(ContractProcessorBase): |
---|
77 | """A batch processor for IROPContract objects. |
---|
78 | """ |
---|
79 | util_name = 'ropcontractprocessor' |
---|
80 | grok.name(util_name) |
---|
81 | name = _('Registration of Premises Contract Processor') |
---|
82 | iface = IROPContract |
---|
83 | factory_name = 'waeup.ROPContract' |
---|
84 | |
---|
85 | class RPRContractProcessor(ContractProcessorBase): |
---|
86 | """A batch processor for IRPRContract objects. |
---|
87 | """ |
---|
88 | util_name = 'rprcontractprocessor' |
---|
89 | grok.name(util_name) |
---|
90 | name = _('Registration in the Provisional Register Contract Processor') |
---|
91 | iface = IRPRContract |
---|
92 | factory_name = 'waeup.RPRContract' |
---|
93 | |
---|
94 | class RPCContractProcessor(ContractProcessorBase): |
---|
95 | """A batch processor for IRPRContract objects. |
---|
96 | """ |
---|
97 | util_name = 'rpccontractprocessor' |
---|
98 | grok.name(util_name) |
---|
99 | name = _('Registration as Pharmaceutical Chemist Contract Processor') |
---|
100 | iface = IRPCContract |
---|
101 | factory_name = 'waeup.RPCContract' |
---|
102 | |
---|
103 | class IPPMVLContractProcessor(ContractProcessorBase): |
---|
104 | """A batch processor for IIPPMVLContract objects. |
---|
105 | """ |
---|
106 | util_name = 'ippmvlcontractprocessor' |
---|
107 | grok.name(util_name) |
---|
108 | name = _('Issuance of Patent and Proprietary Medicines Vendors License (Contract) Processor') |
---|
109 | iface = IIPPMVLContract |
---|
110 | factory_name = 'waeup.IPPMVLContract' |
---|
111 | |
---|
112 | class RPPMVLContractProcessor(ContractProcessorBase): |
---|
113 | """A batch processor for IRPPMVLContract objects. |
---|
114 | """ |
---|
115 | util_name = 'rppmvlcontractprocessor' |
---|
116 | grok.name(util_name) |
---|
117 | name = _('Renewal of Patent and Proprietary Medicines Vendors License (Contract) Processor') |
---|
118 | iface = IRPPMVLContract |
---|
119 | factory_name = 'waeup.RPPMVLContract' |
---|
120 | |
---|
121 | class APPITContractProcessor(ContractProcessorBase): |
---|
122 | """A batch processor for IAPPITContract objects. |
---|
123 | """ |
---|
124 | util_name = 'appitcontractprocessor' |
---|
125 | grok.name(util_name) |
---|
126 | name = _('Accepting Pupil Pharmacist for Internship Training (Contract) Processor') |
---|
127 | iface = IAPPITContract |
---|
128 | factory_name = 'waeup.APPITContract' |
---|
129 | |
---|
130 | class RPTContractProcessor(ContractProcessorBase): |
---|
131 | """A batch processor for IRPTContract objects. |
---|
132 | """ |
---|
133 | util_name = 'rptcontractprocessor' |
---|
134 | grok.name(util_name) |
---|
135 | name = _('Registration as a Pharmacy Technician (Contract) Processor') |
---|
136 | iface = IRPTContract |
---|
137 | factory_name = 'waeup.RPTContract' |
---|