[Zope-Checkins] CVS: Zope3/lib/python/Zope/App/ZopePublication/VFS - Publication.py:1.1.4.1 __init__.py:1.1.6.1

Shane Hathaway shane@cvs.zope.org
Fri, 12 Apr 2002 17:30:53 -0400


Update of /cvs-repository/Zope3/lib/python/Zope/App/ZopePublication/VFS
In directory cvs.zope.org:/tmp/cvs-serv20835/lib/python/Zope/App/ZopePublication/VFS

Added Files:
      Tag: Zope-3x-branch
	Publication.py __init__.py 
Log Message:
Merged Zope3-Server-Branch.


=== Added File Zope3/lib/python/Zope/App/ZopePublication/VFS/Publication.py ===
##############################################################################
#
# 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: Publication.py,v 1.1.4.1 2002/04/12 21:30:52 shane Exp $
"""

from Zope.App.ZopePublication.ZopePublication import ZopePublication

from Zope.ComponentArchitecture import getRequestView
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 = getRequestView(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)



=== Added File Zope3/lib/python/Zope/App/ZopePublication/VFS/__init__.py ===