[Zope3-checkins] SVN: Zope3/trunk/ separate the fssync adapters for zope.app.dublincore, zope.app.module,

Fred L. Drake, Jr. fred at zope.com
Tue May 25 14:47:17 EDT 2004


Log message for revision 24966:
separate the fssync adapters for zope.app.dublincore, zope.app.module,
zope.app.site, and zope.app.utility



-=-
Added: Zope3/trunk/package-includes/zope.app.dublincore.fssync-configure.zcml
===================================================================
--- Zope3/trunk/package-includes/zope.app.dublincore.fssync-configure.zcml	2004-05-25 17:45:08 UTC (rev 24965)
+++ Zope3/trunk/package-includes/zope.app.dublincore.fssync-configure.zcml	2004-05-25 18:47:16 UTC (rev 24966)
@@ -0,0 +1 @@
+<include package="zope.app.dublincore.fssync" />


Property changes on: Zope3/trunk/package-includes/zope.app.dublincore.fssync-configure.zcml
___________________________________________________________________
Name: svn:mime-type
   + text/xml
Name: svn:eol-style
   + native

Added: Zope3/trunk/package-includes/zope.app.module.fssync-configure.zcml
===================================================================
--- Zope3/trunk/package-includes/zope.app.module.fssync-configure.zcml	2004-05-25 17:45:08 UTC (rev 24965)
+++ Zope3/trunk/package-includes/zope.app.module.fssync-configure.zcml	2004-05-25 18:47:16 UTC (rev 24966)
@@ -0,0 +1 @@
+<include package="zope.app.module.fssync" />


Property changes on: Zope3/trunk/package-includes/zope.app.module.fssync-configure.zcml
___________________________________________________________________
Name: svn:mime-type
   + text/xml
Name: svn:eol-style
   + native

Added: Zope3/trunk/package-includes/zope.app.site.fssync-configure.zcml
===================================================================
--- Zope3/trunk/package-includes/zope.app.site.fssync-configure.zcml	2004-05-25 17:45:08 UTC (rev 24965)
+++ Zope3/trunk/package-includes/zope.app.site.fssync-configure.zcml	2004-05-25 18:47:16 UTC (rev 24966)
@@ -0,0 +1 @@
+<include package="zope.app.site.fssync" />


Property changes on: Zope3/trunk/package-includes/zope.app.site.fssync-configure.zcml
___________________________________________________________________
Name: svn:mime-type
   + text/xml
Name: svn:eol-style
   + native

Added: Zope3/trunk/package-includes/zope.app.utility.fssync-configure.zcml
===================================================================
--- Zope3/trunk/package-includes/zope.app.utility.fssync-configure.zcml	2004-05-25 17:45:08 UTC (rev 24965)
+++ Zope3/trunk/package-includes/zope.app.utility.fssync-configure.zcml	2004-05-25 18:47:16 UTC (rev 24966)
@@ -0,0 +1 @@
+<include package="zope.app.utility.fssync" />


Property changes on: Zope3/trunk/package-includes/zope.app.utility.fssync-configure.zcml
___________________________________________________________________
Name: svn:mime-type
   + text/xml
Name: svn:eol-style
   + native

Added: Zope3/trunk/src/zope/app/dublincore/PACKAGE.cfg
===================================================================
--- Zope3/trunk/src/zope/app/dublincore/PACKAGE.cfg	2004-05-25 17:45:08 UTC (rev 24965)
+++ Zope3/trunk/src/zope/app/dublincore/PACKAGE.cfg	2004-05-25 18:47:16 UTC (rev 24966)
@@ -0,0 +1,5 @@
+# The fssync sub-package is a separate component.
+
+<collection>
+  fssync -
+</collection>

Modified: Zope3/trunk/src/zope/app/dublincore/annotatableadapter.py
===================================================================
--- Zope3/trunk/src/zope/app/dublincore/annotatableadapter.py	2004-05-25 17:45:08 UTC (rev 24965)
+++ Zope3/trunk/src/zope/app/dublincore/annotatableadapter.py	2004-05-25 18:47:16 UTC (rev 24966)
@@ -14,19 +14,16 @@
 """
 $Id$
 """
+from persistent.dict import PersistentDict
+from zope.xmlpickle import dumps, loads
 
