[Zope3-checkins] CVS: Zope3/src/zope/app/fssync - metaconfigure.py:1.1 metadirectives.py:1.1 configure.zcml:1.4 meta.zcml:1.4 fsdirective.py:NONE
Stephan Richter
srichter@cosmos.phy.tufts.edu
Fri, 1 Aug 2003 19:32:22 -0400
Update of /cvs-repository/Zope3/src/zope/app/fssync
In directory cvs.zope.org:/tmp/cvs-serv23391
Modified Files:
configure.zcml meta.zcml
Added Files:
metaconfigure.py metadirectives.py
Removed Files:
fsdirective.py
Log Message:
Converted 'fssync' namespace to new style ZCML Meta Config.
=== Added File Zope3/src/zope/app/fssync/metaconfigure.py ===
##############################################################################
#
# Copyright (c) 2001, 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.
#
##############################################################################
""" Register class directive.
$Id: metaconfigure.py,v 1.1 2003/08/01 23:31:46 srichter Exp $
"""
from zope.app.fssync.fsregistry import provideSynchronizer
def registerFSRegistry(_context, class_=None, factory=None):
"""registerFSRegistry method to register Class and Serializer factory
associated with it.
"""
_context.action(
discriminator=('adapter', class_),
callable=provideSynchronizer,
args=(class_, factory) )
=== Added File Zope3/src/zope/app/fssync/metadirectives.py ===
##############################################################################
#
# Copyright (c) 2001, 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.
#
##############################################################################
"""Fssync Directive Schemas
$Id: metadirectives.py,v 1.1 2003/08/01 23:31:46 srichter Exp $
"""
from zope.configuration.fields import GlobalObject
from zope.interface import Interface
class IAdapterDirective(Interface):
class_ = GlobalObject(
title=u"Class",
description=u"Specifies the class for which this adapter is " \
u"registered.",
required=False)
factory = GlobalObject(
title=u"Factory",
description=u"Specifies the factory that will create the adapter.",
required=True)
=== Zope3/src/zope/app/fssync/configure.zcml 1.3 => 1.4 ===
--- Zope3/src/zope/app/fssync/configure.zcml:1.3 Mon Jun 9 17:38:09 2003
+++ Zope3/src/zope/app/fssync/configure.zcml Fri Aug 1 19:31:46 2003
@@ -1,13 +1,11 @@
-<zopeConfigure xmlns="http://namespaces.zope.org/zope">
+<configure xmlns="http://namespaces.zope.org/zope">
<serviceType
- id="FSRegistryService"
- interface="zope.app.interfaces.fssync.IGlobalFSSyncService"
- />
+ id="FSRegistryService"
+ interface="zope.app.interfaces.fssync.IGlobalFSSyncService"/>
<service
- serviceType="FSRegistryService"
- component="zope.app.fssync.fsregistry.fsRegistry"
- />
+ serviceType="FSRegistryService"
+ component="zope.app.fssync.fsregistry.fsRegistry"/>
-</zopeConfigure>
+</configure>
=== Zope3/src/zope/app/fssync/meta.zcml 1.3 => 1.4 ===
--- Zope3/src/zope/app/fssync/meta.zcml:1.3 Mon Jul 28 18:21:33 2003
+++ Zope3/src/zope/app/fssync/meta.zcml Fri Aug 1 19:31:46 2003
@@ -1,13 +1,11 @@
-<zopeConfigure xmlns='http://namespaces.zope.org/zope'>
+<configure
+ xmlns="http://namespaces.zope.org/zope"
+ xmlns:meta="http://namespaces.zope.org/meta">
- <directives namespace="http://namespaces.zope.org/fssync">
-
- <directive
+ <meta:directive
+ namespace="http://namespaces.zope.org/fssync"
name="adapter"
- attributes="class factory"
- handler=".fsdirective.registerFSRegistry"
- />
-
- </directives>
+ schema=".metadirectives.IAdapterDirective"
+ handler=".metaconfigure.registerFSRegistry"/>
-</zopeConfigure>
+</configure>
=== Removed File Zope3/src/zope/app/fssync/fsdirective.py ===