r1 - 28 Jul 2004 - 11:52:52 - LisaDusseaultYou are here: OSAF >  Journal Web  >  TWikiUsers > LisaDusseault > LisaDusseaultNotes > LisaDusseault20040728
Previous notes

Notes on Clouds API

How to get an item's cloud with current API, roughly extracted from unit tests:

  mailMessageItem = Mail.MailMessage("mailMessageItem")
  parcelManager = Parcel.getManager(repository, path, etc etc)
  namespace = "http://foobar/namespace"
  cloud = parcelManager.lookup(parcelNamespace, "MailMessageMixin/Cloud")
  items = cloud.getItems(mailMessageItem)

Of course our unit test framework has abstracted some of this away, but that's not the right place to make it simpler. Since we already have the mailMesasgeItem and need it to get the cloud anyway, we can use that to know which repository etc, and avoid going through the Parcel.Manager lookup method. The interface could be used like this:

  mailMessageItem = Mail.MailMessage("mailMessageItem")
  cloud = mailMessageItem.getCloud("Cloud")
  items = cloud.getItems(mailMessageItem)

Or even simpler:

  mailMessageItem = Mail.MailMessage("mailMessageItem")
  items = mailMessageItem.getItemsInCloud("Cloud")

This would imply methods being added to Item to either get one of the Item's clouds, or all of the things in one of the Item's clouds.

-- LisaDusseault - 28 Jul 2004

Edit | WYSIWYG | Attach | Printable | Raw View | Backlinks: Web, All Webs | History: r1 | More topic actions
 
Open Source Applications Foundation
Except where otherwise noted, this site and its content are licensed by OSAF under an Creative Commons License, Attribution Only 3.0.
See list of page contributors for attributions.