Package osaf :: Package pim :: Module items :: Class ContentItem
[frames | no frames]

Type ContentItem

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

Known Subclasses:
AbstractCollection, AccountBase, AmazonItem, Calendar, Certificate, Contact, ContactName, EmailAddress, FeedItem, Group, ImportExportFormat, Location, MailDeliveryBase, MailDeliveryError, MIMEBase, MyKind1, Note, PhotoCollection, PhotoMixin, Project, RecurrencePattern, RecurrenceRule, RecurrenceRuleSet, RemindableMixin, Script, Share, ShareConduit, Tag, TaskEventExtraMixin, TaskMixin, User, WebDAVAccount

Content Item

Content Item is the abstract super-kind for things like Contacts, Calendar Events, Tasks, Mail Messages, and Notes. Content Items are user-level items, which a user might file, categorize, share, and delete.

Examples:
Method Summary
  __init__(self, name, parent, kind, view, **kw)
  __str__(self)
  __unicode__(self)
  addToCollection(self, collection)
Add self to the given collection.
  ExportItemData(self, clipboardHandler)
  getBasedAttributes(self, attribute)
Determine the schema attributes that affect this attribute (which might be a redirectTo or a Calculated attribute)
  getCurrentMeEmailAddress(self)
Lookup or create a current "me" EmailAddress.
  getEmailAddress(self, nameOrAddressString)
Lookup or create an EmailAddress based on the supplied string.
  getMembershipItem(self)
Get the item that should be used to test for membership tests i.e.
  getSharedState(self)
Examine all the shares this item participates in; if any of those shares are writable the shared state is READWRITE.
  InitOutgoingAttributes(self)
Init any attributes on ourself that are appropriate for a new outgoing item.
  isAttributeModifiable(self, attribute)
  ItemAboutString(self)
return unicode(item.about)
  ItemBodyString(self)
return unicode(item.body) converts from text lob to unicode
  ItemWhoFromString(self)
  ItemWhoString(self)
  removeFromCollection(self, collection, cutting)
Remove self from the given collection.
  SetItemBodyString(self, value)
  StampKind(self, operation, mixinKind)
Stamp ourself into the new kind defined by the Mixin Kind passed in mixinKind.
Inherited from Item: getDefaultParent, getKind, iterItems
Inherited from Item: __getitem__, __iter__, _repr_, addValue, check, clone, collectionChanged, 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
  bodyString
  sharedState

Instance Variable Summary
  body: Body -- One(Lob)
  contentsOwner: Sequence(Block)
  createdOn: created -- One(DateTime)
  creator: creator -- One(Contact)
  importance: Importance -- One(ImportanceEnum)
  lastModified: One(Text)
  lastModifiedBy: Last Modified By -- One(Contact)
  mine: One(Boolean)
  modifiedOn: Last Modified On -- One(DateTime)
  previousStamps: Sequence(Item)
  private: One(Boolean)
  read: One(Boolean)
  sharedIn: Sequence(None)
  shares: Sequence(None)
  TPBDetailItemOwner: Sequence(None)
  TPBSelectedItemOwner: Sequence(None)
  viewContainer: Sequence(None)
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'Content Item'}
str READONLY = 'read-only'
str READWRITE = 'read-write'
str UNSHARED = '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

addToCollection(self, collection)

Add self to the given collection.

For most items, just call collection.add(self), but for recurring events, this method is intercepted by a proxy and buffered while the user selects from various possible meanings for adding a recurring event to a collection.

getBasedAttributes(self, attribute)

Determine the schema attributes that affect this attribute (which might be a redirectTo or a Calculated attribute)

getCurrentMeEmailAddress(self)

Lookup or create a current "me" EmailAddress. The "me" EmailAddress is whichever one has the current IMAP default address. This method is here for convenient access, so users don't need to import Mail.

getEmailAddress(self, nameOrAddressString)

Lookup or create an EmailAddress based on the supplied string. This method is here for convenient access, so users don't need to import Mail.

getMembershipItem(self)

Get the item that should be used to test for membership tests i.e. if item in collection: should be if item.getMembershipItem() in collection

For most items, this is just itself, but for recurring events, this method is intercepted by a proxy.

getSharedState(self)

