Package osaf :: Package pim :: Module collections :: Class AbstractCollection
[frames | no frames]

Type AbstractCollection

object --+                
         |                
     CItem --+            
             |            
          Item --+        
                 |        
              Item --+    
                     |    
           ContentItem --+
                         |
                        AbstractCollection

Known Subclasses:
DifferenceCollection, FilteredCollection, IndexedSelectionCollection, IntersectionCollection, KindCollection, ListCollection, UnionCollection

The base class for all Collection types.

Collections are items and provide an API for client to subscribe to their notifications.

The general usage paradigm for collections is to instantiate a collection and then set the values of attributes as necessary (instead of during construction)
Method Summary
  __contains__(self, item)
  __iter__(self)
(deprecated) Use iterChildren instead.
  __nonzero__(self)
  __str__(self)
for debugging
  collectionChanged(self, op, item, name, other, *args)
The method called by the repository level set that backs a collection.
  contentsUpdated(self, item)
Callback for handling changes found by mapChangesCallable
  isEmpty(self)
Return True if the collection has no members
  isReadOnly(self)
Return True iff participating in only read-only shares
  notifySubscribers(self, op, item, name, other, *args)
Deliver notifications to all subscribers
  setup(self)
setup the color of a collection
Inherited from ContentItem: __init__, __unicode__, addToCollection, ExportItemData, getBasedAttributes, getCurrentMeEmailAddress, getEmailAddress, getMembershipItem, getSharedState, InitOutgoingAttributes, isAttributeModifiable, ItemAboutString, ItemBodyString, ItemWhoFromString, ItemWhoString, removeFromCollection, SetItemBodyString, StampKind
Inherited from Item: getDefaultParent, getKind, iterItems
Inherited from Item: __getitem__, _repr_, addValue, check, clone, copy, delete, dir, find, findMatch, findPath, findUUID, getACL, getAttributeValue, getItemChild, getItemCloud, getItemDisplayName, getItemDisplayString, getValue, getVersion, hasAttributeAspect, hasChild, hasChildren, hashItem, hasKey, hasLocalAttributeValue, hasValue, isAttributeDirty, isItemOf, isRemote, iterAttributeValues, iterChildren, mixinKinds, move, placeChild, printItem, refCount, removeACL, removeAttributeValue, removeValue, rename, setACL, setAttributeValue, setPinned, setValue, unwatchCollection, unwatchKind, walk, watchCollection, watchKind
Inherited from CItem: __new__, __repr__, getAttributeAspect, getDirty, isDeleted, isDeleting, isDirty, isNew, isPinned, isSchema, isStale, setDirty
Inherited from object: __delattr__, __getattribute__, __hash__, __reduce__, __reduce_ex__, __setattr__

Property Summary
  readOnly
Inherited from ContentItem: bodyString, sharedState

Instance Variable Summary
  about: Role(None)
  collectionList: Sequence(AbstractCollection)
  color: One(ColorType)
  colorizeIcon: One(Boolean)
  displayNameAlternatives: Mapping(Text)
  dontDisplayAsCalendar: One(Boolean)
  iconName: One(Bytes)
  iconNameHasKindVariant: One(Boolean)
  invitees: Sequence(EmailAddress)
  outOfTheBoxCollection: One(Boolean)
  renameable: One(Boolean)
  rep: One(AbstractSet)
  subscribers: Many(None)
Inherited from ContentItem: body, contentsOwner, createdOn, creator, importance, lastModified, lastModifiedBy, mine, modifiedOn, previousStamps, private, read, sharedIn, shares, TPBDetailItemOwner, TPBSelectedItemOwner, viewContainer
Inherited from Item: collections, description, displayName, kindExtent, monitors, references, watcherDispatch, watchers, watches
Inherited from Item: aliasedBy, path, typeFor, version
Inherited from CItem: itsKind, itsName, itsParent, itsPath, itsRoot, itsUUID, itsVersion, itsView