-__metaclass__ = type
-
-from zope.fssync.server.entryadapter import ObjectEntryAdapter
-from zope.fssync.server.interfaces import IObjectFile
-from zope.interface import implements
 from zope.app.annotation.interfaces import IAnnotations, IAnnotatable
 from zope.app.dublincore.zopedublincore import ZopeDublinCore
-from zope.xmlpickle import dumps, loads
-from persistent.dict import PersistentDict
 
+
 DCkey = "zope.app.dublincore.ZopeDublinCore"
 
+
 class ZDCAnnotatableAdapter(ZopeDublinCore):
     """Adapt annotatable objects to Zope Dublin Core."""
 
@@ -52,17 +49,9 @@
 
 
 class ZDCAnnotationData(PersistentDict):
-    pass
+    """Data for a Dublin Core annotation.
 
-
-class ZDCAnnotationDataAdapter(ObjectEntryAdapter):
-
-    implements(IObjectFile)
-
-    def getBody(self):
-        return dumps(self.context.data)
-
-    def setBody(self, data):
-        data = loads(data)
-        self.context.clear()
-        self.context.update(data)
+    A specialized class is used to allow an alternate fssync
+    serialization to be registered.  See the
+    zope.app.dublincore.fssync package.
+    """

Modified: Zope3/trunk/src/zope/app/dublincore/configure.zcml
===================================================================
--- Zope3/trunk/src/zope/app/dublincore/configure.zcml	2004-05-25 17:45:08 UTC (rev 24965)
+++ Zope3/trunk/src/zope/app/dublincore/configure.zcml	2004-05-25 18:47:16 UTC (rev 24966)
@@ -1,7 +1,6 @@
 <configure
    xmlns="http://namespaces.zope.org/zope"
-   xmlns:event="http://namespaces.zope.org/event"
-   xmlns:fssync="http://namespaces.zope.org/fssync">
+   xmlns:event="http://namespaces.zope.org/event">
 
   <permission 
       id="zope.app.dublincore.view" 
@@ -59,12 +58,7 @@
                    zope.app.event.interfaces.IObjectCreatedEvent"
     />
 
-  <fssync:adapter
-      class=".annotatableadapter.ZDCAnnotationData"
-      factory=".annotatableadapter.ZDCAnnotationDataAdapter"
-      />
 
-
   <!-- Include browser package -->
 
   <include package=".browser" />

Added: Zope3/trunk/src/zope/app/dublincore/fssync/SETUP.cfg
===================================================================
--- Zope3/trunk/src/zope/app/dublincore/fssync/SETUP.cfg	2004-05-25 17:45:08 UTC (rev 24965)
+++ Zope3/trunk/src/zope/app/dublincore/fssync/SETUP.cfg	2004-05-25 18:47:16 UTC (rev 24966)
@@ -0,0 +1,5 @@
+# Tell zpkg about ZCML slugs.
+
+<data-files etc/package-includes>
+  zope.app.dublincore.fssync-*.zcml
+</data-files>

Added: Zope3/trunk/src/zope/app/dublincore/fssync/__init__.py
===================================================================
--- Zope3/trunk/src/zope/app/dublincore/fssync/__init__.py	2004-05-25 17:45:08 UTC (rev 24965)
+++ Zope3/trunk/src/zope/app/dublincore/fssync/__init__.py	2004-05-25 18:47:16 UTC (rev 24966)
@@ -0,0 +1 @@
+# This directory is a Python package.


Property changes on: Zope3/trunk/src/zope/app/dublincore/fssync/__init__.py
___________________________________________________________________
Name: svn:mime-type
   + text/x-python
Name: svn:eol-style
   + native

