[Zope-CVS] CVS: Products/Ape/lib/apelib/zope2 - ape.conf:1.1.2.1
Shane Hathaway
shane at zope.com
Fri Jan 2 00:22:16 EST 2004
Update of /cvs-repository/Products/Ape/lib/apelib/zope2
In directory cvs.zope.org:/tmp/cvs-serv9660
Added Files:
Tag: ape-0_8-branch
ape.conf
Log Message:
ape.conf is a sketch of ZConfig-based Ape configuration.
The sketch has more lines, but fewer characters, and it could be easier
to read and maintain.
=== Added File Products/Ape/lib/apelib/zope2/ape.conf ===
# This file specifies the basic Zope 2 configuration for Ape.
# Classifier
<classifier>
factory apelib.zope2.classifier.Classifier
<gateway [filesystem]>
factory apelib.fs.classification.FSClassificationSection
</gateway>
<gateway [sql]>
factory apelib.sql.classification.SQLClassification
</gateway>
</classifier>
# OID Generator
<oid-generator [filesystem]>
factory apelib.core.oidgen.PathOIDGenerator
</oid-generator>
<oid-generator [sql]>
factory apelib.sql.oidgen.SQLOIDGenerator
</oid-generator>
# Root object mapper (the root object is a PersistentMapping.)
<mapper root>
class Persistence.PersistentMapping
<serializer items>
factory apelib.zodb3.serializers.StringToPersistentPM
</serializer>
<gateway items[filesystem]>
factory apelib.fs.structure.RootDirectoryItems
</gateway>
<gateway items[sql]>
factory apelib.sql.structure.SQLFolderItems
</gateway>
<serializer roll_call>
order z
factory apelib.zodb3.serializers.RollCall
</serializer>
<register>
register-class false
for-generic root-oid
</register>
</mapper>
# 'common' is an abstract mapper that provides commonly used
# serializers and gateways.
<mapper common>
class none
<serializer id>
order a
factory apelib.zope2.ofsserial.IdAttribute
</serializer>
<gateway id[filesystem]>
factory apelib.fs.structure.FSAutoId
</gateway>
<gateway id[sql]>
factory apelib.sql.structure.SQLItemId
</gateway>
<serializer modtime>
factory apelib.zodb3.serializers.ModTimeAttribute
</serializer>
<gateway modtime[filesystem]>
factory apelib.fs.structure.FSModTime
</gateway>
<gateway modtime[sql]>
factory apelib.sql.structure.SQLModTime
</gateway>
<serializer security>
factory apelib.zope2.security.SecurityAttributes
</serializer>
<gateway security[filesystem]>
factory apelib.fs.security.FSSecurityAttributes
</gateway>
<gateway security[sql]>
factory apelib.sql.structure.SQLSecurityAttributes
</gateway>
<serializer remainder>
order z
factory apelib.zodb3.serializers.RemainingState
</serializer>
<gateway remainder[filesystem]>
factory apelib.fs.properties.FSSectionData('remainder')
</gateway>
<gateway remainder[sql]>
factory apelib.sql.structure.SQLRemainder
</gateway>
</mapper>
# 'common_p' is an abstract mapper with properties
<mapper common_p>
extends common
class none
<serializer properties>
factory apelib.zope2.ofsserial.OFSProperties
</serializer>
<gateway properties[filesystem]>
factory apelib.fs.properties.FSProperties
</gateway>
<gateway properties[sql]>
factory apelib.sql.structure.SQLProperties
</gateway>
</mapper>
# 'common_text' is an abstract mapper with properties and a text body
<mapper common_text>
extends common_p
class none
<serializer text>
factory apelib.core.serializers.StringDataAttribute('raw')
</serializer>
<gateway text[filesystem]>
factory apelib.fs.structure.FSFileData('text')
</gateway>
<gateway text[sql]>
factory apelib.sql.structure.SQLObjectData
</gateway>
</mapper>
# Folder mapper
<mapper folder>
class OFS.Folder.Folder
extends common_p
<serializer items>
factory apelib.zope2.ofsserial.FolderItems
</serializer>
<gateway items[filesystem]>
factory apelib.fs.structure.FSDirectoryItems
</gateway>
<gateway items[sql]>
factory apelib.sql.structure.SQLFolderItems
</gateway>
<register>
for-generic directory
</register>
</mapper>
# File mapper
<mapper file>
class OFS.Image.File
extends common_p
default-extension use_content_type
<serializer data>
factory apelib.zope2.ofsserial.FilePData
</serializer>
<gateway data[filesystem]>
factory apelib.fs.structure.FSFileData('binary')
</gateway>
<gateway data[sql]>
factory apelib.sql.structure.SQLObjectData
</gateway>
<register>
for-generic file
</register>
</mapper>
# Image mapper
<mapper OFS.Image.Image>
extends file
default-extension use_content_type
<register>
for-extensions .gif .jpg .jpeg .png
</register>
</mapper>
# Page template mapper
<mapper Products.PageTemplates.ZopePageTemplate.ZopePageTemplate>
extends common_text
default-extension .html
<serializer text>
factory apelib.core.serializers.StringDataAttribute('_text')
</serializer>
<register>
for-extensions .html .htm .zpt .pt
</register>
</mapper>
# DTML Document mapper
<mapper OFS.DTMLDocument.DTMLDocument>
extends common_text
default-extension .dtml
<serializer text>
factory apelib.core.serializers.StringDataAttribute('raw')
</serializer>
</mapper>
# DTML Method mapper
<mapper OFS.DTMLMethod.DTMLMethod>
extends OFS.DTMLDocument.DTMLDocument
default-extension .dtml
disable properties
<register>
for-extensions .dtml
</register>
</mapper>
# ZSQL Method mapper
<mapper Products.ZSQLMethods.SQL.SQL>
extends common_text
default-extension .sql
<serializer properties>
factory apelib.zope2.scripts.ZSQLMethodPropertiesSerializer
</serializer>
<serializer text>
factory apelib.zope2.scripts.ZSQLMethodSerializer
</serializer>
<register>
for-extensions .sql
</register>
</mapper>
# Python script mapper
<mapper Products.PythonScripts.PythonScript.PythonScript>
extends common_text
default-extension .py
disable properties
<serializer text>
factory apelib.zope2.scripts.PythonScriptSerializer
</serializer>
<register>
for-extensions .py
</register>
</mapper>
# User Folder mapper
<mapper AccessControl.User.UserFolder>
extends common
<serializer data>
factory apelib.zope2.security.UserFolderSerializer
</serializer>
<gateway data[filesystem]>
factory apelib.fs.security.FSUserList
</gateway>
<gateway data[sql]>
factory apelib.sql.structure.SQLUserList
</gateway>
</mapper>
# Mapper of anything that looks like a folder
<mapper anyfolder>
class none
extends folder
<serializer>
factory apelib.core.serializers.AnyObjectSerializer
</serializer>
<serializer properties>
factory apelib.zope2.ofsserial.OptionalOFSProperties
</serializer>
<register>
for-generic folder_object
</register>
</mapper>
# Mapper of anything that looks like a file
<mapper anyfile>
class none
extends common_p
<serializer>
factory apelib.core.serializers.AnyObjectSerializer
</serializer>
<serializer properties>
factory apelib.zope2.ofsserial.OptionalOFSProperties
</serializer>
<register>
for-generic file_object
</register>
</mapper>
# Application mapper
<mapper OFS.Application.Application>
extends folder
disable id
<register [filesystem]>
for-oid /
</register>
</mapper>
# Workarounds for objects that don't work with the anyfolder mapper,
# but do fine with anyfile.
<mapper anyfile>
<register>
for-class Products.CMFCore.SkinsTool.SkinsTool
for-class App.ApplicationManager.ApplicationManager
</register>
</mapper>
More information about the Zope-CVS
mailing list