RadioFreeAsia/rfa.kaltura — pull request #87 by flipmcf (2014-11-24 22:15:28+00:00)
Title: Refactor of Kaltura Sync

Big changes:
1) no longer using events to handle create / edit - now using at_post_create_script and at_post_edit_script

2) KalturaStorage for File field no longer executes a sync between Plone object and Kaltura object - it should only be concerned with storing the file field. Now, it sets the sentry 'fileChanged' and the property 'uploadToken' on the instance and lets the instance work out the syncronization between Plone and Kaltura

3) Broke apart the syncronization tasks into more manageable, bite-sized methods on the archetype class KalturaVideo (KalturaPlaylist was untouched and may now have bugs - but no users are using Playlists right now)

4) Field Syncronization mapping is handled in the class property 'fieldmap' on the archetype. The method syncMetadata() should walk over this mapping to sync data between the plone instance and the Kaltura media entry.

5) New fields / properties in the archetype that map directly to properties of the KalturaMediaEntry should be specified in the archetype class property 'fieldmap'

6) Data held in an external Kaltura Object (categories, for example) should get their own sync methods (self.syncCategories(), for example) KalturaMedia Objects do not have a 'categories' property, but there are separeate objects called 'categoryEntries' that map MediaObjects to Categories. This should be a separate step from field syncing.