i've been doing a bit of Plone-related hacking around in GenericSetup recently, and have hit a bit of a snag because the current export mechanism seems to be pretty tightly married to the idea that a single object in the ZODB is going to only produce a single file in the exported profile.

this is not always the case, however; consider the case of page templates and python scripts in the skins that often have accompanying .metadata files. in the case of CMFFormController, this is particularly important, because the .metadata files contain validation and traversal information that is integral to the behaviour of the exported object.

the export behaviour ultimately comes down to 'name', 'body', and 'mime_type' attributes returned by the export adapter. my first impulse is to add support (in the GenericSetup.utils.exportObjects function) for these values to be returned as a tuple; if this is so, context.writeDataFile would be called once for each set of values.

even better, i think, would be to have the exporter return some sort of data payload object that could contain all of the data for any number of files that might need to be created. this would allow for more future flexibility, as well.

any thoughts on these suggestions?  other ideas on this problem?

-r

_______________________________________________
Zope-CMF maillist  -  Zope-CMF@lists.zope.org
http://mail.zope.org/mailman/listinfo/zope-cmf

See http://collector.zope.org/CMF for bug reports and feature requests

Reply via email to