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

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

Add viewlet manager 'StudentSitebar?' which is rendered in a block above the LeftSidebar? viewlet manager block. This viewlet manager replaces the plain action buttons recently implemented.

  • Property svn:keywords set to Id
File size: 2.9 KB
Line 
1##
2## interfaces.py
3from zope.interface import Interface, Attribute
4from zope import schema
5from waeup.sirp.interfaces import IWAeUPObject
6
7class IStudentNavigation(IWAeUPObject):
8    """Interface needed for student navigation.
9    """
10
11    def getStudent():
12        """Return student object.
13        """
14
15class IStudentBase(IWAeUPObject):
16    """Representation of student base data.
17    """
18    history = Attribute('Object history, a list of messages.')
19    state = Attribute('Returns the registration state of a student')
20
21    def loggerInfo(ob_class, comment):
22        """Adds an INFO message to the log file
23        """
24
25    student_id = schema.TextLine(
26        title = u'Student Id',
27        default = u'None',
28        required = True,
29        )
30
31    name = schema.TextLine(
32        title = u'Full Name',
33        default = u'Nobody',
34        required = True,
35        )
36
37class IStudentClearance(IWAeUPObject):
38    """Representation of student clearance data.
39    """
40
41    date_of_birth = schema.Date(
42        title = u'Date of Birth',
43        required = True,
44        )
45
46class IStudentPersonal(IWAeUPObject):
47    """Representation of student personal data.
48    """
49
50    perm_address = schema.Date(
51        title = u'Permanent Address',
52        required = False,
53        )
54
55class IStudent(IStudentBase,IStudentClearance,IStudentPersonal):
56    """Representation of a student.
57    """
58
59class IStudentsContainer(IWAeUPObject):
60    """An students container contains university students.
61
62    """
63
64    def addStudent(student):
65        """Add an IStudent object and subcontainers.
66
67        """
68
69    def archive(id=None):
70        """Create on-dist archive of students.
71
72        If id is `None`, all students are archived.
73
74        If id contains a single id string, only the respective
75        students are archived.
76
77        If id contains a list of id strings all of the respective
78        students types are saved to disk.
79        """
80
81    def clear(id=None, archive=True):
82        """Remove students of type given by 'id'.
83
84        Optionally archive the students.
85
86        If id is `None`, all students are archived.
87
88        If id contains a single id string, only the respective
89        students are archived.
90
91        If id contains a list of id strings all of the respective
92        student types are saved to disk.
93
94        If `archive` is ``False`` none of the archive-handling is done
95        and respective students are simply removed from the
96        database.
97        """
98
99class IStudentStudyCourse(IWAeUPObject):
100    """A container for student study levels.
101
102    """
103
104    certificate_code = schema.TextLine(
105        title = u'Certificate Code',
106        default = u'None',
107        required = True,
108        )
109
110class IStudentAccommodation(IWAeUPObject):
111    """A container for student accommodation objects.
112
113    """
114
115class IStudentPayments(IWAeUPObject):
116    """A container for student payment objects.
117
118    """
119
Note: See TracBrowser for help on using the repository browser.