[Zope3-checkins] CVS: Zope3/src/zope/app/services - event.py:1.16 servicenames.py:1.2

R. Sean Bowman sean.bowman@acm.org
Fri, 7 Mar 2003 19:52:18 -0500


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

Modified Files:
	event.py servicenames.py 
Log Message:
change service names: Events -> EventDispatch, Subscription ->
EventSubscription, ErrorReports -> ErrorLogging


=== Zope3/src/zope/app/services/event.py 1.15 => 1.16 ===
--- Zope3/src/zope/app/services/event.py:1.15	Mon Mar  3 18:16:13 2003
+++ Zope3/src/zope/app/services/event.py	Fri Mar  7 19:51:43 2003
@@ -28,7 +28,7 @@
 
 from zope.component import getAdapter, queryAdapter, getService, queryService
 from zope.component import ComponentLookupError
-from zope.app.services.servicenames import HubIds, Events, Subscription
+from zope.app.services.servicenames import HubIds, EventDispatch, EventSubscription
 from zope.app.component.nextservice import getNextService, queryNextService
 
 from zope.proxy.context import ContextMethod, ContextSuper
@@ -38,7 +38,7 @@
 
 
 def getSubscriptionService(context):
-    return getService(context, Subscription)
+    return getService(context, EventSubscription)
 
 def subscribe(subscriber, event_type=IEvent, filter=None, context=None):
     if context is None and not isinstance(subscriber, (int, str, unicode)):
@@ -146,7 +146,7 @@
         # the name of the service that this object is providing, or
         # None if unbound
 
-    _subscribeToServiceName = Subscription
+    _subscribeToServiceName = EventSubscription
     _subscribeToServiceInterface = IEvent
     _subscribeToServiceFilter = None
 
@@ -329,7 +329,7 @@
         try:
             clean_self._notify(wrapped_self, event)
             if clean_self.isPromotableEvent(event):
-                getNextService(wrapped_self, Events).publish(event)
+                getNextService(wrapped_self, EventDispatch).publish(event)
         finally:
             publishedEvents.remove(event)
     publish = ContextMethod(publish)
@@ -344,15 +344,15 @@
 
     def bound(wrapped_self, name):
         "See IBindingAware"
-        # An event service is bound as Subscription and as Events.
+        # An event service is bound as EventSubscription and as EventDispatch.
         # We only want to subscribe to the next event service when we're bound
-        # as Subscription
-        if name == Subscription:
+        # as EventSubscription
+        if name == EventSubscription:
             clean_self = removeAllProxies(wrapped_self)
             clean_self._serviceName = name  # for ServiceSubscribable
             if clean_self.subscribeOnBind:
                 try:
-                    es = getNextService(wrapped_self, Subscription)
+                    es = getNextService(wrapped_self, EventSubscription)
                 except ComponentLookupError:
                     pass
                 else:
@@ -361,10 +361,10 @@
 
     def unbound(wrapped_self, name):
         "See IBindingAware"
-        # An event service is bound as Subscription and as Events.
+        # An event service is bound as EventSubscription and as EventDispatch.
         # We only want to unsubscribe from the next event service when
-        # we're unbound as Subscription
-        if name == Subscription:
+        # we're unbound as EventSubscription
+        if name == EventSubscription:
             clean_self = removeAllProxies(wrapped_self)
             clean_self._v_unbinding = True
             try:
@@ -406,13 +406,13 @@
             if ISubscriptionService.isImplementedBy(
                 removeAllProxies(clean_subscribable)):
                 try:
-                    context = getService(wrapped_self, Subscription)
+                    context = getService(wrapped_self, EventSubscription)
                     # we do this instead of getNextService because the order
                     # of unbinding and notification of unbinding is not
                     # guaranteed
                     while removeAllProxies(context) in (
                         clean_subscribable, clean_self): 
-                        context = getNextService(context, Subscription)
+                        context = getNextService(context, EventSubscription)
                 except ComponentLookupError:
                     pass
                 else:


=== Zope3/src/zope/app/services/servicenames.py 1.1 => 1.2 ===
--- Zope3/src/zope/app/services/servicenames.py:1.1	Tue Feb 11 21:17:34 2003
+++ Zope3/src/zope/app/services/servicenames.py	Fri Mar  7 19:51:43 2003
@@ -20,9 +20,9 @@
 from zope.component.servicenames import *
 
 HubIds = 'HubIds'
-Events = 'Events'
-Subscription = 'Subscription'
-ErrorReports = 'ErrorReportingService'
+EventDispatch = 'Events'
+EventSubscription = 'Subscription'
+ErrorLogging = 'ErrorReportingService'
 Roles = 'Roles'
 Permissions = 'Permissions'
 Authentication = 'Authentication'