source: main/waeup.sirp/branches/ulif-experimental-folders/src/waeup/sirp/browser/interfaces.py @ 5230

Last change on this file since 5230 was 5005, checked in by uli, 15 years ago

Fix references to academics stuff interfaces. This is the first step to make academics stuff pluggable.

File size: 1.7 KB
Line 
1"""Interfaces for viewing components.
2"""
3from zope import schema
4from zope.interface import Interface, Attribute
5from waeup.sirp.interfaces import (
6    IWAeUPObject, IUniversity, IUserContainer, IDataCenter)
7from waeup.sirp.university.interfaces import (
8    IFacultyContainer, IFaculty, IDepartment, ICourseContainer, ICourse,
9    ICertificateContainer, ICertificate, ICertificateCourse)
10
11class IBreadcrumb(Interface):
12    """Provide breadcrumbs.
13    """
14    title = schema.TextLine(
15        title = u'Context description',
16        readonly = True,
17        )
18    viewname = schema.TextLine(
19        title = u'The viewname, for which the breadcrumb is provided.',
20        readonly = True,
21        default = u'index'
22        )
23    parent_viewname = schema.TextLine(
24        title = u'The viewname of the parent to use.',
25        readonly = True,
26        default = u'index'
27        )
28    parent = Attribute("The parent object.")
29    context = Attribute("The context of the breadcrumb.")
30
31
32    def getURL(view=None):
33        """Return a URL to the breadcrumb target.
34        """
35
36class IBreadcrumbIgnorable(Interface):
37    """A marker interface for breadcrumbs that should be skipped in output.
38
39    If a breadcrumb wants to be skipped in real output (for instance,
40    because it is set on a layer in site hierarchy that should not be
41    accessed by users), it can also provide this interface. The
42    getBreadcrumbList() function defined here will exclude IIgnorables
43    by default.
44    """
45    pass
46
47class IBreadcrumbContainer(Interface):
48    """A container of breadcrumbs.
49    """
50    def __iter__():
51        """Allow iteration over the container.
52        """
53
54    def getList():
55        """Get the list of breadcrumbs as real Python list.
56        """
Note: See TracBrowser for help on using the repository browser.