## $Id: batching.py 8584 2012-05-31 20:34:44Z henrik $ ## ## Copyright (C) 2011 Uli Fouquet & Henrik Bettermann ## This program is free software; you can redistribute it and/or modify ## it under the terms of the GNU General Public License as published by ## the Free Software Foundation; either version 2 of the License, or ## (at your option) any later version. ## ## This program is distributed in the hope that it will be useful, ## but WITHOUT ANY WARRANTY; without even the implied warranty of ## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ## GNU General Public License for more details. ## ## You should have received a copy of the GNU General Public License ## along with this program; if not, write to the Free Software ## Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA ## """Batch processing for applicants. """ from waeup.kofa.interfaces import MessageFactory as _ from waeup.kofa.utils.batching import BatchProcessor from waeup.kofa.applicants.batching import ApplicantProcessor from waeup.fceokene.applicants.interfaces import ( ICustomApplicant, ICustomApplicantUpdateByRegNo) class CustomApplicantProcessor(ApplicantProcessor): """A batch processor for IApplicant objects. In create mode container_code is required. If application_number is given an applicant with this number is created in the designated container. If application_number is not given a random application_number is assigned. applicant_id is being determined by the system and can't be imported. In update or remove mode container_code and application_number columns must not exist. The applicant object is solely searched by its applicant_id or reg_number. """ iface = ICustomApplicant iface_byregnumber = ICustomApplicantUpdateByRegNo