[Dev] ContentItem.itemCollectionInclusions?

John Anderson john at osafoundation.org
Thu Aug 25 15:40:04 PDT 2005



Grant Baillie wrote:

> In the latest & greatest Chandler, I noticed that we still have an  
> "itemCollectionInclusions" attribute on ContentItem. This used to be  
> the inverse of ItemCollection.inclusions, which no longer exists.

this attribute should probably go away

>
> So, presumably, this attribute should go away. However, it is  
> actually in use in a couple of places in the code base:
>
> 1) The recurrence code does some delicate footwork trying to make  
> sure that individual occurrences end up in the correct collections.  
> (E.g. occurrences generated by a rrule aren't supposed to be in any  
> collection IIRC).

I handle this in the All collection with with a set that excludes 
generated events (see views.main.parcel.xml for details). Other 
collections that need to exclude these events could do it the same way 
-- or by unioning with the all collection. There should be no need to 
write any code to handle this -- which is the beauty of sets.

>
> 2) The Trash code (still under development, I think) uses it to make  
> sure that items are removed from their containing collections before  
> being moved to the Trash.

Again, this can all be done with sets and not code.

>
> I'm not sure how this stuff is supposed to work in the new setly  
> world, so perhaps someone who is could comment.
>
> --Grant
>
> Grant Baillie
> Open Source Applications Foundation
> http://www.osafoundation.org
>
>
>
> _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
>
> Open Source Applications Foundation "Dev" mailing list
> http://lists.osafoundation.org/mailman/listinfo/dev



More information about the Dev mailing list