[Zope-CMF] IndexableObjectWrapper
Miles
miles at jamkit.com
Tue Mar 10 09:48:36 EDT 2009
Thanks
>>>>> Can anyone tell me if it is possible to register an adapter to
<snip>
> This should work with plain CMF and be simple to hook into the catalogue
> tool.
(For me) this is the root of the problem - it can only be hooked into
the catalog by subclassing at the moment, there is no other mechanism to
use different implementations. If there was, then plone.indexer (or
whatever) could be used directly.
Therefore, can I make a proposal (which I am happy to carry out), as I
think this is a desirable change?
PROPOSAL: Use CA to look up the indexable object wrapper
PROBLEM: It is not possible to provide alternative implementations of
the IndexableObjectWrapper class at the moment - this prevents
customising the indexing process.
SOLUTION: Look up the IndexableObjectWrapper using the Component
Architecture. The catalog tool will look up a named utility that
creates a wrapped object suitable for indexing.
The default implementation of the utility will return the object
wrapped using the current IndexableObjectWrapper.
If required, Local Site configuration can be used to provide different
implementations as needed.
BACKWARDS COMPATIBILITY: Any catalog implementation that used a
different wrapper class would have to subclass the main catalog and
override the relevant function, so will be unaffected by the change.
Any thoughts?
Miles
More information about the Zope-CMF
mailing list