I completed implementation of zcml-based import and export step
registration on the wichert-zcml-steps branch. The syntax for import
steps is this:
and for export steps:
steps registered using zcml are stored in a new registry. I added some
utility methods to the setup tool that look in both this registry and
the in-tool registry so all the standard machinery and ZMI interfaces
see all steps.
Exporting only exports steps from the in-tool registries.
There are several advantages to managing steps in this method:
- if a product is removed its steps no longer stick in the system, which
could lead to errors (it was breaking sites badly until we changed GS
to ignore steps with invalid handlers) and adds a lot of unremoveable
entries in its ZMI pages.
- even though steps are only loaded into the registry when a profile was
selected the way we have managed the step registration in the user
interface and API so far this has always been a silent and trivial to
trigger action. This lead to confusing behaviour: steps would appear
to be registered randomly depending on which profiles a user happened
to have accessed. With zcml registration the behaviour is simple and
predictable: if you install a product and load its zcml its
functionality becomes available. Since import steps have always needed
to check for presence of XML or marker files this is harmless.
Exporting should always be a safe operation.
- If we deprecate profile-based registration and eventually remove it
we can simplify a lot of code.
I intend to merge this branch into trunk next week.
Wichert Akkerman <[EMAIL PROTECTED]> It is simple to make things.
http://www.wiggy.net/ It is hard to make things simple.
Zope-CMF maillist - Zope-CMF@lists.zope.org
See http://collector.zope.org/CMF for bug reports and feature requests