[Zope-Checkins] CVS: Zope3/lib/python/Zope/Publisher/XMLRPC - XMLRPCRequest.py:1.1.2.3.10.1 metaConfigure.py:1.1.4.3.8.1

Jim Fulton jim@zope.com
Wed, 29 May 2002 11:10:25 -0400


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

Modified Files:
      Tag: Zope3InWonderland-branch
	XMLRPCRequest.py metaConfigure.py 
Log Message:
- Added permission_id attribute to adapter and utility directives.

- Got rid of old getView, getResource, and getDefaultViewName.
  Renamed getRequestView to getView (and so on).

  Changed view interface to use context, rather than getContext.

  Introduced notion of presentation types (e.g. IBrowserPresentation, 
  which is cleaner than IBrowserPublisher).

- Began converting to get/queryFoo, which is much nicer.

- Many formatting fixups.



=== Zope3/lib/python/Zope/Publisher/XMLRPC/XMLRPCRequest.py 1.1.2.3 => 1.1.2.3.10.1 ===
     __implements__ = HTTPRequest.__implements__
 
-    # _viewtype is overridden from the BaseRequest 
+    # _presentation_type is overridden from the BaseRequest 
     # to implement IXMLRPCPublisher
-    _viewtype = IXMLRPCPublisher
+    _presentation_type = IXMLRPCPublisher
 
 
     _args = ()


=== Zope3/lib/python/Zope/Publisher/XMLRPC/metaConfigure.py 1.1.4.3 => 1.1.4.3.8.1 ===
 $Id$
 """
-from Zope.ComponentArchitecture.metaConfigure import handler
-from Zope.Configuration.Action import Action
-from IXMLRPCPublisher import IXMLRPCPublisher
-
+from Zope.ComponentArchitecture.metaConfigure import view as _view
     
-def view(_context, name, factory, for_=None, layer=''):
-    if for_ is not None:
-        for_ = _context.resolve(for_)
-    factory = map(_context.resolve, factory.split(' '))
-
-    return [
-        Action(
-            discriminator = ('view', for_, name, IXMLRPCPublisher, layer),
-            callable = handler,
-            args = ('Views', 'provideView', for_, name, IXMLRPCPublisher,
-factory, layer),             )
-        ]
+def view(_context, **__kw):
+    return _view(_context,
+                 type='Zope.Publisher.XMLRPC.IXMLRPCPublisher.',
+                 **__kw)