[Zope-CMF] LazyFilter and Effective Dates

Carl Rendell cer@sol43.com
Mon, 10 Jun 2002 07:33:20 -0700


On Monday, June 10, 2002, at 06:14  AM, Tres Seaver wrote:

> On Sun, 2002-06-09 at 19:13, seb bacon wrote:
>> Carl Rendell wrote:
>>> In sort, this allows me to obtain objects from a folder regardless of
>>> those objects being cataloged, yet still have the filters provided by
>>> 'searchContents()'. Folders for example are NOT cataloged so a 
>>> catalog
>>> search would not work for that case.
>>>
>>> If anyone things this is completely out of wack, on the wrong 
>>> tack, or
>>> something else... Please let me know.
>>
>> You're on the right tack, have you got it working yet?
>>
>>> BTW: it took a lot of digging to find the bits needed for this, 
>>> should
>>> it be an example on zopelabs or a how to?
>>
>> Both if you have time :)  Personally, I can't think of any 
>> circumstances
>> where you wouldn't want this to be the default behaviour of
>> objectValues.  I'd even suggest putting it into the CMF, but it may
>> break things for existing applications (though again, I can't imagine
>> how..?)
>
> It is kind of tricky;  implementing the filter in
> 'PortalFolder.object{Ids,Values,Items}' hardwires a policy into the
> class, which is probably not cool (and we would want to use
> 'content{Ids,Values,Items}' anyway, lest we break the ZMI somehow).
>
> I think that this is a good case for a utility component, implemented
> much as Carl's PythonScript, which allows the policy to be pluggable.
>

That sounds sensible. If I'm reading you correctly you're 
suggesting that filtering versions of 
PortalFolder.object{Ids,Values,Items} be placed in CMFDefault.utils 
if they were to be distributed.

Now that you've pointed it out, I can see the value of abstracting 
this out of the base.

The open question is.... Seb and I seem to use/need filtering of 
the results set from PortalFolder.object{Ids,Values,Items}, but is 
that the norm for the rest of the community? If is is the norm, 
then it would seem to be a good idea to distribute the utility. If 
not...

~C

Carl E. Rendell
Solution43
Information Distribution Consulting        |   "Ahhhh the power of
cer@sol43.com                              |    acquisition"  - Chef Z