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