[Zope3-checkins] CVS: Zope3/src/zope/app/index - processors.py:1.4 subscribers.py:1.3

Steve Alexander steve@cat-box.net
Mon, 30 Dec 2002 09:03:37 -0500


Update of /cvs-repository/Zope3/src/zope/app/index
In directory cvs.zope.org:/tmp/cvs-serv23914/src/zope/app/index

Modified Files:
	processors.py subscribers.py 
Log Message:
Large refactoring of the event service.


=== Zope3/src/zope/app/index/processors.py 1.3 => 1.4 ===
--- Zope3/src/zope/app/index/processors.py:1.3	Sat Dec 28 12:49:26 2002
+++ Zope3/src/zope/app/index/processors.py	Mon Dec 30 09:03:06 2002
@@ -43,7 +43,7 @@
         list = getAdapter(query, IRankedHubIdList)
         batch = getAdapter(query, IBatchedResult)
 
-        objectHub = getService(wrapped_self, "ObjectHub")
+        objectHub = getService(wrapped_self, "HubIds")
 
         # XXX do we need wrapping for the objects returned by the hub?
         iterator = RankedObjectIterator(list, objectHub.getObject, batch.startPosition,


=== Zope3/src/zope/app/index/subscribers.py 1.2 => 1.3 ===
--- Zope3/src/zope/app/index/subscribers.py:1.2	Wed Dec 25 09:12:54 2002
+++ Zope3/src/zope/app/index/subscribers.py	Mon Dec 30 09:03:06 2002
@@ -32,7 +32,7 @@
 from zope.interface import Interface
 from persistence import Persistent
 
-from zope.interfaces.event import ISubscriber
+from zope.app.interfaces.event import ISubscriber
 from zope.app.interfaces.event import IObjectAddedEvent
 from zope.app.interfaces.content.folder import IFolder
 from zope.proxy.context import ContextMethod
@@ -61,7 +61,7 @@
 
     def notify(wrapped_self, event):
         """An event occured. Perhaps register this object with the hub."""
-        hub = getService(wrapped_self, "ObjectHub")
+        hub = getService(wrapped_self, "HubIds")
         wrapped_self._registerObject(event.object, hub)
     notify = ContextMethod(notify)
 
@@ -88,7 +88,7 @@
 
     def registerExisting(wrapped_self):
         object = findContentObject(wrapped_self)
-        hub = getService(wrapped_self, "ObjectHub")
+        hub = getService(wrapped_self, "HubIds")
         wrapped_self._registerTree(object, hub)
     registerExisting = ContextMethod(registerExisting)
 
@@ -117,7 +117,7 @@
 
     def _getChannel(wrapped_self, channel):
         if channel is None:
-            channel = getService(wrapped_self, "ObjectHub")
+            channel = getService(wrapped_self, "HubIds")
         return channel
     _getChannel = ContextMethod(_getChannel)