Example #1
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
Example #2
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