Class Variable Summary
dict __kind_clouds__ = {'sharing': <application.schema.Cloud ...
dict __kind_info__ = {'displayName': u'AbstractCollection'}
Inherited from ContentItem: READONLY, READWRITE, UNSHARED
Inherited from Item: __default_path__
Inherited from CItem: ADIRTY, CDIRTY, CMERGED, CONTAINER, COPYEXPORT, CORESCHEMA, DELETED, DELETING, DIRTY, FDIRTY, IMPORTING, MERGED, MUTATING, NDIRTY, NEW, NMERGED, NODIRTY, PINNED, RAW, RDIRTY, RMERGED, SAVEMASK, SCHEMA, STALE, VDIRTY, VMERGED, VRDIRTY

Instance Method Details

__iter__(self)

(deprecated) Use iterChildren instead.
Overrides:
repository.item.Item.Item.__iter__ (inherited documentation)

__str__(self)
(Informal representation operator)

for debugging
Overrides:
osaf.pim.items.ContentItem.__str__

collectionChanged(self, op, item, name, other, *args)

The method called by the repository level set that backs a collection.

collectionChanged dispatches to notifySubscribers which does the work of delivering notifications to all subscribers.
Overrides:
repository.item.Item.Item.collectionChanged

contentsUpdated(self, item)

Callback for handling changes found by mapChangesCallable

isEmpty(self)

Return True if the collection has no members

isReadOnly(self)

Return True iff participating in only read-only shares

notifySubscribers(self, op, item, name, other, *args)

Deliver notifications to all subscribers

Calls the method named in each subscribers' collectionEventHandler to deliver the notification. If the item has no collectionEventEventHandler, onCollectionEvent will be called if it exists.

setup(self)

setup the color of a collection

Property Details

readOnly

Get Method:
isReadOnly(self)

Instance Variable Details

about

Role(None)
Value:
<Role about of <class 'osaf.pim.collections.AbstractCollection'>>      

collectionList

Sequence(AbstractCollection)

Views, e.g. the Calendar, that display collections need to know which collection are combined to make up the calendar. collectionListis an optional parameter for this purpose.
Value:
<Role collectionList of <class 'osaf.pim.collections.AbstractCollectio\
n'>>                                                                   

color

One(ColorType)
Value:
<Role color of <class 'osaf.pim.collections.AbstractCollection'>>      

colorizeIcon

One(Boolean)
Value:
<Role colorizeIcon of <class 'osaf.pim.collections.AbstractCollection'\
>>                                                                     

displayNameAlternatives

Mapping(Text)
Value:
<Role displayNameAlternatives of <class 'osaf.pim.collections.Abstract\
Collection'>>                                                          

dontDisplayAsCalendar

One(Boolean)
Value:
<Role dontDisplayAsCalendar of <class 'osaf.pim.collections.AbstractCo\
llection'>>                                                            

iconName

One(Bytes)
Value:
<Role iconName of <class 'osaf.pim.collections.AbstractCollection'>>   

iconNameHasKindVariant

One(Boolean)
Value:
<Role iconNameHasKindVariant of <class 'osaf.pim.collections.AbstractC\
ollection'>>                                                           

invitees

Sequence(EmailAddress)

The people who are being invited to share in this item; filled in when the user types in the DV's 'invite' box, then cleared on send (entries copied to the share object).

Issue: Bad that we have just one of these per item collection, though an item collection could have multiple shares post-0.5
Value:
<Role invitees of <class 'osaf.pim.collections.AbstractCollection'>>   

outOfTheBoxCollection

One(Boolean)
Value:
<Role outOfTheBoxCollection of <class 'osaf.pim.collections.AbstractCo\
llection'>>                                                            

renameable

One(Boolean)
Value:
<Role renameable of <class 'osaf.pim.collections.AbstractCollection'>> 

rep

One(AbstractSet)
Value:
<Role rep of <class 'osaf.pim.collections.AbstractCollection'>>        

subscribers

Many(None)
Value:
<Role subscribers of <class 'osaf.pim.collections.AbstractCollection'>\
>                                                                      

Class Variable Details

__kind_clouds__

Type:
dict
Value:
{'copying': <application.schema.Cloud instance at 0xb7aa594c>,
 'sharing': <application.schema.Cloud instance at 0xb7aae18c>}         

__kind_info__

Type:
dict
Value:
{'displayName': u'AbstractCollection'}                                 

Generated by Epydoc 2.1 on Mon Dec 19 13:33:32 2005 http://epydoc.sf.net