[Zope3-checkins]
CVS: Packages/SFTPGateway/src/ZConfig/components/basic
- __init__.py:1.1 component.xml:1.1 mapping.py:1.1 mapping.xml:1.1
Fred L. Drake, Jr.
fred at zope.com
Fri Jan 2 10:45:52 EST 2004
Update of /cvs-repository/Packages/SFTPGateway/src/ZConfig/components/basic
In directory cvs.zope.org:/tmp/cvs-serv25573/components/basic
Added Files:
__init__.py component.xml mapping.py mapping.xml
Log Message:
add a convenient mapping section type with documentation
=== Added File Packages/SFTPGateway/src/ZConfig/components/basic/__init__.py ===
# This is a Python package.
=== Added File Packages/SFTPGateway/src/ZConfig/components/basic/component.xml ===
<component>
<description>
Convenient loader which causes all the "basic" components to be
loaded.
</description>
<import package="ZConfig.components.basic" file="mapping.xml"/>
</component>
=== Added File Packages/SFTPGateway/src/ZConfig/components/basic/mapping.py ===
##############################################################################
#
# Copyright (c) 2003 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.
#
##############################################################################
"""Python datatype for the ZConfig.basic.mapping section type."""
def mapping(section):
return section.mapping
=== Added File Packages/SFTPGateway/src/ZConfig/components/basic/mapping.xml ===
<component>
<sectiontype name="ZConfig.basic.mapping"
datatype="ZConfig.components.basic.mapping.mapping">
<description>
Section that provides a simple mapping implementation. An
application should derive a more specific section type for use
in configuration files:
<import package="ZConfig.components.basic"
file="mapping.xml"
/>
<sectiontype name="mapping"
extends="ZConfig.basic.mapping"
/>
If a non-standard keytype is needed, it can be overridden as
well:
<sectiontype name="system-map"
extends="ZConfig.basic.mapping"
keytype="mypkg.datatypes.system_name"
/>
</description>
<key name="+"
attribute="mapping"
required="no"
/>
</sectiontype>
</component>
More information about the Zope3-Checkins
mailing list