[Dev] collection changes
vajda at osafoundation.org
Mon Feb 27 16:05:33 PST 2006
With the 'move of collections below the line', I made a number of changes:
1. Collections are created via their constructor now, no more setting of
individual attributes as was done before.
2. 'rep' RIP, the actual name of the set or ref collection attribute is set
via the __collection__ class attribute, you still need to declare the
corresponding attribute of course (see collections.py for examples).
3. To declare a collection base class, you must also set the __metaclass__
class attribute to schema.CollectionClass (see collections.py for
4. The collection value API - typically, the AbstractSet or the ref
collection API - is automatically delegated from the collection item,
based on the type declared with the attribute named by __collection__.
There shouldn't be any need to reach into what used to be .rep anymore. If
you find a reach-in need, please let me know.
5. ListCollection maintains its order, the collection of a list collection is
only a ref collection now
6. AbstractCollection is now named ContentCollection to reflect what it
actually is, a subclass of ContentItem and Collection, the new
repository base class for collections.
I made a lot of changes all around, if I broke something or you have
questions, let me know.
More information about the Dev