def v4(context): from plone.namedfile.file import NamedBlobFile tool = IUpgradeTool(context) tool.uninstallProduct('uwosh.northstar') tool.installProduct('plone.app.workflowmanager') tool.uninstallProduct('plone.app.versioningbehavior') tool.installProduct('plone.app.versioningbehavior') tool.runImportStep('review.rfsepolicy', 'typeinfo') tool.portal.portal_catalog.manage_catalogReindex(context.REQUEST, context.REQUEST.RESPONSE, '') if 'portal_subskinstool' in tool.portal: tool.portal.manage_delObjects(['portal_subskinstool']) for old_layer in ['collective_cmfeditionsdexteritycompat', 'archetypes_kss', 'plone_kss']: if old_layer in tool.portal.portal_skins: tool.portal.portal_skins.manage_delObjects([old_layer]) # todo: remove inline validation def migrate_version_1(obj, path): if obj.version_1 is not None: return namedfile = obj.file namedblobfile = NamedBlobFile(namedfile.data._data, contentType=namedfile.contentType, filename=namedfile.filename) obj.version_1 = namedblobfile tool.migrateContent('article', migrate_version_1, nofail=True) def migrate_report_file(obj, path): if obj.file.__class__ is NamedBlobFile: return namedfile = obj.file namedblobfile = NamedBlobFile(namedfile.data._data, contentType=namedfile.contentType, filename=namedfile.filename) obj.file = namedblobfile tool.migrateContent('report', migrate_report_file, nofail=True)
def v6(context): tool = IUpgradeTool(context) tool.runImportStep('review.rfsepolicy', 'contentrules') tool.runImportStep('review.rfsepolicy', 'workflow')
def v3(context): tool = IUpgradeTool(context) tool.runImportStep('collective.contact.facetednav', 'actions') tool.runImportStep('collective.contact.facetednav', 'jsregistry')