[Zope3-checkins] SVN: Zope3/branches/jim-adapter/src/zope/ Use new registration API.

Jim Fulton jim at zope.com
Tue Apr 18 19:56:25 EDT 2006


Log message for revision 67105:
  Use new registration API.
  

Changed:
  U   Zope3/branches/jim-adapter/src/zope/app/component/metaconfigure.py
  U   Zope3/branches/jim-adapter/src/zope/app/publisher/xmlrpc/metaconfigure.py
  U   Zope3/branches/jim-adapter/src/zope/viewlet/metaconfigure.py

-=-
Modified: Zope3/branches/jim-adapter/src/zope/app/component/metaconfigure.py
===================================================================
--- Zope3/branches/jim-adapter/src/zope/app/component/metaconfigure.py	2006-04-18 23:56:22 UTC (rev 67104)
+++ Zope3/branches/jim-adapter/src/zope/app/component/metaconfigure.py	2006-04-18 23:56:24 UTC (rev 67105)
@@ -106,8 +106,8 @@
     _context.action(
         discriminator = ('resource', name, type, provides),
         callable = handler,
-        args = ('provideAdapter',
-                (type,), provides, name, factory, _context.info),
+        args = ('registerAdapter',
+                factory, (type,), provides, name, _context.info),
         )
     _context.action(
         discriminator = None,
@@ -183,8 +183,8 @@
     _context.action(
         discriminator = ('view', for_, name, provides),
         callable = handler,
-        args = ('provideAdapter',
-                for_, provides, name, factory, _context.info),
+        args = ('registerAdapter',
+                factory, for_, provides, name, _context.info),
         )
     if type is not None:
         _context.action(
@@ -207,16 +207,16 @@
                     callable = provideInterface,
                     args = ('', iface)
                     )
-
 ############################################################################
 # BBB: Deprecated. Will go away in 3.3.
+
 def defaultView(_context, type, name, for_):
 
     _context.action(
         discriminator = ('defaultViewName', for_, type, name),
         callable = handler,
-        args = ('provideAdapter',
-                (for_, type), IDefaultViewName, '', name, _context.info)
+        args = ('registerAdapter',
+                 name, (for_, type), IDefaultViewName, '',_context.info)
         )
 
     _context.action(
@@ -236,8 +236,8 @@
            'The zope:defaultView directive has been deprecated in favor of '
            'the browser:defaultView directive. '
            'Will be gone in Zope 3.3.')
+
 ############################################################################
-
 # BBB: Deprecated. Will go away in 3.4.
 def defaultLayer(_context, type, layer):
     import warnings

Modified: Zope3/branches/jim-adapter/src/zope/app/publisher/xmlrpc/metaconfigure.py
===================================================================
--- Zope3/branches/jim-adapter/src/zope/app/publisher/xmlrpc/metaconfigure.py	2006-04-18 23:56:22 UTC (rev 67104)
+++ Zope3/branches/jim-adapter/src/zope/app/publisher/xmlrpc/metaconfigure.py	2006-04-18 23:56:24 UTC (rev 67105)
@@ -77,8 +77,8 @@
         _context.action(
             discriminator = ('view', for_, name, IXMLRPCRequest),
             callable = handler,
-            args = ('provideAdapter',
-                    (for_, IXMLRPCRequest), Interface, name, class_,
+            args = ('registerAdapter',
+                    class_, (for_, IXMLRPCRequest), Interface, name,
                     _context.info)
             )
     else:
@@ -95,8 +95,8 @@
             _context.action(
                 discriminator = ('view', for_, name, IXMLRPCRequest),
                 callable = handler,
-                args = ('provideAdapter',
-                        (for_, IXMLRPCRequest), Interface, name, new_class,
+                args = ('registerAdapter',
+                        new_class, (for_, IXMLRPCRequest), Interface, name,
                         _context.info)
                 )
 

Modified: Zope3/branches/jim-adapter/src/zope/viewlet/metaconfigure.py
===================================================================
--- Zope3/branches/jim-adapter/src/zope/viewlet/metaconfigure.py	2006-04-18 23:56:22 UTC (rev 67104)
+++ Zope3/branches/jim-adapter/src/zope/viewlet/metaconfigure.py	2006-04-18 23:56:24 UTC (rev 67105)
@@ -88,9 +88,9 @@
     _context.action(
         discriminator = ('viewletManager', for_, layer, view, name),
         callable = zcml.handler,
-        args = ('provideAdapter',
-                (for_, layer, view), provides, name,
-                 new_class, _context.info),)
+        args = ('registerAdapter',
+                new_class, (for_, layer, view), provides, name,
+                 _context.info),)
 
 
 def viewletDirective(
@@ -184,6 +184,6 @@
     _context.action(
         discriminator = ('viewlet', for_, layer, view, manager, name),
         callable = zcml.handler,
-        args = ('provideAdapter',
-                (for_, layer, view, manager), interfaces.IViewlet,
-                 name, new_class, _context.info),)
+        args = ('registerAdapter',
+                new_class, (for_, layer, view, manager), interfaces.IViewlet,
+                 name, _context.info),)



More information about the Zope3-Checkins mailing list