Index: /main/waeup.sirp/trunk/src/waeup/sirp/applicants/jambtables/container.py
===================================================================
--- /main/waeup.sirp/trunk/src/waeup/sirp/applicants/jambtables/container.py	(revision 5880)
+++ /main/waeup.sirp/trunk/src/waeup/sirp/applicants/jambtables/container.py	(revision 5880)
@@ -0,0 +1,91 @@
+##
+## container.py
+## Login : <uli@pu.smp.net>
+## Started on  Thu Jan 20 04:33:18 2011 Uli Fouquet
+## $Id$
+## 
+## Copyright (C) 2011 Uli Fouquet
+## 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
+##
+"""
+Containers for university applicants.
+"""
+import grok
+from waeup.sirp.applicants.interfaces import (
+    IApplicantsContainer, IApplicantsContainerProvider,
+    )
+
+class ApplicantsContainer(grok.Container):
+    """An applicants container contains university applicants.
+    """
+    grok.implements(IApplicantsContainer)
+
+    title = u'Simple applicant container'
+    description = u'Simple container for regular applicants'
+    startdate = None
+    enddate = None
+    strict_deadline = True
+
+    @property
+    def name(self):
+        return getattr(self, '__name__', None)
+    
+    def archive(self, app_ids=None):
+        """Create on-dist archive of applicants stored in this term.
+
+        If app_ids is `None`, all applicants are archived.
+
+        If app_ids contains a single id string, only the respective
+        applicants are archived.
+
+        If app_ids contains a list of id strings all of the respective
+        applicants types are saved to disk.
+        """
+        raise NotImplemented()
+
+    def clear(self, app_ids=None, archive=True):
+        """Remove applicants of type given by 'id'.
+
+        Optionally archive the applicants.
+        
+        If id is `None`, all applicants are archived.
+
+        If id contains a single id string, only the respective
+        applicants are archived.
+
+        If id contains a list of id strings all of the respective
+        applicant types are saved to disk.
+
+        If `archive` is ``False`` none of the archive-handling is done
+        and respective applicants are simply removed from the
+        database.
+        """
+        raise NotImplemented()
+
+class JAMBBasedApplicantsContainer(ApplicantsContainer):
+    """An applicants container contains university applicants.
+
+    For applicants added to this container JAMB data must be available
+    already.
+    """
+    REQUIRES_JAMBDATA = True
+
+class ApplicantsContainerProvider(grok.GlobalUtility):
+    """A utility that provides basic applicants containers.
+    """
+    grok.implements(IApplicantsContainerProvider)
+    grok.name('waeup.sirp.applicant.ApplicantsContainer')
+
+    factory = ApplicantsContainer
Index: /main/waeup.sirp/trunk/src/waeup/sirp/applicants/jambtables/tests/test_container.py
===================================================================
--- /main/waeup.sirp/trunk/src/waeup/sirp/applicants/jambtables/tests/test_container.py	(revision 5880)
+++ /main/waeup.sirp/trunk/src/waeup/sirp/applicants/jambtables/tests/test_container.py	(revision 5880)
@@ -0,0 +1,70 @@
+##
+## test_container.py
+## Login : <uli@pu.smp.net>
+## Started on  Thu Jan 20 09:30:37 2011 Uli Fouquet
+## $Id$
+## 
+## Copyright (C) 2011 Uli Fouquet
+## 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
+##
+"""
+Tests for applicants containers.
+"""
+import unittest
+from zope.interface.verify import verifyClass, verifyObject
+from waeup.sirp.applicants import interfaces
+from waeup.sirp.applicants.container import (
+    ApplicantsContainer, JAMBBasedApplicantsContainer,
+    )
+
+class ApplicantsContainerTestCase(unittest.TestCase):
+
+    def test_interfaces(self):
+        # Make sure the correct interfaces are implemented.
+        self.assertTrue(
+            verifyClass(
+                interfaces.IApplicantsContainer, ApplicantsContainer)
+            )
+        self.assertTrue(
+            verifyObject(
+                interfaces.IApplicantsContainer, ApplicantsContainer())
+            )
+        return
+
+class JAMBBasedApplicantsContainerTestCase(unittest.TestCase):
+
+    def test_interfaces(self):
+        # Make sure the correct interfaces are implemented.
+        self.assertTrue(
+            verifyClass(
+                interfaces.IApplicantsContainer, JAMBBasedApplicantsContainer)
+            )
+        self.assertTrue(
+            verifyObject(
+                interfaces.IApplicantsContainer, JAMBBasedApplicantsContainer())
+            )
+        return
+
+def suite():
+    suite = unittest.TestSuite()
+    for test_case in [
+        ApplicantsContainerTestCase,
+        JAMBBasedApplicantsContainerTestCase,
+        ]:
+        suite.addTests(
+            unittest.TestLoader().loadTestsFromTestCase(test_case))
+    return suite
+
+test_suite = suite
