What is the correct pattern for FTP representations of a CMF content type? I am trying to create a content export/import mechanism for some custom objects, but I've found a few different patterns to follow:

First of all, all content tries to use it's WebDAV representation. This is good for links and documents because it captures all the properties in one place. It's not so good for Files and Images because their metadata doesn't get exported/imported at all.

Secondly, the types which export a full set of information implement their own manage_FTPget methods which hard-code in the representation in some way. Document uses aliases, but only if the content type is text/html - if it is text/plain for example, aliases are bypassed. Link doesn't use aliases at all, and News just does whatever Document does.

Thirdly, folders store the title and description in a .properties file. The properties to be included in this file (title, description) are specifically specified in the import/export adapter.

My questions are:

 - what sort of pattern should be aimed for (ideally) here?

- should all the types use aliases to work out their DAV representation or was this abandonded?

- are there any 'hidden' advantages of im-/exporters adhering closely to the DAV views (as opposed to an im/export specific representation. e.g. a binary file and associated .properties file)

- should each object's representation take care of including all the required properties, or should there be some way of ensuring that all common metadata (DC values) are treated via some sort of common route



Zope-CMF maillist  -  Zope-CMF@lists.zope.org

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

Reply via email to