[Zope3-checkins] CVS: Zope3/lib/python/Zope/App/OFS/Services/LocalEventService - LocalEventService.py:1.4 LocalServiceSubscribable.py:1.3 LocalSubscribable.py:1.3

Jim Fulton jim@zope.com
Thu, 1 Aug 2002 11:34:14 -0400


Update of /cvs-repository/Zope3/lib/python/Zope/App/OFS/Services/LocalEventService
In directory cvs.zope.org:/tmp/cvs-serv4877/lib/python/Zope/App/OFS/Services/LocalEventService

Modified Files:
	LocalEventService.py LocalServiceSubscribable.py 
	LocalSubscribable.py 
Log Message:
Refactored and moved Zope.ComponentArchitecture.IToIRegistry into
Interface.Registry. This is only the first step. The tests pass and
Zope 3 runs, but there are a bunch of wrong dependencies that still
need to get cleaned up, which is my next task.



=== Zope3/lib/python/Zope/App/OFS/Services/LocalEventService/LocalEventService.py 1.3 => 1.4 ===
             raise NotFoundError(subscriber)
         do_alert=ISubscriptionAware.isImplementedBy(subscriber)
         for ev_type in ev_set:
-            subscriptions = clean_self._registry.getJustForType(ev_type)
+            subscriptions = clean_self._registry.get(ev_type)
             subs=subscriptions[:]
             subscriptions[:] = []
             for sub in subs:


=== Zope3/lib/python/Zope/App/OFS/Services/LocalEventService/LocalServiceSubscribable.py 1.2 => 1.3 ===
 $Id$
 """
 
-from Zope.ComponentArchitecture.IToIRegistry import TypeRegistry
 from Zope.Exceptions import NotFoundError
 from Zope.Event.ISubscriptionAware import ISubscriptionAware
 from Zope.Event.IEvent import IEvent
@@ -62,7 +61,7 @@
                     wrapped_self, clean_self._serviceName).unsubscribe(
                     subscriber, event_type, filter)
             else:
-                subscriptions = clean_self._registry.getJustForType(ev_type)
+                subscriptions = clean_self._registry.get(ev_type)
                 try:
                     subscriptions.remove((subscriber, filter))
                 except ValueError:
@@ -78,7 +77,7 @@
                         del clean_self._subscribers[subscriber_index]
         else:
             for ev_type in ev_set:
-                subscriptions = clean_self._registry.getJustForType(ev_type)
+                subscriptions = clean_self._registry.get(ev_type)
                 subs=subscriptions[:]
                 subscriptions[:] = []
                 for sub in subs:


=== Zope3/lib/python/Zope/App/OFS/Services/LocalEventService/LocalSubscribable.py 1.2 => 1.3 ===
 $Id$
 """
 
-from Zope.ComponentArchitecture.IToIRegistry import TypeRegistry
 from Zope.Exceptions import NotFoundError
 from Zope.Event.ISubscriptionAware import ISubscriptionAware
 from Zope.Event.IEvent import IEvent
@@ -42,7 +41,7 @@
         ev_type=event_type
         if ev_type is IEvent: ev_type=None # optimization
         
-        subscribers = clean_self._registry.getJustForType(ev_type)
+        subscribers = clean_self._registry.get(ev_type)
         if subscribers is None:
             subscribers = []
             clean_self._registry.register(ev_type, subscribers)
@@ -84,7 +83,7 @@
                 ev_type=None # handle optimization
             if ev_type not in ev_set:
                 raise NotFoundError(subscriber, event_type, filter)
-            subscriptions = clean_self._registry.getJustForType(ev_type)
+            subscriptions = clean_self._registry.get(ev_type)
             if not subscriptions:
                 raise NotFoundError(subscriber, event_type, filter)
             try:
@@ -101,7 +100,7 @@
                     del clean_self._subscribers[subscriber_index]
         else:
             for ev_type in ev_set:
-                subscriptions = clean_self._registry.getJustForType(ev_type)
+                subscriptions = clean_self._registry.get(ev_type)
                 subs=subscriptions[:]
                 subscriptions[:] = []
                 for sub in subs: