- Timestamp:
- 28 Mar 2011, 14:03:52 (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
main/waeup.sirp/trunk/src/waeup/sirp/applicants/jambtables/container.py
r5880 r5881 21 21 ## 22 22 """ 23 Containers for university applicants.23 JAMBdata specific containers for university applicants. 24 24 """ 25 25 import grok 26 from waeup.sirp.applicants.containers import ApplicantsContainer 26 27 from waeup.sirp.applicants.interfaces import ( 27 28 IApplicantsContainer, IApplicantsContainerProvider, 28 29 ) 29 30 class ApplicantsContainer(grok.Container):31 """An applicants container contains university applicants.32 """33 grok.implements(IApplicantsContainer)34 35 title = u'Simple applicant container'36 description = u'Simple container for regular applicants'37 startdate = None38 enddate = None39 strict_deadline = True40 41 @property42 def name(self):43 return getattr(self, '__name__', None)44 45 def archive(self, app_ids=None):46 """Create on-dist archive of applicants stored in this term.47 48 If app_ids is `None`, all applicants are archived.49 50 If app_ids contains a single id string, only the respective51 applicants are archived.52 53 If app_ids contains a list of id strings all of the respective54 applicants types are saved to disk.55 """56 raise NotImplemented()57 58 def clear(self, app_ids=None, archive=True):59 """Remove applicants of type given by 'id'.60 61 Optionally archive the applicants.62 63 If id is `None`, all applicants are archived.64 65 If id contains a single id string, only the respective66 applicants are archived.67 68 If id contains a list of id strings all of the respective69 applicant types are saved to disk.70 71 If `archive` is ``False`` none of the archive-handling is done72 and respective applicants are simply removed from the73 database.74 """75 raise NotImplemented()76 30 77 31 class JAMBBasedApplicantsContainer(ApplicantsContainer): … … 82 36 """ 83 37 REQUIRES_JAMBDATA = True 84 85 class ApplicantsContainerProvider(grok.GlobalUtility):86 """A utility that provides basic applicants containers.87 """88 grok.implements(IApplicantsContainerProvider)89 grok.name('waeup.sirp.applicant.ApplicantsContainer')90 91 factory = ApplicantsContainer
Note: See TracChangeset for help on using the changeset viewer.