source: main/ikobacustom.pcn/trunk/src/ikobacustom/pcn/customers/batching.py @ 12460

Last change on this file since 12460 was 12401, checked in by Henrik Bettermann, 10 years ago

Rename PCNContract to emphasize that this contract deelas with licenses only.

  • Property svn:keywords set to Id
File size: 2.4 KB
Line 
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"""
20import grok
21from waeup.ikoba.customers.batching import (
22    CustomerProcessor,
23    CustomerDocumentProcessorBase, ContractProcessorBase)
24from ikobacustom.pcn.customers.interfaces import (
25    IPCNCustomer,
26    IPCNCustomerJPGDocument,
27    IPCNCustomerPDFDocument,
28    IPCNLicenseContract)
29from ikobacustom.pcn.interfaces import MessageFactory as _
30
31
32class 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
41class 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
50class 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
59class 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'
Note: See TracBrowser for help on using the repository browser.