[Zope-Checkins] CVS: Zope3/lib/python/Zope/App/OFS/Container/Views/VFS - VFSContainerView.py:1.1.4.2.6.1

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


Update of /cvs-repository/Zope3/lib/python/Zope/App/OFS/Container/Views/VFS
In directory cvs.zope.org:/tmp/cvs-serv12181/lib/python/Zope/App/OFS/Container/Views/VFS

Modified Files:
      Tag: Zope3InWonderland-branch
	VFSContainerView.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/App/OFS/Container/Views/VFS/VFSContainerView.py 1.1.4.2 => 1.1.4.2.6.1 ===
 from Zope.App.OFS.Content.Folder.Folder import Folder
 
+class XXXRequest:
+    def __init__(self, presentationType, skin=''):
+        self.presentationType = presentationType
+        self.skin = skin
+
+    def getPresentationType(self):
+        return self.presentationType
+
+    def getPresentationSkin(self):
+        return self.skin
+    
+
 class VFSContainerView:
 
     __implements__ =  IVFSDirectoryPublisher
@@ -109,7 +121,7 @@
         else:
             obj = self._container.getObject(name)
 
-        vfs_view = getView(obj, 'vfs', IVFSPublisher)
+        vfs_view = getView(obj, 'vfs', XXXRequest(IVFSPublisher))
         vfs_view.write(mode, instream, start)
 
     def check_writable(self, name):