[Chandler-dev] Moving sharing-specific attributes out of ContentItem

Morgen Sagen morgen at osafoundation.org
Fri Jan 26 14:09:38 PST 2007

On Jan 26, 2007, at 2:02 PM, Grant Baillie wrote:

> On 26 Jan, 2007, at 13:55, Morgen Sagen wrote:
>> To implement conflict resolution, I need to add a new sharing- 
>> specific attribute to ContentItem which will connect an item to  
>> its pending conflicts.  I am actually going to do this by defining  
>> a SharedItem stamp and put the new attribute in there, but I was  
>> hoping to be able to also move two long-time sharing-specific  
>> attributes of ContentItem, "shares" and "sharedIn", into this  
>> stamp as well.  This appears to be difficult because of  
>> ContentItem.isAttributeModifiable( ).  That method needs access to  
>> the "sharedIn" attribute, and if I move that attribute into the  
>> sharing layer, some core pim code is now going to have a  
>> dependency on the sharing package which I believe we want to avoid.
>> Any ideas?
> You probably want just an Annotation, not a Stamp, I'm guessing.

Ah, I thought they were one and the same, since I remember hearing  
the phrase "Stamping as Annotation" a lot. :-)  What are the  
differences between a Stamp and an Annotation?

> One possibility is to move isAttributeModifiable(), shares, and  
> sharedIn into your class. You can also refer to the sharedIn  
> attribute by its full name (which would end up being something like  
> 'osaf.pim.MorgensClass.sharedIn'), though that seems crufty to me.

If I move isAttributeModifiable( ) into my Annotation, and the pim  
calendar code relies on that method, the calendar code would have to  
import osaf.sharing, if I'm not mistaken.


More information about the chandler-dev mailing list