[Zope-CMF] IndexableObjectWrapper

yuppie y.2009 at wcm-solutions.de
Tue Mar 10 08:56:41 EDT 2009


Hi!


Miles wrote:
> Thanks for the clarification.  The bits that confused me were:
> 
> class IndexableObjectSpecification(ObjectSpecificationDescriptor)
>     ...
> 
> class IndexableObjectWrapper(object):
> 
>      implements(IIndexableObjectWrapper)
>      __providedBy__ = IndexableObjectSpecification()
> 
> What does this code actually achieve (I get the implements bit, obviously)?!

This makes the wrapper transparent, allowing the index to look up 
adapters for the interfaces of the object. TextIndexNG3 works that way.

>> Whether that is good or bad or should be changed is a different issue.
> 
> I will write up a short proposal.

AFAICS wrapping the object before looking up adapters is unnecessary. 
The catalog should do the lookup directly and the existing features 
provided by IndexableObjectWrapper should be reimplemented as adapters.


Cheers,

	Yuppie



More information about the Zope-CMF mailing list