Added: Zope3/trunk/src/zope/app/dublincore/fssync/adapter.py
===================================================================
--- Zope3/trunk/src/zope/app/dublincore/fssync/adapter.py	2004-05-25 17:45:08 UTC (rev 24965)
+++ Zope3/trunk/src/zope/app/dublincore/fssync/adapter.py	2004-05-25 18:47:16 UTC (rev 24966)
@@ -0,0 +1,34 @@
+##############################################################################
+#
+# 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 for zope.app.dublincore.
+
+$Id$
+"""
+from zope.interface import implements
+
+from zope.fssync.server.entryadapter import ObjectEntryAdapter
+from zope.fssync.server.interfaces import IObjectFile
+
+
+class ZDCAnnotationDataAdapter(ObjectEntryAdapter):
+
+    implements(IObjectFile)
+
+    def getBody(self):
+        return dumps(self.context.data)
+
+    def setBody(self, data):
+        data = loads(data)
+        self.context.clear()
+        self.context.update(data)


Property changes on: Zope3/trunk/src/zope/app/dublincore/fssync/adapter.py
___________________________________________________________________
Name: svn:mime-type
   + text/x-python
Name: svn:eol-style
   + native

Added: Zope3/trunk/src/zope/app/dublincore/fssync/configure.zcml
===================================================================
--- Zope3/trunk/src/zope/app/dublincore/fssync/configure.zcml	2004-05-25 17:45:08 UTC (rev 24965)
+++ Zope3/trunk/src/zope/app/dublincore/fssync/configure.zcml	2004-05-25 18:47:16 UTC (rev 24966)
@@ -0,0 +1,10 @@
+<configure
+   xmlns="http://namespaces.zope.org/zope"
+   xmlns:fssync="http://namespaces.zope.org/fssync">
+
+  <fssync:adapter
+      class="zope.app.dublincore.annotatableadapter.ZDCAnnotationData"
+      factory=".adapter.ZDCAnnotationDataAdapter"
+      />
+
+</configure>


Property changes on: Zope3/trunk/src/zope/app/dublincore/fssync/configure.zcml
___________________________________________________________________
Name: svn:mime-type
   + text/xml
Name: svn:eol-style
   + native

Added: Zope3/trunk/src/zope/app/dublincore/fssync/zope.app.dublincore.fssync-configure.zcml
===================================================================
--- Zope3/trunk/src/zope/app/dublincore/fssync/zope.app.dublincore.fssync-configure.zcml	2004-05-25 17:45:08 UTC (rev 24965)
+++ Zope3/trunk/src/zope/app/dublincore/fssync/zope.app.dublincore.fssync-configure.zcml	2004-05-25 18:47:16 UTC (rev 24966)
@@ -0,0 +1 @@
+<include package="zope.app.dublincore.fssync" />


Property changes on: Zope3/trunk/src/zope/app/dublincore/fssync/zope.app.dublincore.fssync-configure.zcml
___________________________________________________________________
Name: svn:mime-type
   + text/xml
Name: svn:eol-style
   + native

Added: Zope3/trunk/src/zope/app/module/PACKAGE.cfg
===================================================================
--- Zope3/trunk/src/zope/app/module/PACKAGE.cfg	2004-05-25 17:45:08 UTC (rev 24965)
+++ Zope3/trunk/src/zope/app/module/PACKAGE.cfg	2004-05-25 18:47:16 UTC (rev 24966)
@@ -0,0 +1,5 @@
+# The fssync sub-package is a separate component.
+
+<collection>
+  fssync -
+</collection>

Modified: Zope3/trunk/src/zope/app/module/__init__.py
===================================================================
--- Zope3/trunk/src/zope/app/module/__init__.py	2004-05-25 17:45:08 UTC (rev 24965)
+++ Zope3/trunk/src/zope/app/module/__init__.py	2004-05-25 18:47:16 UTC (rev 24966)
@@ -24,8 +24,6 @@
 from zope.app.annotation.interfaces import IAttributeAnnotatable
 from zope.app.filerepresentation.interfaces import IFileFactory
 from zope.app.module.interfaces import IModuleManager
-from zope.fssync.server.entryadapter import ObjectEntryAdapter, AttrMapping
-from zope.fssync.server.interfaces import IObjectFile
 from zope.app.container.contained import Contained
 
 class Manager(Persistent, Contained):
@@ -87,20 +85,7 @@
 # to do it's magic:
 Registry = Manager
 
-class ModuleAdapter(ObjectEntryAdapter):
 
-    implements(IObjectFile)
-
-    def getBody(self):
-        return self.context.source
-
-    def setBody(self, source):
-        self.context.update(source)
-
-    def extra(self):
-        return AttrMapping(self.context, ("name",))
-
-
 class ModuleFactory(object):
 
     implements(IFileFactory)

Modified: Zope3/trunk/src/zope/app/module/configure.zcml
===================================================================
--- Zope3/trunk/src/zope/app/module/configure.zcml	2004-05-25 17:45:08 UTC (rev 24965)
+++ Zope3/trunk/src/zope/app/module/configure.zcml	2004-05-25 18:47:16 UTC (rev 24966)
@@ -12,11 +12,6 @@
         />
   </content>
 
-  <fssync:adapter
-      class=".Manager"
-      factory=".ModuleAdapter"
-      />
-
   <adapter
       for="zope.app.site.interfaces.ISiteManagementFolder"
       provides="zope.app.filerepresentation.interfaces.IFileFactory"

Added: Zope3/trunk/src/zope/app/module/fssync/SETUP.cfg
===================================================================
--- Zope3/trunk/src/zope/app/module/fssync/SETUP.cfg	2004-05-25 17:45:08 UTC (rev 24965)
+++ Zope3/trunk/src/zope/app/module/fssync/SETUP.cfg	2004-05-25 18:47:16 UTC (rev 24966)
@@ -0,0 +1,5 @@
+# Tell zpkg about ZCML slugs.
+
+<data-files etc/package-includes>
+  zope.app.module.fssync-*.zcml
+</data-files>

Added: Zope3/trunk/src/zope/app/module/fssync/__init__.py
===================================================================
--- Zope3/trunk/src/zope/app/module/fssync/__init__.py	2004-05-25 17:45:08 UTC (rev 24965)
+++ Zope3/trunk/src/zope/app/module/fssync/__init__.py	2004-05-25 18:47:16 UTC (rev 24966)
@@ -0,0 +1 @@
+# This directory is a Python package.


Property changes on: Zope3/trunk/src/zope/app/module/fssync/__init__.py
___________________________________________________________________
Name: svn:mime-type
   + text/x-python
Name: svn:eol-style
   + native

Added: Zope3/trunk/src/zope/app/module/fssync/adapter.py
===================================================================
--- Zope3/trunk/src/zope/app/module/fssync/adapter.py	2004-05-25 17:45:08 UTC (rev 24965)
+++ Zope3/trunk/src/zope/app/module/fssync/adapter.py	2004-05-25 18:47:16 UTC (rev 24966)
@@ -0,0 +1,35 @@
+##############################################################################
+#
+# 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 synchroniation support for zope.app.module.
+
+$Id$
+"""
+from zope.interface import implements
+
+from zope.fssync.server.entryadapter import ObjectEntryAdapter, AttrMapping
+from zope.fssync.server.interfaces import IObjectFile
+
+
+class ModuleAdapter(ObjectEntryAdapter):
+
+    implements(IObjectFile)
+
+    def getBody(self):
+        return self.context.source
+
+    def setBody(self, source):
+        self.context.update(source)
+
+    def extra(self):
+        return AttrMapping(self.context, ("name",))


