[Zope-CMF] IndexableObjectWrapper

yuppie y.2009 at wcm-solutions.de
Wed Mar 18 08:48:05 EDT 2009


Hi!


Tres Seaver wrote:
> Miles wrote:
>>  >> Can I suggest the following logic:
>>  >>
>>  >>   1. if the object already implements the IIndexableObject marker
>>  >> interface, no wrapping is required;

If we don't support 3., we can make 'no wrapping' the default.

>>  >>   2. otherwise, adapt to IIndexableObject to do the wrapping;
>>  >>
>>  >>   3. if no adapter is registered, fall back to the existing
>>  >> IndexableObjectWrapper class for BBB.
>>  >
>>  > That sounds like what I had in mind, but not for BBB.  I think of the
>>  > adapter scheme as a way to choose a non-default wrapper, rather than a
>>  > quasi-mandatory replacement for it.

What's the win of providing a default that way? IndexableObjectWrapper 
contains policy decisions, Plone e.g. doesn't use it. The current code 
on the branch registers an adapter for IContentish, so CMFDefault will 
never use that hardcoded default.

The change is in a new feature release. People can't expect full BBB if 
they use customized registrations or catalog content that doesn't 
implement IContentish.

>> Ok, well this logic is checked in now on the branch, and tests adjusted 
>> accordingly.  Without any warnings.
> 
> Thanks, looks good.

Looks unnecessarily complex to me. But I'm afraid I'm outvoted.


Cheers,

	Yuppie



More information about the Zope-CMF mailing list