Пример #1
0
 def _set(kls, obj, value):
     FieldsMigrator._set(obj, value.get('fieldvalues', []))
     ObjectPropertiesMigrator._set(obj, value.get('properties', []))
     WorkflowStateMigrator._set(obj, value.get('workflow', ''))
     WorkflowHistoryMigrator._set(obj, value.get('workflow_history', []))
     OwnerMigrator._set(obj, value.get('owner', 'admin'))
     AnnotationsMigrator._set(obj, value.get('annotations', []))
     MarkerInterfacesMigrator._set(obj, value.get('marker_interfaces', []))
     LocalRolesMigrator._set(obj, value.get('local_roles', []))
     VersionsMigrator._set(obj, value.get('versions', []))
     SyndicationMigrator._set(obj, value.get('syndication', {}))
     PortletsMigrator._set(obj, value.get('portlets', None))
     RedirectorMigrator._set(obj, value.get('redirects', []))
     AttributeMigrator._set(obj, value.get('attributes', {}))
     obj._p_changed = 1
Пример #2
0
 def _set(kls, obj, value):
     FieldsMigrator._set(obj, value.get('fieldvalues', []))
     ObjectPropertiesMigrator._set(obj, value.get('properties', []))
     WorkflowStateMigrator._set(obj, value.get('workflow', ''))
     WorkflowHistoryMigrator._set(obj, value.get('workflow_history', []))
     OwnerMigrator._set(obj, value.get('owner', 'admin'))
     AnnotationsMigrator._set(obj, value.get('annotations', []))
     MarkerInterfacesMigrator._set(obj, value.get('marker_interfaces', []))
     LocalRolesMigrator._set(obj, value.get('local_roles', []))
     VersionsMigrator._set(obj, value.get('versions', []))
     SyndicationMigrator._set(obj, value.get('syndication', {}))
     PortletsMigrator._set(obj, value.get('portlets', None))
     RedirectorMigrator._set(obj, value.get('redirects', []))
     AttributeMigrator._set(obj, value.get('attributes', {}))
     obj._p_changed = 1
Пример #3
0
 def _get(kls, obj, add_versions=True, attributes=[]):
     pt = aq_base(obj).portal_type
     data = {
         'fieldvalues': FieldsMigrator._get(obj),
         'id': obj.getId(),
         'portal_type': _portal_type_conversions.get(pt, pt),
         'properties': ObjectPropertiesMigrator._get(obj),
         'workflow': WorkflowStateMigrator._get(obj),
         'workflow_history': WorkflowHistoryMigrator._get(obj),
         'owner': OwnerMigrator._get(obj),
         'annotations': AnnotationsMigrator._get(obj),
         'marker_interfaces': MarkerInterfacesMigrator._get(obj),
         'local_roles': LocalRolesMigrator._get(obj),
         'syndication': SyndicationMigrator._get(obj)
     }
     if add_versions:
         data['versions'] = VersionsMigrator._get(obj)
         data['portlets'] = PortletsMigrator._get(obj)
         data['redirects'] = RedirectorMigrator._get(obj)
         data['uids'] = findUids(data)
         data['attributes'] = AttributeMigrator._get(obj, attributes)
     return data
Пример #4
0
 def _get(kls, obj, add_versions=True, attributes=[]):
     pt = aq_base(obj).portal_type
     data = {
         'fieldvalues': FieldsMigrator._get(obj),
         'id': obj.getId(),
         'portal_type': _portal_type_conversions.get(pt, pt),
         'properties': ObjectPropertiesMigrator._get(obj),
         'workflow': WorkflowStateMigrator._get(obj),
         'workflow_history': WorkflowHistoryMigrator._get(obj),
         'owner': OwnerMigrator._get(obj),
         'annotations': AnnotationsMigrator._get(obj),
         'marker_interfaces': MarkerInterfacesMigrator._get(obj),
         'local_roles': LocalRolesMigrator._get(obj),
         'syndication': SyndicationMigrator._get(obj)
     }
     if add_versions:
         data['versions'] = VersionsMigrator._get(obj)
         data['portlets'] = PortletsMigrator._get(obj)
         data['redirects'] = RedirectorMigrator._get(obj)
         data['uids'] = findUids(data)
         data['attributes'] = AttributeMigrator._get(obj, attributes)
     return data