Property changes on: Zope3/trunk/src/zope/app/module/fssync/adapter.py
___________________________________________________________________
Name: svn:mime-type
   + text/x-python
Name: svn:eol-style
   + native

Added: Zope3/trunk/src/zope/app/module/fssync/configure.zcml
===================================================================
--- Zope3/trunk/src/zope/app/module/fssync/configure.zcml	2004-05-25 17:45:08 UTC (rev 24965)
+++ Zope3/trunk/src/zope/app/module/fssync/configure.zcml	2004-05-25 18:47:16 UTC (rev 24966)
@@ -0,0 +1,11 @@
+<configure
+    xmlns="http://namespaces.zope.org/zope"
+    xmlns:fssync="http://namespaces.zope.org/fssync"
+    >
+
+  <fssync:adapter
+      class="zope.app.module.Manager"
+      factory=".adapter.ModuleAdapter"
+      />
+
+</configure>


Property changes on: Zope3/trunk/src/zope/app/module/fssync/configure.zcml
___________________________________________________________________
Name: svn:mime-type
   + text/xml
Name: svn:eol-style
   + native

Added: Zope3/trunk/src/zope/app/module/fssync/zope.app.module.fssync-configure.zcml
===================================================================
--- Zope3/trunk/src/zope/app/module/fssync/zope.app.module.fssync-configure.zcml	2004-05-25 17:45:08 UTC (rev 24965)
+++ Zope3/trunk/src/zope/app/module/fssync/zope.app.module.fssync-configure.zcml	2004-05-25 18:47:16 UTC (rev 24966)
@@ -0,0 +1 @@
+<include package="zope.app.module.fssync" />


Property changes on: Zope3/trunk/src/zope/app/module/fssync/zope.app.module.fssync-configure.zcml
___________________________________________________________________
Name: svn:mime-type
   + text/xml
Name: svn:eol-style
   + native