Examine all the shares this item participates in; if any of those shares are writable the shared state is READWRITE. If all the shares are read-only the shared state is READONLY. Otherwise UNSHARED.

InitOutgoingAttributes(self)

Init any attributes on ourself that are appropriate for a new outgoing item.

ItemAboutString(self)

return unicode(item.about)

ItemBodyString(self)

return unicode(item.body) converts from text lob to unicode

removeFromCollection(self, collection, cutting=False)

Remove self from the given collection.

For most items, just call collection.remove(self), but for recurring events, this method is intercepted by a proxy and buffered while the user selects from various possible meanings for removing a recurring event from a collection.

Cutting is typically equivalent to remove, but recurrence has different behavior for cutting operations than delete.

StampKind(self, operation, mixinKind)

Stamp ourself into the new kind defined by the Mixin Kind passed in mixinKind. * Take the current kind, the operation and the Mixin, and compute the future Kind. * Prepare to become the future Kind, which may mean creating one or more Mixins, or saving off Mixins. * Stamp ourself to the new Kind. * Move the attributes from the Mixin.

Property Details

sharedState

Get Method:
getSharedState(self)

Instance Variable Details

body

Body -- One(Lob)

All Content Items may have a body to contain notes. It's not decided yet whether this body would instead contain the payload for resource items such as presentations or spreadsheets -- resource items haven't been nailed down yet -- but the payload may be different from the notes because payload needs to know MIME type, etc.
Value:
<Role body of <class 'osaf.pim.items.ContentItem'>>                    

contentsOwner

Sequence(Block)
Value:
<Role contentsOwner of <class 'osaf.pim.items.ContentItem'>>           

createdOn

created -- One(DateTime)

DateTime this item was created
Value:
<Role createdOn of <class 'osaf.pim.items.ContentItem'>>               

creator

creator -- One(Contact)

Link to the contact who created the item.
Value:
<Role creator of <class 'osaf.pim.items.ContentItem'>>                 

importance

Importance -- One(ImportanceEnum)

Most items are of normal importance (no value need be show), however some things may be flagged either highly important or merely 'fyi'. This attribute is also used in the mail schema, so we shouldn't make any changes here that would break e-mail interoperability features.
Value:
<Role importance of <class 'osaf.pim.items.ContentItem'>>              

lastModified

One(Text)
Value:
<Role lastModified of <class 'osaf.pim.items.ContentItem'>>            

lastModifiedBy

Last Modified By -- One(Contact)

Link to the contact who last modified the item.
Value:
<Role lastModifiedBy of <class 'osaf.pim.items.ContentItem'>>          

mine

One(Boolean)
Value:
<Role mine of <class 'osaf.pim.items.ContentItem'>>                    

modifiedOn

Last Modified On -- One(DateTime)

DateTime this item was last modified
Value:
<Role modifiedOn of <class 'osaf.pim.items.ContentItem'>>              

previousStamps

Sequence(Item)

A list of mixin items that were used as stamps on this item previously.
Value:
<Role previousStamps of <class 'osaf.pim.items.ContentItem'>>          

private

One(Boolean)
Value:
<Role private of <class 'osaf.pim.items.ContentItem'>>                 

read

One(Boolean)

A flag indicating whether the this item has been 'viewed' by the user
Value:
<Role read of <class 'osaf.pim.items.ContentItem'>>                    

sharedIn

Sequence(None)
Value:
<Role sharedIn of <class 'osaf.pim.items.ContentItem'>>                

shares

Sequence(None)
Value:
<Role shares of <class 'osaf.pim.items.ContentItem'>>                  

TPBDetailItemOwner

Sequence(None)
Value:
<Role TPBDetailItemOwner of <class 'osaf.pim.items.ContentItem'>>      

TPBSelectedItemOwner

Sequence(None)
Value:
<Role TPBSelectedItemOwner of <class 'osaf.pim.items.ContentItem'>>    

viewContainer

Sequence(None)
Value:
<Role viewContainer of <class 'osaf.pim.items.ContentItem'>>           

Class Variable Details

__kind_clouds__

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

__kind_info__

Type:
dict
Value:
{'displayName': u'Content Item'}                                       

READONLY

Type:
str
Value:
'read-only'                                                            

READWRITE

Type:
str
Value:
'read-write'                                                           

UNSHARED

Type:
str
Value:
'unshared'                                                             

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