[Zope3-checkins] CVS: Zope3/lib/python/Zope/App/OFS/Content/ZPTPage - FSSync.py:1.1.2.1 configure.zcml:1.9.2.1
Jim Fulton
jim@zope.com
Thu, 10 Oct 2002 00:43:28 -0400
Update of /cvs-repository/Zope3/lib/python/Zope/App/OFS/Content/ZPTPage
In directory cvs.zope.org:/tmp/cvs-serv16171/lib/python/Zope/App/OFS/Content/ZPTPage
Modified Files:
Tag: FileSystemSync-branch
configure.zcml
Added Files:
Tag: FileSystemSync-branch
FSSync.py
Log Message:
Initial exploratory prototype code
=== Added File Zope3/lib/python/Zope/App/OFS/Content/ZPTPage/FSSync.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: FSSync.py,v 1.1.2.1 2002/10/10 04:43:27 jim Exp $
"""
__metaclass__ = type
from Zope.App.FSSync.IObjectFile import IObjectFile
from Zope.App.FSSync.ObjectEntryAdapter import ObjectEntryAdapter
class ObjectFileAdapter(ObjectEntryAdapter):
"ObjectFile adapter for file objects"
__implements__ = IObjectFile
def getBody(self):
"See Zope.App.FSSync.IObjectFile.IObjectFile"
return self.context.getSource()
def setBody(self, data):
"See Zope.App.FSSync.IObjectFile.IObjectFile"
self.context.setSource(data)
__doc__ = ObjectFileAdapter.__doc__ + __doc__
=== Zope3/lib/python/Zope/App/OFS/Content/ZPTPage/configure.zcml 1.9 => 1.9.2.1 ===
--- Zope3/lib/python/Zope/App/OFS/Content/ZPTPage/configure.zcml:1.9 Fri Oct 4 16:02:03 2002
+++ Zope3/lib/python/Zope/App/OFS/Content/ZPTPage/configure.zcml Thu Oct 10 00:43:27 2002
@@ -26,6 +26,11 @@
+ <adapter
+ factory=".FSSync.ObjectFileAdapter"
+ provides="Zope.App.FSSync.IObjectFile."
+ for=".ZPTPage.IZPTPage" />
+
<include package=".Views" />
</zopeConfigure>