Added: Zope3/trunk/src/zope/app/site/PACKAGE.cfg
===================================================================
--- Zope3/trunk/src/zope/app/site/PACKAGE.cfg	2004-05-25 17:45:08 UTC (rev 24965)
+++ Zope3/trunk/src/zope/app/site/PACKAGE.cfg	2004-05-25 18:47:16 UTC (rev 24966)
@@ -0,0 +1,5 @@
+# The fssync sub-package is a separate component.
+
+<collection>
+  fssync -
+</collection>

Modified: Zope3/trunk/src/zope/app/site/configure.zcml
===================================================================
--- Zope3/trunk/src/zope/app/site/configure.zcml	2004-05-25 17:45:08 UTC (rev 24965)
+++ Zope3/trunk/src/zope/app/site/configure.zcml	2004-05-25 18:47:16 UTC (rev 24966)
@@ -1,6 +1,5 @@
 <configure 
     xmlns="http://namespaces.zope.org/zope"
-    xmlns:fssync="http://namespaces.zope.org/fssync"
     >
 
   <module module=".interfaces">
@@ -62,22 +61,7 @@
         interface="zope.app.annotation.interfaces.IAttributeAnnotatable" />
 
     </content>
-
-  <fssync:adapter
-      class=".folder.SiteManagementFolder"
-      factory="zope.fssync.server.entryadapter.DirectoryAdapter"
-      />
   
-  <fssync:adapter
-      class=".service.ServiceManager"
-      factory=".service.ServiceManagerAdapter"
-      />
-  
-  <fssync:adapter
-      class=".service.ServiceRegistration"
-      factory="zope.app.registration.fssync.adapter.ComponentRegistrationAdapter"
-      />
-  
   <adapter 
       for="zope.app.site.interfaces.ISiteManager"
       provides="zope.app.filerepresentation.interfaces.IDirectoryFactory"

Added: Zope3/trunk/src/zope/app/site/fssync/SETUP.cfg
===================================================================
--- Zope3/trunk/src/zope/app/site/fssync/SETUP.cfg	2004-05-25 17:45:08 UTC (rev 24965)
+++ Zope3/trunk/src/zope/app/site/fssync/SETUP.cfg	2004-05-25 18:47:16 UTC (rev 24966)
@@ -0,0 +1,5 @@
+# Tell zpkg about ZCML slugs.
+
+<data-files etc/package-includes>
+  zope.app.site.fssync-*.zcml
+</data-files>

Added: Zope3/trunk/src/zope/app/site/fssync/__init__.py
===================================================================
--- Zope3/trunk/src/zope/app/site/fssync/__init__.py	2004-05-25 17:45:08 UTC (rev 24965)
+++ Zope3/trunk/src/zope/app/site/fssync/__init__.py	2004-05-25 18:47:16 UTC (rev 24966)
@@ -0,0 +1 @@
+# This directory is a Python package.


Property changes on: Zope3/trunk/src/zope/app/site/fssync/__init__.py
___________________________________________________________________
Name: svn:mime-type
   + text/x-python
Name: svn:eol-style
   + native

Added: Zope3/trunk/src/zope/app/site/fssync/adapter.py
===================================================================
--- Zope3/trunk/src/zope/app/site/fssync/adapter.py	2004-05-25 17:45:08 UTC (rev 24965)
+++ Zope3/trunk/src/zope/app/site/fssync/adapter.py	2004-05-25 18:47:16 UTC (rev 24966)
@@ -0,0 +1,18 @@
+"""Filesystem synchronization support for zope.app.site.
+
+$Id$
+"""
+from zope.fssync.server.entryadapter import AttrMapping, DirectoryAdapter
+from zope.proxy import removeAllProxies
+
+
+_smattrs = (
+    '_modules',                         # PersistentModuleRegistry
+    '_bindings',
+)
+
+class ServiceManagerAdapter(DirectoryAdapter):
+
+    def extra(self):
+        obj = removeAllProxies(self.context)
+        return AttrMapping(obj, _smattrs)


Property changes on: Zope3/trunk/src/zope/app/site/fssync/adapter.py
___________________________________________________________________
Name: svn:mime-type
   + text/x-python
Name: svn:eol-style
   + native

