Commit 571087a4 authored by Alain Takoudjou's avatar Alain Takoudjou

Add some site dumping scripts.

Commis picked from:
  Jerome Perrn: Add more site dumping scripts. fb7d2155d98dab31f433cb664a0ba547bfd40852
  Lukasz Nowak : Yet another dump script. b5cbcc95a71c5ed5769bcbf7859106817d3728ed
  Lukasz Nowak : Add Order Builder dumper. 9768e64d2d2f4e25d5c4264bba81eecc0d82e0c2
  Lukasz Nowak : getLocalRolesGroupId does not exists on portal type. 183c69455e5b3c20d2ae9464859de09256b4c371
  Lukasz Nowak : Follow accessor name change. 1632a67b7a19deaddfb40e2b79c772cdd144f0cf
parent 8cdf7807
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="PythonScript" module="Products.PythonScripts.PythonScript"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>Script_magic</string> </key>
<value> <int>3</int> </value>
</item>
<item>
<key> <string>_bind_names</string> </key>
<value>
<object>
<klass>
<global name="NameAssignments" module="Shared.DC.Scripts.Bindings"/>
</klass>
<tuple/>
<state>
<dictionary>
<item>
<key> <string>_asgns</string> </key>
<value>
<dictionary>
<item>
<key> <string>name_container</string> </key>
<value> <string>container</string> </value>
</item>
<item>
<key> <string>name_context</string> </key>
<value> <string>context</string> </value>
</item>
<item>
<key> <string>name_m_self</string> </key>
<value> <string>script</string> </value>
</item>
<item>
<key> <string>name_subpath</string> </key>
<value> <string>traverse_subpath</string> </value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</state>
</object>
</value>
</item>
<item>
<key> <string>_body</string> </key>
<value> <string>for builder in sorted(context.getPortalObject().portal_deliveries.contentValues(),\n
key=lambda x:x.getTitle()):\n
print builder.getId()\n
print " Title: %s" % (builder.getTitle())\n
print " Simulation Select Method: %s" % (builder.getSimulationSelectMethodId())\n
print " Delivery Select Method: %s" % (builder.getDeliverySelectMethodId())\n
print " After Generation Script: %s" % (builder.getDeliveryAfterGenerationScriptId())\n
print\n
\n
for mg in sorted(builder.contentValues(), key=lambda x:x.getTitle()):\n
print builder.getId()\n
print " ", "\\n ".join([x for x in (\n
"Id: %s" % mg.getId(),\n
"Title: %s" % mg.getTitle(),\n
"Type: %s" % mg.getPortalType(),\n
"Collect Order Group: %s" % mg.getCollectOrderGroup(),\n
"Tested Properties: %r" % mg.getTestedPropertyList(),\n
"Update Always: %r" % mg.isUpdateAlways(),\n
\n
)])\n
print\n
\n
return printed\n
</string> </value>
</item>
<item>
<key> <string>_params</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>ERP5Site_dumpBuilderList</string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="PythonScript" module="Products.PythonScripts.PythonScript"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>Script_magic</string> </key>
<value> <int>3</int> </value>
</item>
<item>
<key> <string>_bind_names</string> </key>
<value>
<object>
<klass>
<global name="NameAssignments" module="Shared.DC.Scripts.Bindings"/>
</klass>
<tuple/>
<state>
<dictionary>
<item>
<key> <string>_asgns</string> </key>
<value>
<dictionary>
<item>
<key> <string>name_container</string> </key>
<value> <string>container</string> </value>
</item>
<item>
<key> <string>name_context</string> </key>
<value> <string>context</string> </value>
</item>
<item>
<key> <string>name_m_self</string> </key>
<value> <string>script</string> </value>
</item>
<item>
<key> <string>name_subpath</string> </key>
<value> <string>traverse_subpath</string> </value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</state>
</object>
</value>
</item>
<item>
<key> <string>_body</string> </key>
<value> <string>for business_template in sorted(context.getPortalObject().portal_templates.contentValues(portal_type=\'Business Template\'),\n
key=lambda x:x.getTitle()):\n
if business_template.getInstallationState() == \'installed\':\n
print business_template.getTitle()\n
\n
return printed\n
</string> </value>
</item>
<item>
<key> <string>_params</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>ERP5Site_dumpInstalledBusinessTemplateList</string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="PythonScript" module="Products.PythonScripts.PythonScript"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>Script_magic</string> </key>
<value> <int>3</int> </value>
</item>
<item>
<key> <string>_bind_names</string> </key>
<value>
<object>
<klass>
<global name="NameAssignments" module="Shared.DC.Scripts.Bindings"/>
</klass>
<tuple/>
<state>
<dictionary>
<item>
<key> <string>_asgns</string> </key>
<value>
<dictionary>
<item>
<key> <string>name_container</string> </key>
<value> <string>container</string> </value>
</item>
<item>
<key> <string>name_context</string> </key>
<value> <string>context</string> </value>
</item>
<item>
<key> <string>name_m_self</string> </key>
<value> <string>script</string> </value>
</item>
<item>
<key> <string>name_subpath</string> </key>
<value> <string>traverse_subpath</string> </value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</state>
</object>
</value>
</item>
<item>
<key> <string>_body</string> </key>
<value> <string>for builder in sorted(context.getPortalObject().portal_orders.contentValues(),\n
key=lambda x:x.getTitle()):\n
print builder.getId()\n
print " Title: %s" % (builder.getTitle())\n
print " Simulation Select Method: %s" % (builder.getSimulationSelectMethodId())\n
print " Delivery Select Method: %s" % (builder.getDeliverySelectMethodId())\n
print " After Generation Script: %s" % (builder.getDeliveryAfterGenerationScriptId())\n
print " Delivery Module Before Building Script: %s" % (builder.getDeliveryModuleBeforeBuildingScriptId())\n
print\n
\n
for mg in sorted(builder.contentValues(), key=lambda x:x.getTitle()):\n
print builder.getId()\n
print " ", "\\n ".join([x for x in (\n
"Id: %s" % mg.getId(),\n
"Title: %s" % mg.getTitle(),\n
"Type: %s" % mg.getPortalType(),\n
"Collect Order Group: %s" % mg.getCollectOrderGroup(),\n
"Tested Properties: %r" % mg.getTestedPropertyList(),\n
"Update Always: %r" % mg.isUpdateAlways(),\n
\n
)])\n
print\n
\n
return printed\n
</string> </value>
</item>
<item>
<key> <string>_params</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>ERP5Site_dumpOrderBuilderList</string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="PythonScript" module="Products.PythonScripts.PythonScript"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>Script_magic</string> </key>
<value> <int>3</int> </value>
</item>
<item>
<key> <string>_bind_names</string> </key>
<value>
<object>
<klass>
<global name="NameAssignments" module="Shared.DC.Scripts.Bindings"/>
</klass>
<tuple/>
<state>
<dictionary>
<item>
<key> <string>_asgns</string> </key>
<value>
<dictionary>
<item>
<key> <string>name_container</string> </key>
<value> <string>container</string> </value>
</item>
<item>
<key> <string>name_context</string> </key>
<value> <string>context</string> </value>
</item>
<item>
<key> <string>name_m_self</string> </key>
<value> <string>script</string> </value>
</item>
<item>
<key> <string>name_subpath</string> </key>
<value> <string>traverse_subpath</string> </value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</state>
</object>
</value>
</item>
<item>
<key> <string>_body</string> </key>
<value> <string>for ti in sorted(context.getPortalObject().portal_types.contentValues(), key=lambda x:x.getId()):\n
for ai in sorted(ti.contentValues(portal_type=\'Action Information\'), key=lambda x:x.getReference()):\n
print ti.getId()\n
print " ", "\\n ".join([x for x in (\n
"Reference: %s" % ai.getReference(),\n
"Title: %s" % ai.getTitle(),\n
"Action: %s" % ai.getActionText(),\n
"Icon: %s" % ai.getIconText(),\n
"Permission: %s" % ai.getActionPermission(),\n
"Action Type: %s" % ai.getActionType(),\n
"Visible: %s" % ai.getVisible(),\n
"Index: %s" % ai.getFloatIndex())])\n
print\n
\n
return printed\n
</string> </value>
</item>
<item>
<key> <string>_params</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>ERP5Site_dumpPortalTypeActionList</string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="PythonScript" module="Products.PythonScripts.PythonScript"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>Script_magic</string> </key>
<value> <int>3</int> </value>
</item>
<item>
<key> <string>_bind_names</string> </key>
<value>
<object>
<klass>
<global name="NameAssignments" module="Shared.DC.Scripts.Bindings"/>
</klass>
<tuple/>
<state>
<dictionary>
<item>
<key> <string>_asgns</string> </key>
<value>
<dictionary>
<item>
<key> <string>name_container</string> </key>
<value> <string>container</string> </value>
</item>
<item>
<key> <string>name_context</string> </key>
<value> <string>context</string> </value>
</item>
<item>
<key> <string>name_m_self</string> </key>
<value> <string>script</string> </value>
</item>
<item>
<key> <string>name_subpath</string> </key>
<value> <string>traverse_subpath</string> </value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</state>
</object>
</value>
</item>
<item>
<key> <string>_body</string> </key>
<value> <string>for ti in sorted(context.getPortalObject().portal_types.contentValues(), key=lambda x:x.getId()):\n
print ti.getId()\n
print " ", "\\n ".join([x for x in (\n
"Short Title: %s" % ti.getShortTitle(),\n
"Class: %s" % ti.getTypeClass(),\n
"Init Script: %s" % ti.getTypeInitScriptId(),\n
"Add Permission: %s" % ti.getTypeAddPermission(),\n
"Acquire Local Roles: %s" % ti.getTypeAcquireLocalRole(),\n
"Property Sheets: %r" % sorted(ti.getTypePropertySheetList()),\n
"Base Categories: %r" % sorted(ti.getTypeBaseCategoryList()),\n
"Allowed Content Types: %r" % sorted(ti.getTypeAllowedContentTypeList()),\n
"Hidden Content Types: %r" % sorted(ti.getTypeHiddenContentTypeList()),\n
"Searchable Property: %r" % sorted(ti.getSearchableTextPropertyIdList()),\n
"Searchable Method: %r" % sorted(ti.getSearchableTextMethodIdList()),\n
)])\n
print\n
\n
return printed\n
</string> </value>
</item>
<item>
<key> <string>_params</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>ERP5Site_dumpPortalTypeList</string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="PythonScript" module="Products.PythonScripts.PythonScript"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>Script_magic</string> </key>
<value> <int>3</int> </value>
</item>
<item>
<key> <string>_bind_names</string> </key>
<value>
<object>
<klass>
<global name="NameAssignments" module="Shared.DC.Scripts.Bindings"/>
</klass>
<tuple/>
<state>
<dictionary>
<item>
<key> <string>_asgns</string> </key>
<value>
<dictionary>
<item>
<key> <string>name_container</string> </key>
<value> <string>container</string> </value>
</item>
<item>
<key> <string>name_context</string> </key>
<value> <string>context</string> </value>
</item>
<item>
<key> <string>name_m_self</string> </key>
<value> <string>script</string> </value>
</item>
<item>
<key> <string>name_subpath</string> </key>
<value> <string>traverse_subpath</string> </value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</state>
</object>
</value>
</item>
<item>
<key> <string>_body</string> </key>
<value> <string>for ti in sorted(context.getPortalObject().portal_types.contentValues(), key=lambda x:x.getId()):\n
for ri in sorted(ti.contentValues(portal_type=\'Role Information\'), key=lambda x:(x.getTitle(), x.getLocalRoleGroupId(), x.getRoleBaseCategoryScriptId(), x.getRoleBaseCategoryList())):\n
print ti.getId()\n
print " ", "\\n ".join([x for x in (\n
"Title: %s" % ri.getTitle(),\n
"Roles: %r" % ri.getRoleNameList(),\n
"Condition: %s" % ri.getConditionText(),\n
"Local Roles Group Id: %s" % ri.getLocalRoleGroupId(),\n
"Base Categories: %r" % ri.getRoleBaseCategoryList(),\n
"Base Category Script: %s" % ri.getRoleBaseCategoryScriptId(),\n
"Categories: %r" % ri.getRoleCategoryList() )])\n
print\n
\n
return printed\n
</string> </value>
</item>
<item>
<key> <string>_params</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>ERP5Site_dumpPortalTypeRoleList</string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="PythonScript" module="Products.PythonScripts.PythonScript"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>Script_magic</string> </key>
<value> <int>3</int> </value>
</item>
<item>
<key> <string>_bind_names</string> </key>
<value>
<object>
<klass>
<global name="NameAssignments" module="Shared.DC.Scripts.Bindings"/>
</klass>
<tuple/>
<state>
<dictionary>
<item>
<key> <string>_asgns</string> </key>
<value>
<dictionary>
<item>
<key> <string>name_container</string> </key>
<value> <string>container</string> </value>
</item>
<item>
<key> <string>name_context</string> </key>
<value> <string>context</string> </value>
</item>
<item>
<key> <string>name_m_self</string> </key>
<value> <string>script</string> </value>
</item>
<item>
<key> <string>name_subpath</string> </key>
<value> <string>traverse_subpath</string> </value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</state>
</object>
</value>
</item>
<item>
<key> <string>_body</string> </key>
<value> <string>for ps in sorted(context.getPortalObject().portal_property_sheets.contentValues(), key=lambda x:x.getId()):\n
for pd in sorted(ps.contentValues(), key=lambda x:x.getId()):\n
print ps.getId()\n
info_list = [\'id\', \'portal_type\', \'reference\']\n
std_prop_list = [\'elementary_type\', \'property_default\', \'storage_id\', \'multivaluated\', \'range\', \'preference\', \'read_permission\', \'write_permission\', \'translatable\', \'translation_domain\']\n
if pd.getPortalType() == \'Standard Property\':\n
info_list += std_prop_list\n
elif pd.getPortalType() == \'Acquired Property\':\n
info_list += std_prop_list + [ \'acquisition_portal_type\', \'content_acquired_property_id_list\', \'acquisition_accessor_id\', \'acquisition_copy_value\', \'alt_accessor_id_list\', \'content_portal_type\', \'content_translation_acquired_property_id_list\', \'acquisition_object_id_list\', \'acquisition_mask_value\', \'acquisition_base_category_list\',]\n
elif pd.getPortalType() == \'Category Property\':\n
info_list += []\n
elif pd.getPortalType() == \'TALES Constraint\':\n
info_list += [\'expression\'] + [p for p in pd.propertyIds() if p.startswith(\'message\')]\n
elif pd.getPortalType() in (\'Category Existence Constraint\', \'Category Existence Constraint\'):\n
info_list += [\'constraint_base_category_list\'] + [p for p in pd.propertyIds() if p.startswith(\'message\')]\n
elif pd.getPortalType() in (\'Category Membership State Constraint\', \'Acquired Category Membership State Constraint\'):\n
info_list += [\'membership_portal_type_list\', \'constraint_base_category_list\', \'workflow_state_list\', \'workflow_variable\'] + [p for p in pd.propertyIds() if p.startswith(\'message\')]\n
\n
elif pd.getPortalType() in (\'Property Existence Constraint\', ):\n
info_list += [\'constraint_property_list\'] + [p for p in pd.propertyIds() if p.startswith(\'message\')]\n
elif pd.getPortalType() in (\'Content Existence Constraint\', ):\n
info_list += [\'constraint_portal_type\'] + [p for p in pd.propertyIds() if p.startswith(\'message\')]\n
elif pd.getPortalType().endswith(\'Constraint\'):\n
info_list += [] + [p for p in pd.propertyIds() if p.startswith(\'message\')]\n
else:\n
print "(not supported)",pd.getRelativeUrl(), pd.getPortalType()\n
\n
\n
print " ", "\\n ".join([\'%s: %s\' % (prop, pd.getProperty(prop)) for prop in sorted(info_list)])\n
print\n
\n
return printed\n
</string> </value>
</item>
<item>
<key> <string>_params</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>ERP5Site_dumpPropertySheetList</string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="PythonScript" module="Products.PythonScripts.PythonScript"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>Script_magic</string> </key>
<value> <int>3</int> </value>
</item>
<item>
<key> <string>_bind_names</string> </key>
<value>
<object>
<klass>
<global name="NameAssignments" module="Shared.DC.Scripts.Bindings"/>
</klass>
<tuple/>
<state>
<dictionary>
<item>
<key> <string>_asgns</string> </key>
<value>
<dictionary>
<item>
<key> <string>name_container</string> </key>
<value> <string>container</string> </value>
</item>
<item>
<key> <string>name_context</string> </key>
<value> <string>context</string> </value>
</item>
<item>
<key> <string>name_m_self</string> </key>
<value> <string>script</string> </value>
</item>
<item>
<key> <string>name_subpath</string> </key>
<value> <string>traverse_subpath</string> </value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</state>
</object>
</value>
</item>
<item>
<key> <string>_body</string> </key>
<value> <string>for rule in sorted(context.getPortalObject().portal_rules.contentValues(),\n
key=lambda x:x.getTitle()):\n
if rule.getValidationState() != \'validated\':\n
continue\n
print rule.getId()\n
print " Title: %s" % (rule.getTitle())\n
print " Trade Phases: %r" % (rule.getTradePhaseList())\n
print " Test Method Id: %s" % (rule.getTestMethodId())\n
print " Membership Criteria: %r" % (rule.getMembershipCriterionBaseCategoryList())\n
print " Membership Criterion Category: %r" % (rule.getMembershipCriterionCategoryList())\n
print\n
\n
for tester in sorted(rule.contentValues(), key=lambda x:x.getTitle()):\n
print rule.getId()\n
print " ", "\\n ".join([x for x in (\n
"Id: %s" % tester.getId(),\n
"Title: %s" % tester.getTitle(),\n
"Type: %s" % tester.getPortalType(),\n
"Updating: %s" % tester.isUpdatingProvider(),\n
"Divergence: %s" % tester.isDivergenceProvider(),\n
"Matching: %s" % tester.isMatchingProvider(),\n
\n
"Test Method Id: %s" % tester.getTestMethodId(),\n
"Membership Criteria: %r" %\n
(tester.getMembershipCriterionBaseCategoryList()),\n
"Membership Criterion Category: %r" %\n
(tester.getMembershipCriterionCategoryList()),\n
)])\n
print\n
\n
return printed\n
</string> </value>
</item>
<item>
<key> <string>_params</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>ERP5Site_dumpRuleTesterList</string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment