1 | ## $Id: batching.py 12401 2015-01-05 07:45:40Z henrik $ |
---|
2 | ## |
---|
3 | ## Copyright (C) 2011 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 | IPCNLicenseContract) |
---|
29 | from ikobacustom.pcn.interfaces import MessageFactory as _ |
---|
30 | |
---|
31 | |
---|
32 | class PCNCustomerProcessor(CustomerProcessor): |
---|
33 | """A batch processor for ICustomer objects. |
---|
34 | """ |
---|
35 | util_name = 'pcncustomerprocessor' |
---|
36 | grok.name(util_name) |
---|
37 | name = _('PCN Customer Processor') |
---|
38 | iface = IPCNCustomer |
---|
39 | |
---|
40 | |
---|
41 | class PCNCustomerJPGDocumentProcessor(CustomerDocumentProcessorBase): |
---|
42 | """A batch processor for IPCNCustomerJPGDocument objects. |
---|
43 | """ |
---|
44 | util_name = 'pcncustomerjpgdocumentprocessor' |
---|
45 | grok.name(util_name) |
---|
46 | name = _('PCN Customer JPG Document Processor') |
---|
47 | iface = IPCNCustomerJPGDocument |
---|
48 | factory_name = 'waeup.PCNCustomerJPGDocument' |
---|
49 | |
---|
50 | class PCNCustomerPDFDocumentProcessor(CustomerDocumentProcessorBase): |
---|
51 | """A batch processor for IPCNCustomerPDFDocument objects. |
---|
52 | """ |
---|
53 | util_name = 'pcncustomerpdfdocumentprocessor' |
---|
54 | grok.name(util_name) |
---|
55 | name = _('PCN Customer PDF Document Processor') |
---|
56 | iface = IPCNCustomerPDFDocument |
---|
57 | factory_name = 'waeup.PCNCustomerPDFDocument' |
---|
58 | |
---|
59 | class PCNLicenseContractProcessor(ContractProcessorBase): |
---|
60 | """A batch processor for IPCNLicenseContract objects. |
---|
61 | """ |
---|
62 | util_name = 'pcnlicensecontractprocessor' |
---|
63 | grok.name(util_name) |
---|
64 | name = _('PCN Customer Contract Processor') |
---|
65 | iface = IPCNLicenseContract |
---|
66 | factory_name = 'waeup.PCNLicenseContract' |
---|