Added: Zope3/trunk/src/zope/app/site/fssync/configure.zcml
===================================================================
--- Zope3/trunk/src/zope/app/site/fssync/configure.zcml	2004-05-25 17:45:08 UTC (rev 24965)
+++ Zope3/trunk/src/zope/app/site/fssync/configure.zcml	2004-05-25 18:47:16 UTC (rev 24966)
@@ -0,0 +1,21 @@
+<configure 
+    xmlns="http://namespaces.zope.org/zope"
+    xmlns:fssync="http://namespaces.zope.org/fssync"
+    >
+
+  <fssync:adapter
+      class="zope.app.site.folder.SiteManagementFolder"
+      factory="zope.fssync.server.entryadapter.DirectoryAdapter"
+      />
+  
+  <fssync:adapter
+      class="zope.app.site.service.ServiceManager"
+      factory=".adapter.ServiceManagerAdapter"
+      />
+  
+  <fssync:adapter
+      class="zope.app.site.service.ServiceRegistration"
+      factory="zope.app.registration.fssync.adapter.ComponentRegistrationAdapter"
+      />
+
+</configure>


Property changes on: Zope3/trunk/src/zope/app/site/fssync/configure.zcml
___________________________________________________________________
Name: svn:mime-type
   + text/xml
Name: svn:eol-style
   + native

Added: Zope3/trunk/src/zope/app/site/fssync/zope.app.site.fssync-configure.zcml
===================================================================
--- Zope3/trunk/src/zope/app/site/fssync/zope.app.site.fssync-configure.zcml	2004-05-25 17:45:08 UTC (rev 24965)
+++ Zope3/trunk/src/zope/app/site/fssync/zope.app.site.fssync-configure.zcml	2004-05-25 18:47:16 UTC (rev 24966)
@@ -0,0 +1 @@
+<include package="zope.app.site.fssync" />


Property changes on: Zope3/trunk/src/zope/app/site/fssync/zope.app.site.fssync-configure.zcml
___________________________________________________________________
Name: svn:mime-type
   + text/xml
Name: svn:eol-style
   + native

Modified: Zope3/trunk/src/zope/app/site/service.py
===================================================================
--- Zope3/trunk/src/zope/app/site/service.py	2004-05-25 17:45:08 UTC (rev 24965)
+++ Zope3/trunk/src/zope/app/site/service.py	2004-05-25 18:47:16 UTC (rev 24966)
@@ -31,7 +31,6 @@
 
 import zope.interface
 from zope.component.exceptions import ComponentLookupError
-from zope.fssync.server.entryadapter import AttrMapping, DirectoryAdapter
 from zope.proxy import removeAllProxies
 
 import zope.app.registration.interfaces
@@ -314,32 +313,15 @@
         service_manager = zapi.getServices(self)
         return service_manager.getInterfaceFor(self.name)
 
-
     def activated(self):
         service = self.getComponent()
         if IBindingAware.providedBy(service):
             service.bound(self.name)
 
-
     def deactivated(self):
         service = self.getComponent()
         if IBindingAware.providedBy(service):
             service.unbound(self.name)
 
-
     def usageSummary(self):
         return self.name + " Service"
-
-
-# Fssync stuff
-
-_smattrs = (
-    '_modules',                         # PersistentModuleRegistry
-    '_bindings',
-)
-
-class ServiceManagerAdapter(DirectoryAdapter):
-
-    def extra(self):
-        obj = removeAllProxies(self.context)
-        return AttrMapping(obj, _smattrs)

Added: Zope3/trunk/src/zope/app/utility/PACKAGE.cfg
===================================================================
--- Zope3/trunk/src/zope/app/utility/PACKAGE.cfg	2004-05-25 17:45:08 UTC (rev 24965)
+++ Zope3/trunk/src/zope/app/utility/PACKAGE.cfg	2004-05-25 18:47:16 UTC (rev 24966)
@@ -0,0 +1,5 @@
+# The fssync sub-package is a separate component.
+
+<collection>
+  fssync -
+</collection>

Modified: Zope3/trunk/src/zope/app/utility/configure.zcml
===================================================================
--- Zope3/trunk/src/zope/app/utility/configure.zcml	2004-05-25 17:45:08 UTC (rev 24965)
+++ Zope3/trunk/src/zope/app/utility/configure.zcml	2004-05-25 18:47:16 UTC (rev 24966)
@@ -1,6 +1,5 @@
 <configure 
-  xmlns="http://namespaces.zope.org/zope"
-  xmlns:fssync="http://namespaces.zope.org/fssync">
+  xmlns="http://namespaces.zope.org/zope">
 
   <content class=".LocalUtilityService">
     
@@ -24,11 +23,7 @@
       set_schema="zope.app.utility.interfaces.IUtilityRegistration" />
       
    </content>
