blob: c8478aa0f27e9af001dad7d2b84309fc7bc2163f (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
|
##############################################################################
#
# Copyright (c) 2003 Zope Corporation and Contributors.
# All Rights Reserved.
#
# This software is subject to the provisions of the Zope Public License,
# Version 2.1 (ZPL). A copy of the ZPL should accompany this distribution.
# THIS SOFTWARE IS PROVIDED "AS IS" AND ANY AND ALL EXPRESS OR IMPLIED
# WARRANTIES ARE DISCLAIMED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
# WARRANTIES OF TITLE, MERCHANTABILITY, AGAINST INFRINGEMENT, AND FITNESS
# FOR A PARTICULAR PURPOSE.
#
##############################################################################
"""Location framework interfaces
$Id$
"""
__docformat__ = 'restructuredtext'
from zope.interface import Interface, Attribute
from zope import schema
class ILocation(Interface):
"""Objects that have a structural location"""
__parent__ = Attribute("The parent in the location hierarchy")
__name__ = schema.TextLine(
title=u"The name within the parent",
description=u"Traverse the parent with this name to get the object.",
required=False,
default=None)
class ISublocations(Interface):
"""Provide access to sublocations."""
def sublocations():
"""Return sublocations
An iterable of objects whose __parent__ is the object
providing the interface is returned.
"""
class IPossibleSite(Interface):
"""An object that could be a site
"""
def setSiteManager(sitemanager):
"""Sets the site manager for this object.
"""
def getSiteManager():
"""Returns the site manager contained in this object.
If there isn't a site manager, raise a component lookup.
"""
class ISite(IPossibleSite):
"""Marker interface to indicate that we have a site"""
|