[Zope3-checkins] CVS: Zope3/lib/python/Zope/App/Publisher/XMLRPC - metaConfigure.py:1.4

Jim Fulton jim@zope.com
Tue, 19 Nov 2002 18:25:44 -0500


Update of /cvs-repository/Zope3/lib/python/Zope/App/Publisher/XMLRPC
In directory cvs.zope.org:/tmp/cvs-serv11465/lib/python/Zope/App/Publisher/XMLRPC

Modified Files:
	metaConfigure.py 
Log Message:

Two changes that were far reaching and interdependent.

- Changed existing directives that mention interfaces to register
  those interfaces with the global interface service.

- Moved all configuration support (except that in Zope.Configuration)
  into Zope.App. This was necessary to get the order of execution such
  that the interface service was defined before directives that used
  interfaces were used.  This is a change that has been needed for
  some time.



=== Zope3/lib/python/Zope/App/Publisher/XMLRPC/metaConfigure.py 1.3 => 1.4 ===
--- Zope3/lib/python/Zope/App/Publisher/XMLRPC/metaConfigure.py:1.3	Wed Nov  6 17:30:22 2002
+++ Zope3/lib/python/Zope/App/Publisher/XMLRPC/metaConfigure.py	Tue Nov 19 18:25:14 2002
@@ -29,6 +29,7 @@
 
 from Zope.App.ComponentArchitecture.metaConfigure \
      import defaultView as _defaultView, handler
+from Interface import Interface
 
 
 class view(object):
@@ -158,12 +159,23 @@
 
             factory[-1] =  proxyView
 
-        return [
+        actions = [
             Action(
-                discriminator = ('view', self.for_, self.name, self.type),
+            discriminator = ('view', self.for_, self.name, self.type),
+            callable = handler,
+            args = ('Views', 'provideView', self.for_, self.name,
+                    self.type, factory),
+            )
+            ]
+        if self.for_ is not None:
+            actions.append
+            (
+                Action(
+                discriminator = None,
                 callable = handler,
-                args = ('Views', 'provideView', self.for_, self.name,
-                        self.type, factory),
+                args = ('Interfaces', 'provideInterface',
+                        self.for_.__module__+'.'+self.for_.__name__, self.for_)
                 )
-            ]
-
+                )
+        return actions        
+