[Zope3-checkins] SVN: Zope3/trunk/src/zope/app/publication/interfaces.py Changed before-traversal events to be object events.

Jim Fulton jim at zope.com
Tue Feb 22 19:04:52 EST 2005


Log message for revision 29251:
  Changed before-traversal events to be object events.
  

Changed:
  U   Zope3/trunk/src/zope/app/publication/interfaces.py

-=-
Modified: Zope3/trunk/src/zope/app/publication/interfaces.py
===================================================================
--- Zope3/trunk/src/zope/app/publication/interfaces.py	2005-02-22 22:55:50 UTC (rev 29250)
+++ Zope3/trunk/src/zope/app/publication/interfaces.py	2005-02-23 00:04:52 UTC (rev 29251)
@@ -17,9 +17,10 @@
 """
 __docformat__ = 'restructuredtext'
 
-from zope.interface import implements, Interface
+from zope import interface
+import zope.app.event.interfaces
 
-class IPublicationRequestFactory(Interface):
+class IPublicationRequestFactory(interface.Interface):
     """Publication request factory"""
 
     def __call__(input_stream, output_steam, env):
@@ -28,31 +29,36 @@
         A request is created and configured with a publication object.
         """
 
-class IBeforeTraverseEvent(Interface):
+class IBeforeTraverseEvent(zope.app.event.interfaces.IObjectEvent):
     """An event which gets sent on publication traverse"""
 
+    request = interface.Attribute("The current request")
 
 class BeforeTraverseEvent(object):
     """An event which gets sent on publication traverse"""
-    implements(IBeforeTraverseEvent)
+
+    interface.implements(IBeforeTraverseEvent)
+
     def __init__(self, ob, request):
         self.object = ob
         self.request = request
 
 
-class IEndRequestEvent(Interface):
+class IEndRequestEvent(interface.Interface):
     """An event which gets sent when the publication is ended"""
 
 
 class EndRequestEvent(object):
     """An event which gets sent when the publication is ended"""
-    implements(IEndRequestEvent)
+
+    interface.implements(IEndRequestEvent)
+
     def __init__(self, ob, request):
         self.object = ob
         self.request = request
 
 
-class ISOAPRequestFactory(Interface):
+class ISOAPRequestFactory(interface.Interface):
     """SOAP request factory"""
 
     def __call__(input_stream, output_steam, env):



More information about the Zope3-Checkins mailing list