vendor/Five/1.2b-r20590

view interfaces.py @ 0:3673ed425f80

Vendor import of Five 1.2b+ (r20590)
author fguillaume
date Fri, 02 Dec 2005 20:25:42 +0000
parents
children
line source
1 ##############################################################################
2 #
3 # Copyright (c) 2004, 2005 Zope Corporation and Contributors.
4 # All Rights Reserved.
5 #
6 # This software is subject to the provisions of the Zope Public License,
7 # Version 2.1 (ZPL). A copy of the ZPL should accompany this distribution.
8 # THIS SOFTWARE IS PROVIDED "AS IS" AND ANY AND ALL EXPRESS OR IMPLIED
9 # WARRANTIES ARE DISCLAIMED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
10 # WARRANTIES OF TITLE, MERCHANTABILITY, AGAINST INFRINGEMENT, AND FITNESS
11 # FOR A PARTICULAR PURPOSE.
12 #
13 ##############################################################################
14 """Five interfaces
16 $Id: interfaces.py 19416 2005-11-02 15:18:34Z efge $
17 """
18 from zope.interface import Interface
19 from zope.interface.interfaces import IInterface
21 class IBrowserDefault(Interface):
22 """Provide a hook for deciding about the default view for an object"""
24 def defaultView(self, request):
25 """Return the object to be published
26 (usually self) and a sequence of names to traverse to
27 find the method to be published.
28 """
30 class IMenuItemType(IInterface):
31 """Menu item type
33 Menu item types are interfaces that define classes of
34 menu items.
35 """
37 #
38 # BBB: Zope core interfaces for Zope 2.8
39 #
41 try:
42 import AccessControl.interfaces
43 import Acquisition.interfaces
44 import App.interfaces
45 import OFS.interfaces
46 import webdav.interfaces
48 def monkey():
49 pass
51 except ImportError:
53 def monkey():
54 import sys
55 from Products.Five.bbb import AccessControl_interfaces
56 from Products.Five.bbb import Acquisition_interfaces
57 from Products.Five.bbb import App_interfaces
58 from Products.Five.bbb import OFS_interfaces
59 from Products.Five.bbb import OFS_event
60 from Products.Five.bbb import OFS_subscribers
61 from Products.Five.bbb import webdav_interfaces
63 sys.modules['AccessControl.interfaces'] = AccessControl_interfaces
64 sys.modules['Acquisition.interfaces'] = Acquisition_interfaces
65 sys.modules['App.interfaces'] = App_interfaces
66 sys.modules['OFS.interfaces'] = OFS_interfaces
67 sys.modules['OFS.event'] = OFS_event
68 sys.modules['OFS.subscribers'] = OFS_subscribers
69 sys.modules['webdav.interfaces'] = webdav_interfaces