[Zope3-checkins] SVN: Zope3/trunk/ Split out the fssync adapters
for zope.app.file and zope.app.zptpage; this
Fred L. Drake, Jr.
fred at zope.com
Mon May 24 15:01:42 EDT 2004
Log message for revision 24939:
Split out the fssync adapters for zope.app.file and zope.app.zptpage; this
avoids the dependency on zope.fssync for these content types.
-=-
Added: Zope3/trunk/package-includes/zope.app.file.fssync-configure.zcml
===================================================================
--- Zope3/trunk/package-includes/zope.app.file.fssync-configure.zcml 2004-05-24 18:42:17 UTC (rev 24938)
+++ Zope3/trunk/package-includes/zope.app.file.fssync-configure.zcml 2004-05-24 19:01:42 UTC (rev 24939)
@@ -0,0 +1 @@
+<include package="zope.app.file.fssync" />
Property changes on: Zope3/trunk/package-includes/zope.app.file.fssync-configure.zcml
___________________________________________________________________
Name: svn:mime-type
+ text/xml
Name: svn:eol-style
+ native
Added: Zope3/trunk/package-includes/zope.app.zptpage.fssync-configure.zcml
===================================================================
--- Zope3/trunk/package-includes/zope.app.zptpage.fssync-configure.zcml 2004-05-24 18:42:17 UTC (rev 24938)
+++ Zope3/trunk/package-includes/zope.app.zptpage.fssync-configure.zcml 2004-05-24 19:01:42 UTC (rev 24939)
@@ -0,0 +1 @@
+<include package="zope.app.zptpage.fssync" />
Property changes on: Zope3/trunk/package-includes/zope.app.zptpage.fssync-configure.zcml
___________________________________________________________________
Name: svn:mime-type
+ text/xml
Name: svn:eol-style
+ native
Modified: Zope3/trunk/src/zope/app/file/DEPENDENCIES.cfg
===================================================================
--- Zope3/trunk/src/zope/app/file/DEPENDENCIES.cfg 2004-05-24 18:42:17 UTC (rev 24938)
+++ Zope3/trunk/src/zope/app/file/DEPENDENCIES.cfg 2004-05-24 19:01:42 UTC (rev 24939)
@@ -2,7 +2,6 @@
transaction
zope.app
zope.app.onlinehelp
-zope.fssync
zope.interface
zope.publisher
zope.schema
Modified: Zope3/trunk/src/zope/app/file/PACKAGE.cfg
===================================================================
--- Zope3/trunk/src/zope/app/file/PACKAGE.cfg 2004-05-24 18:42:17 UTC (rev 24938)
+++ Zope3/trunk/src/zope/app/file/PACKAGE.cfg 2004-05-24 19:01:42 UTC (rev 24939)
@@ -7,5 +7,6 @@
</load>
<collection>
+fssync -
textindex -
</collection>
Modified: Zope3/trunk/src/zope/app/file/configure.zcml
===================================================================
--- Zope3/trunk/src/zope/app/file/configure.zcml 2004-05-24 18:42:17 UTC (rev 24938)
+++ Zope3/trunk/src/zope/app/file/configure.zcml 2004-05-24 19:01:42 UTC (rev 24939)
@@ -1,6 +1,5 @@
<configure
xmlns='http://namespaces.zope.org/zope'
- xmlns:fssync='http://namespaces.zope.org/fssync'
i18n_domain='zope'
>
@@ -75,9 +74,6 @@
for=".interfaces.IImage"
/>
-
- <!-- fssync adapters -->
-
<adapter
for=".interfaces.IFile"
provides="zope.app.filerepresentation.interfaces.IReadFile"
@@ -92,11 +88,6 @@
permission="zope.ManageContent"
/>
- <fssync:adapter
- class=".file.File"
- factory=".fssync.FileAdapter"
- />
-
<adapter
for="zope.app.folder.interfaces.IFolder"
provides="zope.app.filerepresentation.interfaces.IFileFactory"
@@ -104,12 +95,7 @@
permission="zope.ManageContent"
/>
- <fssync:adapter
- class=".image.Image"
- factory=".fssync.FileAdapter"
- />
-
<!-- include browser package -->
<include package=".browser" />
Added: Zope3/trunk/src/zope/app/file/fssync/DEPENDENCIES.cfg
===================================================================
--- Zope3/trunk/src/zope/app/file/fssync/DEPENDENCIES.cfg 2004-05-24 18:42:17 UTC (rev 24938)
+++ Zope3/trunk/src/zope/app/file/fssync/DEPENDENCIES.cfg 2004-05-24 19:01:42 UTC (rev 24939)
@@ -0,0 +1,2 @@
+zope.fssync
+zope.interface
Added: Zope3/trunk/src/zope/app/file/fssync/SETUP.cfg
===================================================================
--- Zope3/trunk/src/zope/app/file/fssync/SETUP.cfg 2004-05-24 18:42:17 UTC (rev 24938)
+++ Zope3/trunk/src/zope/app/file/fssync/SETUP.cfg 2004-05-24 19:01:42 UTC (rev 24939)
@@ -0,0 +1,5 @@
+# Tell zpkg how to install the ZCML slugs.
+
+<data-files skel/etc/package-includes>
+ zope.app.file.fssync-configure.zcml
+</data-files>
Added: Zope3/trunk/src/zope/app/file/fssync/__init__.py
===================================================================
--- Zope3/trunk/src/zope/app/file/fssync/__init__.py 2004-05-24 18:42:17 UTC (rev 24938)
+++ Zope3/trunk/src/zope/app/file/fssync/__init__.py 2004-05-24 19:01:42 UTC (rev 24939)
@@ -0,0 +1 @@
+# This directory is a Python package.
Property changes on: Zope3/trunk/src/zope/app/file/fssync/__init__.py
___________________________________________________________________
Name: svn:mime-type
+ text/x-python
Name: svn:eol-style
+ native
Copied: Zope3/trunk/src/zope/app/file/fssync/adapter.py (from rev 24933, Zope3/trunk/src/zope/app/file/fssync.py)
Added: Zope3/trunk/src/zope/app/file/fssync/configure.zcml
===================================================================
--- Zope3/trunk/src/zope/app/file/fssync/configure.zcml 2004-05-24 18:42:17 UTC (rev 24938)
+++ Zope3/trunk/src/zope/app/file/fssync/configure.zcml 2004-05-24 19:01:42 UTC (rev 24939)
@@ -0,0 +1,17 @@
+<configure
+ xmlns='http://namespaces.zope.org/zope'
+ xmlns:fssync='http://namespaces.zope.org/fssync'
+ i18n_domain='zope'
+ >
+
+ <fssync:adapter
+ class="zope.app.file.File"
+ factory=".adapter.FileAdapter"
+ />
+
+ <fssync:adapter
+ class="zope.app.file.Image"
+ factory=".adapter.FileAdapter"
+ />
+
+</configure>
Property changes on: Zope3/trunk/src/zope/app/file/fssync/configure.zcml
___________________________________________________________________
Name: svn:mime-type
+ text/xml
Name: svn:eol-style
+ native
Added: Zope3/trunk/src/zope/app/file/fssync/zope.app.file.fssync-configure.zcml
===================================================================
--- Zope3/trunk/src/zope/app/file/fssync/zope.app.file.fssync-configure.zcml 2004-05-24 18:42:17 UTC (rev 24938)
+++ Zope3/trunk/src/zope/app/file/fssync/zope.app.file.fssync-configure.zcml 2004-05-24 19:01:42 UTC (rev 24939)
@@ -0,0 +1 @@
+<include package="zope.app.file.fssync" />
Property changes on: Zope3/trunk/src/zope/app/file/fssync/zope.app.file.fssync-configure.zcml
___________________________________________________________________
Name: svn:mime-type
+ text/xml
Name: svn:eol-style
+ native
Deleted: Zope3/trunk/src/zope/app/file/fssync.py
===================================================================
--- Zope3/trunk/src/zope/app/file/fssync.py 2004-05-24 18:42:17 UTC (rev 24938)
+++ Zope3/trunk/src/zope/app/file/fssync.py 2004-05-24 19:01:42 UTC (rev 24939)
@@ -1,34 +0,0 @@
-##############################################################################
-#
-# 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.
-#
-##############################################################################
-"""Filesystem synchronization support.
-
-$Id$
-"""
-from zope.interface import implements
-from zope.fssync.server.entryadapter import ObjectEntryAdapter
-from zope.fssync.server.interfaces import IObjectFile
-
-class FileAdapter(ObjectEntryAdapter):
- """ObjectFile adapter for file objects.
- """
- implements(IObjectFile)
-
- def getBody(self):
- return self.context.data
-
- def setBody(self, data):
- self.context.data = data
-
- def extra(self):
- return AttrMapping(self.context, ('contentType',))
Modified: Zope3/trunk/src/zope/app/zptpage/DEPENDENCIES.cfg
===================================================================
--- Zope3/trunk/src/zope/app/zptpage/DEPENDENCIES.cfg 2004-05-24 18:42:17 UTC (rev 24938)
+++ Zope3/trunk/src/zope/app/zptpage/DEPENDENCIES.cfg 2004-05-24 19:01:42 UTC (rev 24939)
@@ -1,7 +1,6 @@
persistent
zope.component
zope.exceptions
-zope.fssync
zope.interface
zope.pagetemplate
zope.proxy
Modified: Zope3/trunk/src/zope/app/zptpage/PACKAGE.cfg
===================================================================
--- Zope3/trunk/src/zope/app/zptpage/PACKAGE.cfg 2004-05-24 18:42:17 UTC (rev 24938)
+++ Zope3/trunk/src/zope/app/zptpage/PACKAGE.cfg 2004-05-24 19:01:42 UTC (rev 24939)
@@ -7,5 +7,6 @@
</load>
<collection>
+fssync -
textindex -
</collection>
Modified: Zope3/trunk/src/zope/app/zptpage/configure.zcml
===================================================================
--- Zope3/trunk/src/zope/app/zptpage/configure.zcml 2004-05-24 18:42:17 UTC (rev 24938)
+++ Zope3/trunk/src/zope/app/zptpage/configure.zcml 2004-05-24 19:01:42 UTC (rev 24939)
@@ -1,6 +1,5 @@
<configure
xmlns='http://namespaces.zope.org/zope'
- xmlns:fssync='http://namespaces.zope.org/fssync'
i18n_domain='zope'
>
@@ -61,12 +60,7 @@
factory=".zptpage.Sized"
/>
- <fssync:adapter
- class=".zptpage.ZPTPage"
- factory=".fssync.ZPTPageAdapter"
- />
-
<!-- include browser package -->
<include package=".browser" />
Added: Zope3/trunk/src/zope/app/zptpage/fssync/DEPENDENCIES.cfg
===================================================================
--- Zope3/trunk/src/zope/app/zptpage/fssync/DEPENDENCIES.cfg 2004-05-24 18:42:17 UTC (rev 24938)
+++ Zope3/trunk/src/zope/app/zptpage/fssync/DEPENDENCIES.cfg 2004-05-24 19:01:42 UTC (rev 24939)
@@ -0,0 +1,2 @@
+zope.fssync
+zope.interface
Added: Zope3/trunk/src/zope/app/zptpage/fssync/SETUP.cfg
===================================================================
--- Zope3/trunk/src/zope/app/zptpage/fssync/SETUP.cfg 2004-05-24 18:42:17 UTC (rev 24938)
+++ Zope3/trunk/src/zope/app/zptpage/fssync/SETUP.cfg 2004-05-24 19:01:42 UTC (rev 24939)
@@ -0,0 +1,5 @@
+# Tell zpkg how to install the ZCML slugs.
+
+<data-files skel/etc/package-includes>
+ zope.app.zptpage.fssync-configure.zcml
+</data-files>
Added: Zope3/trunk/src/zope/app/zptpage/fssync/__init__.py
===================================================================
--- Zope3/trunk/src/zope/app/zptpage/fssync/__init__.py 2004-05-24 18:42:17 UTC (rev 24938)
+++ Zope3/trunk/src/zope/app/zptpage/fssync/__init__.py 2004-05-24 19:01:42 UTC (rev 24939)
@@ -0,0 +1 @@
+# This directory is a Python package.
Property changes on: Zope3/trunk/src/zope/app/zptpage/fssync/__init__.py
___________________________________________________________________
Name: svn:mime-type
+ text/x-python
Name: svn:eol-style
+ native
Copied: Zope3/trunk/src/zope/app/zptpage/fssync/adapter.py (from rev 24933, Zope3/trunk/src/zope/app/zptpage/fssync.py)
Added: Zope3/trunk/src/zope/app/zptpage/fssync/configure.zcml
===================================================================
--- Zope3/trunk/src/zope/app/zptpage/fssync/configure.zcml 2004-05-24 18:42:17 UTC (rev 24938)
+++ Zope3/trunk/src/zope/app/zptpage/fssync/configure.zcml 2004-05-24 19:01:42 UTC (rev 24939)
@@ -0,0 +1,12 @@
+<configure
+ xmlns='http://namespaces.zope.org/zope'
+ xmlns:fssync='http://namespaces.zope.org/fssync'
+ i18n_domain='zope'
+ >
+
+ <fssync:adapter
+ class="zope.app.zptpage.ZPTPage"
+ factory=".adapter.ZPTPageAdapter"
+ />
+
+</configure>
Property changes on: Zope3/trunk/src/zope/app/zptpage/fssync/configure.zcml
___________________________________________________________________
Name: svn:mime-type
+ text/xml
Name: svn:eol-style
+ native
Added: Zope3/trunk/src/zope/app/zptpage/fssync/zope.app.zptpage.fssync-configure.zcml
===================================================================
--- Zope3/trunk/src/zope/app/zptpage/fssync/zope.app.zptpage.fssync-configure.zcml 2004-05-24 18:42:17 UTC (rev 24938)
+++ Zope3/trunk/src/zope/app/zptpage/fssync/zope.app.zptpage.fssync-configure.zcml 2004-05-24 19:01:42 UTC (rev 24939)
@@ -0,0 +1 @@
+<include package="zope.app.zptpage.fssync" />
Property changes on: Zope3/trunk/src/zope/app/zptpage/fssync/zope.app.zptpage.fssync-configure.zcml
___________________________________________________________________
Name: svn:mime-type
+ text/xml
Name: svn:eol-style
+ native
Deleted: Zope3/trunk/src/zope/app/zptpage/fssync.py
===================================================================
--- Zope3/trunk/src/zope/app/zptpage/fssync.py 2004-05-24 18:42:17 UTC (rev 24938)
+++ Zope3/trunk/src/zope/app/zptpage/fssync.py 2004-05-24 19:01:42 UTC (rev 24939)
@@ -1,35 +0,0 @@
-##############################################################################
-#
-# Copyright (c) 2004 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.
-#
-##############################################################################
-"""Filesystem synchronization support.
-
-$Id$
-"""
-
-from zope.interface import implements
-from zope.fssync.server.entryadapter import ObjectEntryAdapter
-from zope.fssync.server.interfaces import IObjectFile
-
-class ZPTPageAdapter(ObjectEntryAdapter):
- """ObjectFile adapter for ZPT page objects.
- """
- implements(IObjectFile)
-
- def getBody(self):
- return self.context.getSource()
-
- def setBody(self, data):
- # Convert the data to Unicode, since that's what ZPTPage wants;
- # it's normally read from a file so it'll be bytes.
- # XXX This will die if it's not ASCII. Guess encoding???
- self.context.setSource(unicode(data))
More information about the Zope3-Checkins
mailing list