[Zope-Checkins] CVS: Zope3/lib/python/Zope/Publisher/VFS - IVFSPresentation.py:1.1.4.1 IVFSView.py:1.1.4.1 IVFSPublisher.py:1.1.4.2 VFSRequest.py:1.1.4.2 metaConfigure.py:1.1.4.3 vfs-meta.zcml:1.1.4.2

Jim Fulton jim@zope.com
Fri, 7 Jun 2002 10:41:59 -0400


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

Modified Files:
      Tag: Zope-3x-branch
	IVFSPublisher.py VFSRequest.py metaConfigure.py vfs-meta.zcml 
Added Files:
      Tag: Zope-3x-branch
	IVFSPresentation.py IVFSView.py 
Log Message:
Merging in Zope3InWonderland-branch, which implemented the following
proposals (see
http://dev.zope.org/Wikis/DevSite/Projects/ComponentArchitecture/OldProposals): 
- RenameAllowToRequire

- GroupClassRelatedDirectivesInClassDirective

- ViewInterfaceAndSimplification

- ConsistentUseOfSpacesAsDelimitersInZCMLAttributes

- TwoArgumentViewConstructors

- ImplementsInZCML

- SimpleViewCreationInZCML

- RemoveGetView

- ReplaceProtectWithAllow

- ViewMethodsAsViews

- MergeProtectionAndComponentDefinitions

There were also various security fixes resulting of better integration
of security with components.


=== Added File Zope3/lib/python/Zope/Publisher/VFS/IVFSPresentation.py ===
##############################################################################
#
# Copyright (c) 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: IVFSPresentation.py,v 1.1.4.1 2002/06/07 14:41:28 jim Exp $
"""

from Zope.ComponentArchitecture.IPresentation import IPresentation

class IVFSPresentation(IPresentation):
    """VFS presentations
    """



=== Added File Zope3/lib/python/Zope/Publisher/VFS/IVFSView.py ===
##############################################################################
#
# Copyright (c) 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: IVFSView.py,v 1.1.4.1 2002/06/07 14:41:28 jim Exp $
"""

from Zope.ComponentArchitecture.IView import IView
from IVFSPresentation import IVFSPresentation

class IVFSView(IVFSPresentation, IView):
    "Browser View"



=== Zope3/lib/python/Zope/Publisher/VFS/IVFSPublisher.py 1.1.4.1 => 1.1.4.2 ===
 $Id$
 """
-from Interface import Interface
+from Zope.Publisher.IPublishTraverse import IPublishTraverse
 
-class IVFSPublisher(Interface):
-
-    def publishTraverse(request, name):
-        """Lookup a name
-
-        The request argument is the publisher request object.
-        """
+class IVFSPublisher(IPublishTraverse):
+    """VFS Publisher"""


=== Zope3/lib/python/Zope/Publisher/VFS/VFSRequest.py 1.1.4.1 => 1.1.4.2 ===
 
 from Zope.Publisher.BaseRequest import BaseRequest
-from IVFSPublisher import IVFSPublisher
+from IVFSView import IVFSView
 from IVFSCredentials import IVFSCredentials
 
 from VFSResponse import VFSResponse
@@ -26,9 +26,9 @@
 
     __implements__ = BaseRequest.__implements__, IVFSCredentials
 
-    # _viewtype is overridden from the BaseRequest 
-    # to implement IVFSPublisher
-    _viewtype = IVFSPublisher
+    # _presentation_type is overridden from the BaseRequest 
+    # to implement IVFSView
+    _presentation_type = IVFSView
 
 
     def __init__(self, body_instream, outstream, environ, response=None):


=== Zope3/lib/python/Zope/Publisher/VFS/metaConfigure.py 1.1.4.2 => 1.1.4.3 ===
 $Id$
 """
-from Zope.ComponentArchitecture.metaConfigure import handler
-from Zope.Configuration.Action import Action
-from IVFSPublisher import IVFSPublisher
-
+from Zope.App.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(' '))
+def view(_context, **__kw):
+    return _view(_context, type='Zope.Publisher.VFS.IVFSView.', **__kw)
+
 
-    return [
-        Action(
-            discriminator = ('defaultViewName', for_, name, IVFSPublisher),
-            callable = handler,
-            args = ('Views', 'setDefaultViewName', for_, IVFSPublisher, name),
-            ),
-        Action(
-            discriminator = ('view', for_, name, IVFSPublisher, layer),
-            callable = handler,
-            args = ('Views', 'provideView', for_, name, IVFSPublisher, factory,
-layer),             )
-        ]


=== Zope3/lib/python/Zope/Publisher/VFS/vfs-meta.zcml 1.1.4.1 => 1.1.4.2 ===
   
   <directives namespace="http://namespaces.zope.org/vfs">
-    <directive name="view" attributes="factory, name, for"
+    <directive name="view" attributes="factory name for"
        handler=".metaConfigure.view" />
   </directives>