[Zope3-checkins] CVS: Zope3/src/zope/app/content - configure.zcml:1.15 fssync.py:1.4

Guido van Rossum guido@python.org
Thu, 15 May 2003 12:20:10 -0400


Update of /cvs-repository/Zope3/src/zope/app/content
In directory cvs.zope.org:/tmp/cvs-serv28413

Modified Files:
	configure.zcml fssync.py 
Log Message:
Get rid of the fssync-specific add views.
There's a much more powerful mechanism we can use, based on
IFileFactory.

=== Zope3/src/zope/app/content/configure.zcml 1.14 => 1.15 ===
--- Zope3/src/zope/app/content/configure.zcml:1.14	Tue May  6 15:51:32 2003
+++ Zope3/src/zope/app/content/configure.zcml	Thu May 15 12:20:09 2003
@@ -361,6 +361,8 @@
 
 <fssync:adapter class=".file.File" factory=".fssync.ObjectFileAdapter" />
 
+<fssync:adapter class=".image.Image" factory=".fssync.ObjectFileAdapter" />
+
 <fssync:adapter class=".folder.Folder" factory=".fssync.ObjectDirectory" />
 
 <fssync:adapter class=".zpt.ZPTPage" factory=".fssync.ZPTObjectFileAdapter" />
@@ -383,29 +385,6 @@
   for="zope.app.interfaces.content.zpt.IZPTPage"
   factory=".fssync.ObjectFileAdapter"
   provides="zope.app.interfaces.fssync.IObjectFile"
-  />
-
-  <!-- add views -->
-
-<view 
-  factory=".fssync.FolderAddView"
-  for="zope.app.interfaces.fssync.IContentDirectory"
-  type="zope.app.interfaces.fssync.IFSAddView"
-  name=".folder"
-  />
-
-<view 
-  factory=".fssync.FileAddView"
-  for="zope.app.interfaces.fssync.IContentDirectory"
-  type="zope.app.interfaces.fssync.IFSAddView"
-  name=".file"
-  />
-
-<view 
-  factory=".fssync.ZPTAddView"
-  for="zope.app.interfaces.fssync.IContentDirectory"
-  type="zope.app.interfaces.fssync.IFSAddView"
-  name=".pt"
   />
 
 <!-- Further Directives -->


=== Zope3/src/zope/app/content/fssync.py 1.3 => 1.4 ===
--- Zope3/src/zope/app/content/fssync.py:1.3	Tue May  6 15:51:32 2003
+++ Zope3/src/zope/app/content/fssync.py	Thu May 15 12:20:09 2003
@@ -68,24 +68,3 @@
     def setBody(self, data):
         "See IObjectFile"
         self.context.setSource(data)
-
-class FolderAddView(FSAddView):
-    """Support to create a filesystem representation of Zope folder objects.
-    """
-
-    def create(self):
-        return Folder()
-
-class FileAddView(FSAddView):
-    """Support to create a filesystem representation of Zope file objects.
-    """
-
-    def create(self):
-        return File()
-
-class ZPTAddView(FSAddView):
-    """Support to create a filesystem representation of ZPT page objects.
-    """
-
-    def create(self, fs_path=None):
-        return ZPTPage()