[Zope-CMF] Re: GS catalog support
y.2006_ at wcm-solutions.de
Wed May 10 07:23:36 EDT 2006
Tres Seaver wrote:
> Wichert Akkerman wrote:
>> It seems GS doesn't have its own list so I'm posting this here - all the
>> relevant people are here anyway :)
>> I'm working on GenericSetup support for a number of packages from the
>> Plone 2.5 bundle but I'm running into a bit of a limitation in GS: the
>> current catalog export/import routines always use the same single
>> catalog; support for multiple catalogs is missing.
>> Looking at the code it shouldn't be too hard to write something that
>> handles multiple catalogs, but that would mean either creating a new
>> import/export-step with a new XML file or breaking the format for the
>> current catalog.xml.
>> I'm not sure what the best approach is at the moment; any opinions?
> I would create one XML file per catalog, using the current format, and
> modify the export / import step to create / look for a 'catalogs.xml'
> file which somehow points to the locations of the catalog(s) within the
> site, an maps them to the separate XML files. The import step would
> need to provide BBB for profiles which did not create this new file,
> defaulting to a mapping from 'catalog.xml' -> 'portal_catalog'.
I would do that in a different way.
I still believe a refactoring as proposed here would be an improvement,
it would also resolve the multiple catalogs issue:
But there is not everything prepared for that change, so for now I'd
like to see things done the old way: One import step per tool.
Ideally the names of the XML files created by the export steps
correspond to the IDs of the tools. For historical reasons tools
starting with 'portal_' loose that part of the name. And there are still
some XML files like 'workflows.xml' and 'cachingpolicymgr.xml' that have
completely different names.
Besides that naming issue 'importObjects' and 'exportObjects' should
work out of the box for other catalogs and adding new handlers requires
only a few lines of code.
More information about the Zope-CMF