## ## interfaces.py from zope.interface import Interface from zope import schema from waeup.sirp.interfaces import IWAeUPObject class IStudent(IWAeUPObject): """Representation of a student. """ student_id = schema.TextLine( title = u'Student Id', default = u'None', required = True, ) name = schema.TextLine( title = u'Name of student', default = u'Nobody', required = True, ) class IStudentsContainer(IWAeUPObject): """An students container contains university students. """ def archive(id=None): """Create on-dist archive of students. If id is `None`, all students are archived. If id contains a single id string, only the respective students are archived. If id contains a list of id strings all of the respective students types are saved to disk. """ def clear(id=None, archive=True): """Remove students of type given by 'id'. Optionally archive the students. If id is `None`, all students are archived. If id contains a single id string, only the respective students are archived. If id contains a list of id strings all of the respective student types are saved to disk. If `archive` is ``False`` none of the archive-handling is done and respective students are simply removed from the database. """