[Chandler-dev] Re: Modification exporters

Phillip J. Eby pje at telecommunity.com
Thu Feb 8 18:42:39 PST 2007


At 05:08 PM 2/8/2007 -0800, Jeffrey Harris wrote:
>Hi Phillip,
>
>Morgen and I were just discussing that we're going to need a little more
>infrastructure to make modification export work smoothly.
>
>It's possible to have a recurring event whose master is just an event,
>but one of whose modifications is, say, a task.
>
>Morgen's current plan is to have only master events passed in to the
>translator for export.  The translator should then yield appropriate
>modification records (if there are any).
>
>So it seems the event_export method should have some pluggable mechanism
>for generating all modifications, so if the event is recurring,
>event_export can iterate over modifications and pass them off to be
>checked for stamp modification record exporters.
>
>Does this seem reasonable?

Well, you could have a second Translator for that.  Your translator's 
__init__ could create an instance of the other translator and store it in 
your translator.  Then your event exporter could pass items to the other 
translator.

That might be a bit of overkill though, because it seems to me that you 
could probably just call back to the *same* translator (i.e. self), and 
detect whether you should be issuing modification records or regular 
records based on whether the item is a master event or not.



More information about the chandler-dev mailing list