source: main/waeup.sirp/trunk/src/waeup/sirp/applicants/container.py @ 5676

Last change on this file since 5676 was 5676, checked in by Henrik Bettermann, 14 years ago

Rename applications to applicants.

File size: 2.2 KB
Line 
1##
2## container.py
3## Login : <uli@pu.smp.net>
4## Started on  Thu Jan 20 04:33:18 2011 Uli Fouquet
5## $Id$
6##
7## Copyright (C) 2011 Uli Fouquet
8## This program is free software; you can redistribute it and/or modify
9## it under the terms of the GNU General Public License as published by
10## the Free Software Foundation; either version 2 of the License, or
11## (at your option) any later version.
12##
13## This program is distributed in the hope that it will be useful,
14## but WITHOUT ANY WARRANTY; without even the implied warranty of
15## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
16## GNU General Public License for more details.
17##
18## You should have received a copy of the GNU General Public License
19## along with this program; if not, write to the Free Software
20## Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
21##
22"""
23Containers for university applicants.
24"""
25import grok
26from waeup.sirp.applicants.interfaces import IApplicantsContainer
27
28class ApplicantsContainer(grok.Container):
29    """An applicants container contains university applicants.
30    """
31    grok.implements(IApplicantsContainer)
32
33    id = None
34    title = None
35    description = None
36    startdate = None
37    enddate = None
38    strict_deadline = True
39
40    def archive(self, app_ids=None):
41        """Create on-dist archive of applicants stored in this term.
42
43        If app_ids is `None`, all applicants are archived.
44
45        If app_ids contains a single id string, only the respective
46        applicants are archived.
47
48        If app_ids contains a list of id strings all of the respective
49        applicants types are saved to disk.
50        """
51        raise NotImplemented()
52
53    def clear(self, app_ids=None, archive=True):
54        """Remove applicants of type given by 'id'.
55
56        Optionally archive the applicants.
57       
58        If id is `None`, all applicants are archived.
59
60        If id contains a single id string, only the respective
61        applicants are archived.
62
63        If id contains a list of id strings all of the respective
64        applicant types are saved to disk.
65
66        If `archive` is ``False`` none of the archive-handling is done
67        and respective applicants are simply removed from the
68        database.
69        """
70        raise NotImplemented()
Note: See TracBrowser for help on using the repository browser.