-  
-  <fssync:adapter
-    class=".UtilityRegistration"
-    factory="zope.app.registration.fssync.adapter.ComponentRegistrationAdapter" />
-    
+
   <vocabulary
     name="Utility Component Interfaces"
     factory=".vocabulary.UtilityComponentInterfacesVocabulary" />

Added: Zope3/trunk/src/zope/app/utility/fssync/README.txt
===================================================================
--- Zope3/trunk/src/zope/app/utility/fssync/README.txt	2004-05-25 17:45:08 UTC (rev 24965)
+++ Zope3/trunk/src/zope/app/utility/fssync/README.txt	2004-05-25 18:47:16 UTC (rev 24966)
@@ -0,0 +1,10 @@
+This package is pretty slim, containing only configuration data for
+the application server.  This is maintained as a Python package to
+allow future versions to speciallize the registered fssync adapter
+implementation and allow existing instances to be used with the
+updated software.  Using the ZCML slug allows software-related
+configuration changes to be made in a way that's compatible with
+existing instance homes; placing the configuration directly in the
+instance home's site-packages/ would prevent existing site from
+picking up bug fixes that are effected by or otherwise involve
+configuration changes.


Property changes on: Zope3/trunk/src/zope/app/utility/fssync/README.txt
___________________________________________________________________
Name: svn:mime-type
   + text/plain
Name: svn:eol-style
   + native

Added: Zope3/trunk/src/zope/app/utility/fssync/SETUP.cfg
===================================================================
--- Zope3/trunk/src/zope/app/utility/fssync/SETUP.cfg	2004-05-25 17:45:08 UTC (rev 24965)
+++ Zope3/trunk/src/zope/app/utility/fssync/SETUP.cfg	2004-05-25 18:47:16 UTC (rev 24966)
@@ -0,0 +1,5 @@
+# Tell zpkg to install ZCML slugs.
+
+<data-files etc/package-includes>
+  zope.app.utility.fssync-*.zcml
+</data-files>

Added: Zope3/trunk/src/zope/app/utility/fssync/__init__.py
===================================================================
--- Zope3/trunk/src/zope/app/utility/fssync/__init__.py	2004-05-25 17:45:08 UTC (rev 24965)
+++ Zope3/trunk/src/zope/app/utility/fssync/__init__.py	2004-05-25 18:47:16 UTC (rev 24966)
@@ -0,0 +1 @@
+# This directory is a Python package.


Property changes on: Zope3/trunk/src/zope/app/utility/fssync/__init__.py
___________________________________________________________________
Name: svn:mime-type
   + text/x-python
Name: svn:eol-style
   + native

Added: Zope3/trunk/src/zope/app/utility/fssync/configure.zcml
===================================================================
--- Zope3/trunk/src/zope/app/utility/fssync/configure.zcml	2004-05-25 17:45:08 UTC (rev 24965)
+++ Zope3/trunk/src/zope/app/utility/fssync/configure.zcml	2004-05-25 18:47:16 UTC (rev 24966)
@@ -0,0 +1,10 @@
+<configure 
+  xmlns="http://namespaces.zope.org/zope"
+  xmlns:fssync="http://namespaces.zope.org/fssync">
+
+  <fssync:adapter
+    class="zope.app.utility.utility.UtilityRegistration"
+    factory="zope.app.registration.fssync.adapter.ComponentRegistrationAdapter"
+    />
+
+</configure>


Property changes on: Zope3/trunk/src/zope/app/utility/fssync/configure.zcml
___________________________________________________________________
Name: svn:mime-type
   + text/xml
Name: svn:eol-style
   + native

Added: Zope3/trunk/src/zope/app/utility/fssync/zope.app.utility.fssync-configure.zcml
===================================================================
--- Zope3/trunk/src/zope/app/utility/fssync/zope.app.utility.fssync-configure.zcml	2004-05-25 17:45:08 UTC (rev 24965)
+++ Zope3/trunk/src/zope/app/utility/fssync/zope.app.utility.fssync-configure.zcml	2004-05-25 18:47:16 UTC (rev 24966)
@@ -0,0 +1 @@
+<include package="zope.app.utility.fssync" />


Property changes on: Zope3/trunk/src/zope/app/utility/fssync/zope.app.utility.fssync-configure.zcml
___________________________________________________________________
Name: svn:mime-type
   + text/xml
Name: svn:eol-style
   + native




More information about the Zope3-Checkins mailing list