[Zope3-checkins] CVS: Zope3/src/zope/app/browser/services/service - __init__.py:1.22 configure.zcml:1.11

Jim Fulton jim at zope.com
Fri Mar 5 17:09:59 EST 2004


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

Modified Files:
	__init__.py configure.zcml 
Log Message:
Renamed interface methods:

isImplementedByInstancesOf to implementedBy
  isImplementedBy            to providedBy


=== Zope3/src/zope/app/browser/services/service/__init__.py 1.21 => 1.22 ===
--- Zope3/src/zope/app/browser/services/service/__init__.py:1.21	Fri Mar  5 10:49:55 2004
+++ Zope3/src/zope/app/browser/services/service/__init__.py	Fri Mar  5 17:08:56 2004
@@ -110,7 +110,7 @@
     def add(self, content):
         # Override so as to check the type of the new object.
         # XXX This wants to be generalized!
-        if not ILocalService.isImplementedBy(content):
+        if not ILocalService.providedBy(content):
             raise TypeError("%s is not a local service" % content)
 
         content = super(ServiceAdding, self).add(content)
@@ -119,7 +119,7 @@
         sm = zapi.getServiceManager(self.context)
         implements = []
         for type_name, interface in sm.getServiceDefinitions():
-            if interface.isImplementedBy(content):
+            if interface.providedBy(content):
                 implements.append(type_name)
 
         path = zapi.name(content)
@@ -147,7 +147,7 @@
     def add(self, content):
         # Override so as to check the type of the new object.
         # XXX This wants to be generalized!
-        if not ILocalUtility.isImplementedBy(content):
+        if not ILocalUtility.providedBy(content):
             raise TypeError("%s is not a local utility" % content)
         return super(UtilityAdding, self).add(content)
 
@@ -171,7 +171,7 @@
         sm = zapi.getServiceManager(self.context)
         lst = []
         for servicename, interface in sm.getServiceDefinitions():
-            if interface.isImplementedBy(self.context):
+            if interface.providedBy(self.context):
                 registry = sm.queryRegistrations(servicename)
                 checked = True
                 if registry and registry.active():
@@ -310,13 +310,13 @@
         items = {}
         # make sure no-one tries to use this starting at the global service
         # manager
-        assert ISiteManager.isImplementedBy(sm)
+        assert ISiteManager.providedBy(sm)
         manageable = True
     else:
         # don't want the "change registration" link for parent services
         manageable = False
 
-    if IGlobalServiceManager.isImplementedBy(sm):
+    if IGlobalServiceManager.providedBy(sm):
         # global service manager
         names = []
         for type_name, interface in sm.getServiceDefinitions():
@@ -460,7 +460,7 @@
 
         Now verify that we have a site:
 
-        >>> ISite.isImplementedBy(folder)
+        >>> ISite.providedBy(folder)
         1
 
         Note that we've also redirected the request:
@@ -480,7 +480,7 @@
 
 
         """
-        if ISite.isImplementedBy(self.context):
+        if ISite.providedBy(self.context):
             raise zapi.UserError('This is already a site')
 
         # we don't want to store security proxies (we can't,
@@ -552,7 +552,7 @@
     ...     def getInterface(self, id=None):
     ...         return TestInterface
     ...
-    >>> IInterface.isImplementedBy(TestInterface)
+    >>> IInterface.providedBy(TestInterface)
     True
     >>> provideInterface('', TestInterface, IContentType)
     >>> from zope.publisher.browser import TestRequest
@@ -600,10 +600,10 @@
 
         for name in self.iface:
             defn = self.iface[name]
-            if IMethod.isImplementedBy(defn):
+            if IMethod.providedBy(defn):
                 title = defn.__doc__.split('\n')[0].strip()
                 self.methods.append({'method': defn, 'title': title})
-            elif IField.isImplementedBy(defn):
+            elif IField.providedBy(defn):
                 self.schema.append(defn)
 
     def getServices(self):


=== Zope3/src/zope/app/browser/services/service/configure.zcml 1.10 => 1.11 ===
--- Zope3/src/zope/app/browser/services/service/configure.zcml:1.10	Fri Mar  5 10:49:55 2004
+++ Zope3/src/zope/app/browser/services/service/configure.zcml	Fri Mar  5 17:08:56 2004
@@ -28,7 +28,7 @@
       for="zope.app.interfaces.services.service.IPossibleSite"
       action="addServiceManager.html"
       filter="python:not modules['zope.app.interfaces.services.service'
-                  ].ISite.isImplementedBy(context)"
+                  ].ISite.providedBy(context)"
       permission="zope.ManageServices"
       />
 




More information about the Zope3-Checkins mailing list