[Zope3-checkins] CVS: Zope3/lib/python/Zope/App/OFS/Container - ContainerTraverser.py:1.6 configure.zcml:1.7
Stephan Richter
srichter@cbu.edu
Fri, 20 Dec 2002 04:26:07 -0500
Update of /cvs-repository/Zope3/lib/python/Zope/App/OFS/Container
In directory cvs.zope.org:/tmp/cvs-serv31450/Zope/App/OFS/Container
Modified Files:
ContainerTraverser.py configure.zcml
Log Message:
Refactoring and fixing VFS and FTP
I am glad to make this commit that fixes up a lot of the FTP
implementation. I fixed the behavior of many of the FTP commands,
including LIST, SIZE, and CWD.
I moved the original VFSFile/DirectoryView into abstract classes and wrote
a special implementation for each content type, which makes the code much
more flexible.
Also I finally implemented a smart way of adding files via VFS through
file extension introspection, based on Jim's ExtensionViewName proposal.
I am adding documentation in the DevelCookbook right now and will later
add a README file.
TODOs:
- make VFS View names flexible, so that file extensions specify views.
- Simplify ZCML directives, so that one can add new extensions for Add views
quicker. A solution might look like that:
<vfs:view
name=".dtml"
for="Zope.App.OFS.Container.IAdding."
factory=".DTMLPageAdd."
permission="Zope.ManageContent">
<vfs:extension name=".html" />
<vfs:extension name=".xul" />
<vfs:extension name=".xml" />
...
</vfs:view>
This method would also be good for defining a default fiel extension.
- Show an object with its default file extension.
=== Zope3/lib/python/Zope/App/OFS/Container/ContainerTraverser.py 1.5 => 1.6 ===
--- Zope3/lib/python/Zope/App/OFS/Container/ContainerTraverser.py:1.5 Mon Nov 18 08:25:49 2002
+++ Zope3/lib/python/Zope/App/OFS/Container/ContainerTraverser.py Fri Dec 20 04:25:36 2002
@@ -11,8 +11,9 @@
# FOR A PARTICULAR PURPOSE.
#
##############################################################################
-"""
- Define view component for folder contents.
+"""Define view component for folder contents.
+
+$Id$
"""
from Zope.Publisher.Browser.IBrowserPublisher import IBrowserPublisher
=== Zope3/lib/python/Zope/App/OFS/Container/configure.zcml 1.6 => 1.7 ===
--- Zope3/lib/python/Zope/App/OFS/Container/configure.zcml:1.6 Mon Nov 18 18:51:38 2002
+++ Zope3/lib/python/Zope/App/OFS/Container/configure.zcml Fri Dec 20 04:25:36 2002
@@ -2,7 +2,6 @@
xmlns='http://namespaces.zope.org/zope'
xmlns:browser='http://namespaces.zope.org/browser'
xmlns:xmlrpc='http://namespaces.zope.org/xmlrpc'
- xmlns:vfs='http://namespaces.zope.org/vfs'
xmlns:event="http://namespaces.zope.org/event"
>
@@ -28,20 +27,9 @@
for=".IContainer.IReadContainer."
factory=".ContainerTraverser." />
- <vfs:view
- name="_traverse"
- for=".IContainer.IItemContainer."
- factory=".ContainerTraverser." />
-
- <vfs:view
- name="_traverse"
- for=".IContainer.IReadContainer"
- factory=".ContainerTraverser." />
-
<adapter factory=".ContainerTraversable."
provides="Zope.App.Traversing.ITraversable."
for=".IContainer.IReadContainer." />
-
<adapter factory=".ZopeContainerAdapter."
provides=".IZopeContainer."