[Zope-CMF] IndexableObjectWrapper

yuppie y.2009 at wcm-solutions.de
Wed Mar 18 06:59:11 EDT 2009


Hi!


Miles wrote:
>> And I would prefer a new marker interface 'IIndexableObject'. I guess 
>> there are use cases that don't require restricted searchResults based on 
>> allowedRolesAndUsers and usually we want to catalog more attributes than 
>> just this one. So we need an interface that marks objects that provide 
>> all the attributes we want to catalog, not an interface that specifies 
>> the available attributes.
> 
> It's taken several readings for me to understand this, but I think I 
> agree.  I've adjusted the registrations so that they are based on a 
> marker interface, IIndexableObject.

Sorry. But it looks like you did get my point anyway.

> If the object already provides this 
> index, no wrapping is carried out.  I added some tests for this.

I'm afraid there are still different opinions about useful fallbacks. 
Please see my reply to Tres.

> I also adjusted the registration to use ICatalogAware rather than 
> IContentish, as that seemed to make more sense.

In the long run I'd like to get rid of ICatalogAware. Improving the 
usage of object events should make it obsolete.

The IndexableObjectWrapper doesn't use any features of ICatalogAware, so 
I can't see a need to use it here.

>> I agree it belongs somewhere else. Maybe a registerWrapper method. But 
>> can't we make the adapter lookup in catalog_object optional and wouldn't 
>> that make test setups simpler?
> 
> Ok, I bit the bullet and did some work on the tests.

Great!


Cheers,

	Yuppie



More information about the Zope-CMF mailing list