Back to index

plone3  3.1.7
migrator.py
Go to the documentation of this file.
00001 try:
00002     from Products.ATContentTypes.migration.migrator import CMFItemMigrator
00003     from Products.ATContentTypes.migration.common import registerMigrator
00004     from Products.ATContentTypes.migration.walker import CatalogWalker
00005 except ImportError:
00006     CMFItemMigrator = None
00007 
00008 if CMFItemMigrator != None:
00009     class WickedDocMigrator(CMFItemMigrator):
00010         walker = CatalogWalker
00011         map = {'getText': 'setText'}
00012         
00013         src_portal_type = 'Document'
00014         src_meta_type = 'ATDocument'
00015         dst_portal_type = 'WickedDoc'
00016         dst_meta_type = 'WickedDoc'
00017 
00018         def custom(self):
00019             self.new.setContentType(self.old.getContentType())
00020 
00021     registerMigrator(WickedDocMigrator)