[Zope-Checkins] CVS: Zope3/lib/python/Zope/App/ZopePublication/VFS - Publication.py:1.2 __init__.py:1.2
Jim Fulton
jim@zope.com
Mon, 10 Jun 2002 19:29:52 -0400
Update of /cvs-repository/Zope3/lib/python/Zope/App/ZopePublication/VFS
In directory cvs.zope.org:/tmp/cvs-serv20468/lib/python/Zope/App/ZopePublication/VFS
Added Files:
Publication.py __init__.py
Log Message:
Merged Zope-3x-branch into newly forked Zope3 CVS Tree.
=== Zope3/lib/python/Zope/App/ZopePublication/VFS/Publication.py 1.1 => 1.2 ===
+#
+# Copyright (c) 2001, 2002 Zope Corporation and Contributors.
+# All Rights Reserved.
+#
+# This software is subject to the provisions of the Zope Public License,
+# Version 2.0 (ZPL). A copy of the ZPL should accompany this distribution.
+# THIS SOFTWARE IS PROVIDED "AS IS" AND ANY AND ALL EXPRESS OR IMPLIED
+# WARRANTIES ARE DISCLAIMED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+# WARRANTIES OF TITLE, MERCHANTABILITY, AGAINST INFRINGEMENT, AND FITNESS
+# FOR A PARTICULAR PURPOSE
+#
+##############################################################################
+"""
+
+$Id$
+"""
+
+from Zope.App.ZopePublication.ZopePublication import ZopePublication
+
+from Zope.ComponentArchitecture import getView
+from Zope.Publisher.Exceptions import NotFound
+from Zope.Publisher.mapply import mapply
+
+
+class VFSPublication(ZopePublication):
+ """The Publication will do all the work for the VFS"""
+
+
+ def callObject(self, request, ob):
+
+ view = getView(ob, 'vfs', request, self)
+
+ if view is not self:
+ method = getattr(view, request.method)
+ else:
+ raise NotFound(ob, 'vfs', request)
+
+ return mapply(method, request.getPositionalArguments(), request)
+
=== Zope3/lib/python/Zope/App/ZopePublication/VFS/__init__.py 1.1 => 1.2 ===