[Zope3-checkins] CVS: Zope3/src/zope/app/services - hub.py:1.19

Anthony Baxter anthony@interlink.com.au
Sun, 13 Jul 2003 03:18:27 -0400


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

Modified Files:
	hub.py 
Log Message:
Revert srichter's checkin of 1.16 - as a result of this checkin, the ObjectHub
was being suscribed twice to IObjectModifiedEvents and IObjectRemovedEvents. 
This caused badness for people trying to use the ObjectHub...


=== Zope3/src/zope/app/services/hub.py 1.18 => 1.19 ===
--- Zope3/src/zope/app/services/hub.py:1.18	Sat Jul 12 05:37:14 2003
+++ Zope3/src/zope/app/services/hub.py	Sun Jul 13 03:18:23 2003
@@ -34,7 +34,6 @@
 from zope.app.services.servicenames import EventSubscription
 
 from zope.app.interfaces.traversing import ITraverser
-from zope.app.interfaces.container import IAddNotifiable, IDeleteNotifiable
 from zope.app.interfaces.event import IObjectRemovedEvent, IObjectEvent
 from zope.app.interfaces.event import IObjectMovedEvent, IObjectCreatedEvent
 from zope.app.interfaces.event import IObjectModifiedEvent
@@ -185,7 +184,7 @@
     # concerned, and if it doesn't know how to do something, it won't
     # ask anything else to try.  Everything else is YAGNI for now.
 
-    implements(IObjectHub, ISimpleService, IAddNotifiable, IDeleteNotifiable)
+    implements(IObjectHub, ISimpleService)
 
     def __init__(self):
         ServiceSubscriberEventChannel.__init__(self)
@@ -194,18 +193,6 @@
         self.__hubid_to_path = IOBTree()
         # unicode pathslash --> int
         self.__path_to_hubid = OIBTree()
-
-    def afterAddHook(self, hub, container):
-        '''See interface IAddNotifiable'''
-        events = getService(hub, EventSubscription)
-        events.subscribe(hub, IObjectModifiedEvent)
-        events.subscribe(hub, IObjectRemovedEvent)
-
-    def beforeDeleteHook(self, hub, container):
-        '''See interface IDeleteNotifiable'''
-        events = getService(hub, EventSubscription)
-        events.unsubscribe(hub, IObjectModifiedEvent)
-        events.unsubscribe(hub, IObjectRemovedEvent)
 
     def notify(wrapped_self, event):
         '''See interface ISubscriber'''