source: main/waeup.sirp/trunk/src/waeup/sirp/students/interfaces.py @ 6627

Last change on this file since 6627 was 6622, checked in by Henrik Bettermann, 13 years ago

Add some basic UI stuff to start and to play with.

  • Property svn:keywords set to Id
File size: 1.4 KB
Line 
1##
2## interfaces.py
3from zope.interface import Interface
4from zope import schema
5from waeup.sirp.interfaces import IWAeUPObject
6
7class IStudent(IWAeUPObject):
8    """Representation of a student.
9    """
10    student_id = schema.TextLine(
11        title = u'Student Id',
12        default = u'None',
13        required = True,
14        )
15
16    name = schema.TextLine(
17        title = u'Name of student',
18        default = u'Nobody',
19        required = True,
20        )
21
22
23class IStudentsContainer(IWAeUPObject):
24    """An students container contains university students.
25
26    """
27
28    def archive(id=None):
29        """Create on-dist archive of students.
30
31        If id is `None`, all students are archived.
32
33        If id contains a single id string, only the respective
34        students are archived.
35
36        If id contains a list of id strings all of the respective
37        students types are saved to disk.
38        """
39
40    def clear(id=None, archive=True):
41        """Remove students of type given by 'id'.
42
43        Optionally archive the students.
44
45        If id is `None`, all students are archived.
46
47        If id contains a single id string, only the respective
48        students are archived.
49
50        If id contains a list of id strings all of the respective
51        student types are saved to disk.
52
53        If `archive` is ``False`` none of the archive-handling is done
54        and respective students are simply removed from the
55        database.
56        """
Note: See TracBrowser for help on using the repository browser.