[Erp5-report] r29689 - in /erp5/trunk/products: ERP5/bootstrap/erp5_core/PortalTypeWorkflow...
nobody at svn.erp5.org
nobody at svn.erp5.org
Thu Oct 15 17:30:06 CEST 2009
Author: kazuhiko
Date: Thu Oct 15 17:30:04 2009
New Revision: 29689
URL: http://svn.erp5.org?rev=29689&view=rev
Log:
* cache Action Information definitions for a Portal Type.
* add base_type_interaction_workflow that clears the cache above when Action Information documents are modified or deleted.
Added:
erp5/trunk/products/ERP5/bootstrap/erp5_core/WorkflowTemplateItem/portal_workflow/base_type_interaction_workflow/
erp5/trunk/products/ERP5/bootstrap/erp5_core/WorkflowTemplateItem/portal_workflow/base_type_interaction_workflow.xml
erp5/trunk/products/ERP5/bootstrap/erp5_core/WorkflowTemplateItem/portal_workflow/base_type_interaction_workflow/interactions/
erp5/trunk/products/ERP5/bootstrap/erp5_core/WorkflowTemplateItem/portal_workflow/base_type_interaction_workflow/interactions.xml
erp5/trunk/products/ERP5/bootstrap/erp5_core/WorkflowTemplateItem/portal_workflow/base_type_interaction_workflow/interactions/ActionInformation_set.xml
erp5/trunk/products/ERP5/bootstrap/erp5_core/WorkflowTemplateItem/portal_workflow/base_type_interaction_workflow/interactions/BaseType_delete.xml
erp5/trunk/products/ERP5/bootstrap/erp5_core/WorkflowTemplateItem/portal_workflow/base_type_interaction_workflow/scripts/
erp5/trunk/products/ERP5/bootstrap/erp5_core/WorkflowTemplateItem/portal_workflow/base_type_interaction_workflow/scripts.xml
erp5/trunk/products/ERP5/bootstrap/erp5_core/WorkflowTemplateItem/portal_workflow/base_type_interaction_workflow/scripts/ActionInformation_clearCache.xml
erp5/trunk/products/ERP5/bootstrap/erp5_core/WorkflowTemplateItem/portal_workflow/base_type_interaction_workflow/scripts/BaseType_clearCache.xml
erp5/trunk/products/ERP5/bootstrap/erp5_core/WorkflowTemplateItem/portal_workflow/base_type_interaction_workflow/variables.xml
erp5/trunk/products/ERP5/bootstrap/erp5_core/WorkflowTemplateItem/portal_workflow/base_type_interaction_workflow/worklists.xml
Modified:
erp5/trunk/products/ERP5/bootstrap/erp5_core/PortalTypeWorkflowChainTemplateItem/workflow_chain_type.xml
erp5/trunk/products/ERP5/bootstrap/erp5_core/bt/revision
erp5/trunk/products/ERP5/bootstrap/erp5_core/bt/template_portal_type_workflow_chain_list
erp5/trunk/products/ERP5/bootstrap/erp5_core/bt/template_workflow_id_list
erp5/trunk/products/ERP5Type/Core/ActionInformation.py
erp5/trunk/products/ERP5Type/ERP5Type.py
erp5/trunk/products/ERP5Type/Tool/TypesTool.py
erp5/trunk/products/ERP5Type/patches/ActionsTool.py
Modified: erp5/trunk/products/ERP5/bootstrap/erp5_core/PortalTypeWorkflowChainTemplateItem/workflow_chain_type.xml
URL: http://svn.erp5.org/erp5/trunk/products/ERP5/bootstrap/erp5_core/PortalTypeWorkflowChainTemplateItem/workflow_chain_type.xml?rev=29689&r1=29688&r2=29689&view=diff
==============================================================================
--- erp5/trunk/products/ERP5/bootstrap/erp5_core/PortalTypeWorkflowChainTemplateItem/workflow_chain_type.xml [utf8] (original)
+++ erp5/trunk/products/ERP5/bootstrap/erp5_core/PortalTypeWorkflowChainTemplateItem/workflow_chain_type.xml [utf8] Thu Oct 15 17:30:04 2009
@@ -1,7 +1,15 @@
<workflow_chain>
+ <chain>
+ <type>Action Information</type>
+ <workflow>base_type_interaction_workflow</workflow>
+ </chain>
<chain>
<type>Base Category</type>
<workflow>edit_workflow</workflow>
+ </chain>
+ <chain>
+ <type>Base Type</type>
+ <workflow>base_type_interaction_workflow</workflow>
</chain>
<chain>
<type>Category</type>
Added: erp5/trunk/products/ERP5/bootstrap/erp5_core/WorkflowTemplateItem/portal_workflow/base_type_interaction_workflow.xml
URL: http://svn.erp5.org/erp5/trunk/products/ERP5/bootstrap/erp5_core/WorkflowTemplateItem/portal_workflow/base_type_interaction_workflow.xml?rev=29689&view=auto
==============================================================================
--- erp5/trunk/products/ERP5/bootstrap/erp5_core/WorkflowTemplateItem/portal_workflow/base_type_interaction_workflow.xml (added)
+++ erp5/trunk/products/ERP5/bootstrap/erp5_core/WorkflowTemplateItem/portal_workflow/base_type_interaction_workflow.xml [utf8] Thu Oct 15 17:30:04 2009
@@ -1,0 +1,31 @@
+<?xml version="1.0"?>
+<ZopeData>
+ <record id="1" aka="AAAAAAAAAAE=">
+ <pickle>
+ <tuple>
+ <global name="InteractionWorkflowDefinition" module="Products.ERP5.InteractionWorkflow"/>
+ <tuple/>
+ </tuple>
+ </pickle>
+ <pickle>
+ <dictionary>
+ <item>
+ <key> <string>_objects</string> </key>
+ <value>
+ <tuple/>
+ </value>
+ </item>
+ <item>
+ <key> <string>groups</string> </key>
+ <value>
+ <tuple/>
+ </value>
+ </item>
+ <item>
+ <key> <string>id</string> </key>
+ <value> <string>base_type_interaction_workflow</string> </value>
+ </item>
+ </dictionary>
+ </pickle>
+ </record>
+</ZopeData>
Added: erp5/trunk/products/ERP5/bootstrap/erp5_core/WorkflowTemplateItem/portal_workflow/base_type_interaction_workflow/interactions.xml
URL: http://svn.erp5.org/erp5/trunk/products/ERP5/bootstrap/erp5_core/WorkflowTemplateItem/portal_workflow/base_type_interaction_workflow/interactions.xml?rev=29689&view=auto
==============================================================================
--- erp5/trunk/products/ERP5/bootstrap/erp5_core/WorkflowTemplateItem/portal_workflow/base_type_interaction_workflow/interactions.xml (added)
+++ erp5/trunk/products/ERP5/bootstrap/erp5_core/WorkflowTemplateItem/portal_workflow/base_type_interaction_workflow/interactions.xml [utf8] Thu Oct 15 17:30:04 2009
@@ -1,0 +1,31 @@
+<?xml version="1.0"?>
+<ZopeData>
+ <record id="1" aka="AAAAAAAAAAE=">
+ <pickle>
+ <tuple>
+ <global name="Interaction" module="Products.ERP5.Interaction"/>
+ <tuple/>
+ </tuple>
+ </pickle>
+ <pickle>
+ <dictionary>
+ <item>
+ <key> <string>_mapping</string> </key>
+ <value>
+ <dictionary/>
+ </value>
+ </item>
+ <item>
+ <key> <string>_objects</string> </key>
+ <value>
+ <tuple/>
+ </value>
+ </item>
+ <item>
+ <key> <string>id</string> </key>
+ <value> <string>interactions</string> </value>
+ </item>
+ </dictionary>
+ </pickle>
+ </record>
+</ZopeData>
Added: erp5/trunk/products/ERP5/bootstrap/erp5_core/WorkflowTemplateItem/portal_workflow/base_type_interaction_workflow/interactions/ActionInformation_set.xml
URL: http://svn.erp5.org/erp5/trunk/products/ERP5/bootstrap/erp5_core/WorkflowTemplateItem/portal_workflow/base_type_interaction_workflow/interactions/ActionInformation_set.xml?rev=29689&view=auto
==============================================================================
--- erp5/trunk/products/ERP5/bootstrap/erp5_core/WorkflowTemplateItem/portal_workflow/base_type_interaction_workflow/interactions/ActionInformation_set.xml (added)
+++ erp5/trunk/products/ERP5/bootstrap/erp5_core/WorkflowTemplateItem/portal_workflow/base_type_interaction_workflow/interactions/ActionInformation_set.xml [utf8] Thu Oct 15 17:30:04 2009
@@ -1,0 +1,95 @@
+<?xml version="1.0"?>
+<ZopeData>
+ <record id="1" aka="AAAAAAAAAAE=">
+ <pickle>
+ <tuple>
+ <global name="InteractionDefinition" module="Products.ERP5.Interaction"/>
+ <tuple/>
+ </tuple>
+ </pickle>
+ <pickle>
+ <dictionary>
+ <item>
+ <key> <string>actbox_category</string> </key>
+ <value> <string>workflow</string> </value>
+ </item>
+ <item>
+ <key> <string>actbox_name</string> </key>
+ <value> <string></string> </value>
+ </item>
+ <item>
+ <key> <string>actbox_url</string> </key>
+ <value> <string></string> </value>
+ </item>
+ <item>
+ <key> <string>activate_script_name</string> </key>
+ <value>
+ <tuple/>
+ </value>
+ </item>
+ <item>
+ <key> <string>after_script_name</string> </key>
+ <value>
+ <list>
+ <string>ActionInformation_clearCache</string>
+ </list>
+ </value>
+ </item>
+ <item>
+ <key> <string>before_commit_script_name</string> </key>
+ <value>
+ <tuple/>
+ </value>
+ </item>
+ <item>
+ <key> <string>description</string> </key>
+ <value> <string></string> </value>
+ </item>
+ <item>
+ <key> <string>guard</string> </key>
+ <value>
+ <none/>
+ </value>
+ </item>
+ <item>
+ <key> <string>id</string> </key>
+ <value> <string>ActionInformation_set</string> </value>
+ </item>
+ <item>
+ <key> <string>method_id</string> </key>
+ <value>
+ <list>
+ <string>_set.*</string>
+ </list>
+ </value>
+ </item>
+ <item>
+ <key> <string>once_per_transaction</string> </key>
+ <value> <int>1</int> </value>
+ </item>
+ <item>
+ <key> <string>portal_type_filter</string> </key>
+ <value>
+ <list>
+ <string>Action Information</string>
+ </list>
+ </value>
+ </item>
+ <item>
+ <key> <string>script_name</string> </key>
+ <value>
+ <tuple/>
+ </value>
+ </item>
+ <item>
+ <key> <string>title</string> </key>
+ <value> <string></string> </value>
+ </item>
+ <item>
+ <key> <string>trigger_type</string> </key>
+ <value> <int>2</int> </value>
+ </item>
+ </dictionary>
+ </pickle>
+ </record>
+</ZopeData>
Added: erp5/trunk/products/ERP5/bootstrap/erp5_core/WorkflowTemplateItem/portal_workflow/base_type_interaction_workflow/interactions/BaseType_delete.xml
URL: http://svn.erp5.org/erp5/trunk/products/ERP5/bootstrap/erp5_core/WorkflowTemplateItem/portal_workflow/base_type_interaction_workflow/interactions/BaseType_delete.xml?rev=29689&view=auto
==============================================================================
--- erp5/trunk/products/ERP5/bootstrap/erp5_core/WorkflowTemplateItem/portal_workflow/base_type_interaction_workflow/interactions/BaseType_delete.xml (added)
+++ erp5/trunk/products/ERP5/bootstrap/erp5_core/WorkflowTemplateItem/portal_workflow/base_type_interaction_workflow/interactions/BaseType_delete.xml [utf8] Thu Oct 15 17:30:04 2009
@@ -1,0 +1,95 @@
+<?xml version="1.0"?>
+<ZopeData>
+ <record id="1" aka="AAAAAAAAAAE=">
+ <pickle>
+ <tuple>
+ <global name="InteractionDefinition" module="Products.ERP5.Interaction"/>
+ <tuple/>
+ </tuple>
+ </pickle>
+ <pickle>
+ <dictionary>
+ <item>
+ <key> <string>actbox_category</string> </key>
+ <value> <string>workflow</string> </value>
+ </item>
+ <item>
+ <key> <string>actbox_name</string> </key>
+ <value> <string></string> </value>
+ </item>
+ <item>
+ <key> <string>actbox_url</string> </key>
+ <value> <string></string> </value>
+ </item>
+ <item>
+ <key> <string>activate_script_name</string> </key>
+ <value>
+ <tuple/>
+ </value>
+ </item>
+ <item>
+ <key> <string>after_script_name</string> </key>
+ <value>
+ <list>
+ <string>BaseType_clearCache</string>
+ </list>
+ </value>
+ </item>
+ <item>
+ <key> <string>before_commit_script_name</string> </key>
+ <value>
+ <tuple/>
+ </value>
+ </item>
+ <item>
+ <key> <string>description</string> </key>
+ <value> <string></string> </value>
+ </item>
+ <item>
+ <key> <string>guard</string> </key>
+ <value>
+ <none/>
+ </value>
+ </item>
+ <item>
+ <key> <string>id</string> </key>
+ <value> <string>BaseType_delete</string> </value>
+ </item>
+ <item>
+ <key> <string>method_id</string> </key>
+ <value>
+ <list>
+ <string>_delObject</string>
+ </list>
+ </value>
+ </item>
+ <item>
+ <key> <string>once_per_transaction</string> </key>
+ <value> <int>1</int> </value>
+ </item>
+ <item>
+ <key> <string>portal_type_filter</string> </key>
+ <value>
+ <list>
+ <string>Base Type</string>
+ </list>
+ </value>
+ </item>
+ <item>
+ <key> <string>script_name</string> </key>
+ <value>
+ <tuple/>
+ </value>
+ </item>
+ <item>
+ <key> <string>title</string> </key>
+ <value> <string></string> </value>
+ </item>
+ <item>
+ <key> <string>trigger_type</string> </key>
+ <value> <int>2</int> </value>
+ </item>
+ </dictionary>
+ </pickle>
+ </record>
+</ZopeData>
Added: erp5/trunk/products/ERP5/bootstrap/erp5_core/WorkflowTemplateItem/portal_workflow/base_type_interaction_workflow/scripts.xml
URL: http://svn.erp5.org/erp5/trunk/products/ERP5/bootstrap/erp5_core/WorkflowTemplateItem/portal_workflow/base_type_interaction_workflow/scripts.xml?rev=29689&view=auto
==============================================================================
--- erp5/trunk/products/ERP5/bootstrap/erp5_core/WorkflowTemplateItem/portal_workflow/base_type_interaction_workflow/scripts.xml (added)
+++ erp5/trunk/products/ERP5/bootstrap/erp5_core/WorkflowTemplateItem/portal_workflow/base_type_interaction_workflow/scripts.xml [utf8] Thu Oct 15 17:30:04 2009
@@ -1,0 +1,31 @@
+<?xml version="1.0"?>
+<ZopeData>
+ <record id="1" aka="AAAAAAAAAAE=">
+ <pickle>
+ <tuple>
+ <global name="Scripts" module="Products.DCWorkflow.Scripts"/>
+ <tuple/>
+ </tuple>
+ </pickle>
+ <pickle>
+ <dictionary>
+ <item>
+ <key> <string>_mapping</string> </key>
+ <value>
+ <dictionary/>
+ </value>
+ </item>
+ <item>
+ <key> <string>_objects</string> </key>
+ <value>
+ <tuple/>
+ </value>
+ </item>
+ <item>
+ <key> <string>id</string> </key>
+ <value> <string>scripts</string> </value>
+ </item>
+ </dictionary>
+ </pickle>
+ </record>
+</ZopeData>
Added: erp5/trunk/products/ERP5/bootstrap/erp5_core/WorkflowTemplateItem/portal_workflow/base_type_interaction_workflow/scripts/ActionInformation_clearCache.xml
URL: http://svn.erp5.org/erp5/trunk/products/ERP5/bootstrap/erp5_core/WorkflowTemplateItem/portal_workflow/base_type_interaction_workflow/scripts/ActionInformation_clearCache.xml?rev=29689&view=auto
==============================================================================
--- erp5/trunk/products/ERP5/bootstrap/erp5_core/WorkflowTemplateItem/portal_workflow/base_type_interaction_workflow/scripts/ActionInformation_clearCache.xml (added)
+++ erp5/trunk/products/ERP5/bootstrap/erp5_core/WorkflowTemplateItem/portal_workflow/base_type_interaction_workflow/scripts/ActionInformation_clearCache.xml [utf8] Thu Oct 15 17:30:04 2009
@@ -1,0 +1,125 @@
+<?xml version="1.0"?>
+<ZopeData>
+ <record id="1" aka="AAAAAAAAAAE=">
+ <pickle>
+ <tuple>
+ <global name="PythonScript" module="Products.PythonScripts.PythonScript"/>
+ <tuple/>
+ </tuple>
+ </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>base_type = state_change[\'object\'].aq_parent\n
+base_type.clearGetRawActionInformationListCache()\n
+</string> </value>
+ </item>
+ <item>
+ <key> <string>_code</string> </key>
+ <value>
+ <none/>
+ </value>
+ </item>
+ <item>
+ <key> <string>_params</string> </key>
+ <value> <string>state_change</string> </value>
+ </item>
+ <item>
+ <key> <string>errors</string> </key>
+ <value>
+ <tuple/>
+ </value>
+ </item>
+ <item>
+ <key> <string>func_code</string> </key>
+ <value>
+ <object>
+ <klass>
+ <global name="FuncCode" module="Shared.DC.Scripts.Signature"/>
+ </klass>
+ <tuple/>
+ <state>
+ <dictionary>
+ <item>
+ <key> <string>co_argcount</string> </key>
+ <value> <int>1</int> </value>
+ </item>
+ <item>
+ <key> <string>co_varnames</string> </key>
+ <value>
+ <tuple>
+ <string>state_change</string>
+ <string>_getattr_</string>
+ <string>_getitem_</string>
+ <string>base_type</string>
+ </tuple>
+ </value>
+ </item>
+ </dictionary>
+ </state>
+ </object>
+ </value>
+ </item>
+ <item>
+ <key> <string>func_defaults</string> </key>
+ <value>
+ <none/>
+ </value>
+ </item>
+ <item>
+ <key> <string>id</string> </key>
+ <value> <string>ActionInformation_clearCache</string> </value>
+ </item>
+ <item>
+ <key> <string>warnings</string> </key>
+ <value>
+ <tuple/>
+ </value>
+ </item>
+ </dictionary>
+ </pickle>
+ </record>
+</ZopeData>
Added: erp5/trunk/products/ERP5/bootstrap/erp5_core/WorkflowTemplateItem/portal_workflow/base_type_interaction_workflow/scripts/BaseType_clearCache.xml
URL: http://svn.erp5.org/erp5/trunk/products/ERP5/bootstrap/erp5_core/WorkflowTemplateItem/portal_workflow/base_type_interaction_workflow/scripts/BaseType_clearCache.xml?rev=29689&view=auto
==============================================================================
--- erp5/trunk/products/ERP5/bootstrap/erp5_core/WorkflowTemplateItem/portal_workflow/base_type_interaction_workflow/scripts/BaseType_clearCache.xml (added)
+++ erp5/trunk/products/ERP5/bootstrap/erp5_core/WorkflowTemplateItem/portal_workflow/base_type_interaction_workflow/scripts/BaseType_clearCache.xml [utf8] Thu Oct 15 17:30:04 2009
@@ -1,0 +1,125 @@
+<?xml version="1.0"?>
+<ZopeData>
+ <record id="1" aka="AAAAAAAAAAE=">
+ <pickle>
+ <tuple>
+ <global name="PythonScript" module="Products.PythonScripts.PythonScript"/>
+ <tuple/>
+ </tuple>
+ </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>base_type = state_change[\'object\']\n
+base_type.clearGetRawActionInformationListCache()\n
+</string> </value>
+ </item>
+ <item>
+ <key> <string>_code</string> </key>
+ <value>
+ <none/>
+ </value>
+ </item>
+ <item>
+ <key> <string>_params</string> </key>
+ <value> <string>state_change</string> </value>
+ </item>
+ <item>
+ <key> <string>errors</string> </key>
+ <value>
+ <tuple/>
+ </value>
+ </item>
+ <item>
+ <key> <string>func_code</string> </key>
+ <value>
+ <object>
+ <klass>
+ <global name="FuncCode" module="Shared.DC.Scripts.Signature"/>
+ </klass>
+ <tuple/>
+ <state>
+ <dictionary>
+ <item>
+ <key> <string>co_argcount</string> </key>
+ <value> <int>1</int> </value>
+ </item>
+ <item>
+ <key> <string>co_varnames</string> </key>
+ <value>
+ <tuple>
+ <string>state_change</string>
+ <string>_getitem_</string>
+ <string>base_type</string>
+ <string>_getattr_</string>
+ </tuple>
+ </value>
+ </item>
+ </dictionary>
+ </state>
+ </object>
+ </value>
+ </item>
+ <item>
+ <key> <string>func_defaults</string> </key>
+ <value>
+ <none/>
+ </value>
+ </item>
+ <item>
+ <key> <string>id</string> </key>
+ <value> <string>BaseType_clearCache</string> </value>
+ </item>
+ <item>
+ <key> <string>warnings</string> </key>
+ <value>
+ <tuple/>
+ </value>
+ </item>
+ </dictionary>
+ </pickle>
+ </record>
+</ZopeData>
Added: erp5/trunk/products/ERP5/bootstrap/erp5_core/WorkflowTemplateItem/portal_workflow/base_type_interaction_workflow/variables.xml
URL: http://svn.erp5.org/erp5/trunk/products/ERP5/bootstrap/erp5_core/WorkflowTemplateItem/portal_workflow/base_type_interaction_workflow/variables.xml?rev=29689&view=auto
==============================================================================
--- erp5/trunk/products/ERP5/bootstrap/erp5_core/WorkflowTemplateItem/portal_workflow/base_type_interaction_workflow/variables.xml (added)
+++ erp5/trunk/products/ERP5/bootstrap/erp5_core/WorkflowTemplateItem/portal_workflow/base_type_interaction_workflow/variables.xml [utf8] Thu Oct 15 17:30:04 2009
@@ -1,0 +1,25 @@
+<?xml version="1.0"?>
+<ZopeData>
+ <record id="1" aka="AAAAAAAAAAE=">
+ <pickle>
+ <tuple>
+ <global name="Variables" module="Products.DCWorkflow.Variables"/>
+ <tuple/>
+ </tuple>
+ </pickle>
+ <pickle>
+ <dictionary>
+ <item>
+ <key> <string>_mapping</string> </key>
+ <value>
+ <dictionary/>
+ </value>
+ </item>
+ <item>
+ <key> <string>id</string> </key>
+ <value> <string>variables</string> </value>
+ </item>
+ </dictionary>
+ </pickle>
+ </record>
+</ZopeData>
Added: erp5/trunk/products/ERP5/bootstrap/erp5_core/WorkflowTemplateItem/portal_workflow/base_type_interaction_workflow/worklists.xml
URL: http://svn.erp5.org/erp5/trunk/products/ERP5/bootstrap/erp5_core/WorkflowTemplateItem/portal_workflow/base_type_interaction_workflow/worklists.xml?rev=29689&view=auto
==============================================================================
--- erp5/trunk/products/ERP5/bootstrap/erp5_core/WorkflowTemplateItem/portal_workflow/base_type_interaction_workflow/worklists.xml (added)
+++ erp5/trunk/products/ERP5/bootstrap/erp5_core/WorkflowTemplateItem/portal_workflow/base_type_interaction_workflow/worklists.xml [utf8] Thu Oct 15 17:30:04 2009
@@ -1,0 +1,25 @@
+<?xml version="1.0"?>
+<ZopeData>
+ <record id="1" aka="AAAAAAAAAAE=">
+ <pickle>
+ <tuple>
+ <global name="Worklists" module="Products.DCWorkflow.Worklists"/>
+ <tuple/>
+ </tuple>
+ </pickle>
+ <pickle>
+ <dictionary>
+ <item>
+ <key> <string>_mapping</string> </key>
+ <value>
+ <dictionary/>
+ </value>
+ </item>
+ <item>
+ <key> <string>id</string> </key>
+ <value> <string>worklists</string> </value>
+ </item>
+ </dictionary>
+ </pickle>
+ </record>
+</ZopeData>
Modified: erp5/trunk/products/ERP5/bootstrap/erp5_core/bt/revision
URL: http://svn.erp5.org/erp5/trunk/products/ERP5/bootstrap/erp5_core/bt/revision?rev=29689&r1=29688&r2=29689&view=diff
==============================================================================
--- erp5/trunk/products/ERP5/bootstrap/erp5_core/bt/revision [utf8] (original)
+++ erp5/trunk/products/ERP5/bootstrap/erp5_core/bt/revision [utf8] Thu Oct 15 17:30:04 2009
@@ -1,1 +1,1 @@
-1337
+1338
Modified: erp5/trunk/products/ERP5/bootstrap/erp5_core/bt/template_portal_type_workflow_chain_list
URL: http://svn.erp5.org/erp5/trunk/products/ERP5/bootstrap/erp5_core/bt/template_portal_type_workflow_chain_list?rev=29689&r1=29688&r2=29689&view=diff
==============================================================================
--- erp5/trunk/products/ERP5/bootstrap/erp5_core/bt/template_portal_type_workflow_chain_list [utf8] (original)
+++ erp5/trunk/products/ERP5/bootstrap/erp5_core/bt/template_portal_type_workflow_chain_list [utf8] Thu Oct 15 17:30:04 2009
@@ -1,4 +1,6 @@
+Action Information | base_type_interaction_workflow
Base Category | edit_workflow
+Base Type | base_type_interaction_workflow
Category | edit_workflow
Distributed Ram Cache | distributed_ram_cache_interaction_workflow
Document | edit_workflow
Modified: erp5/trunk/products/ERP5/bootstrap/erp5_core/bt/template_workflow_id_list
URL: http://svn.erp5.org/erp5/trunk/products/ERP5/bootstrap/erp5_core/bt/template_workflow_id_list?rev=29689&r1=29688&r2=29689&view=diff
==============================================================================
--- erp5/trunk/products/ERP5/bootstrap/erp5_core/bt/template_workflow_id_list [utf8] (original)
+++ erp5/trunk/products/ERP5/bootstrap/erp5_core/bt/template_workflow_id_list [utf8] Thu Oct 15 17:30:04 2009
@@ -1,3 +1,4 @@
+base_type_interaction_workflow
distributed_ram_cache_interaction_workflow
edit_workflow
memcached_plugin_interaction_workflow
Modified: erp5/trunk/products/ERP5Type/Core/ActionInformation.py
URL: http://svn.erp5.org/erp5/trunk/products/ERP5Type/Core/ActionInformation.py?rev=29689&r1=29688&r2=29689&view=diff
==============================================================================
--- erp5/trunk/products/ERP5Type/Core/ActionInformation.py [utf8] (original)
+++ erp5/trunk/products/ERP5Type/Core/ActionInformation.py [utf8] Thu Oct 15 17:30:04 2009
@@ -174,3 +174,64 @@
# better performance.
categories = getattr(self, 'categories', [])
return len(categories) and categories[0][12:] or None
+
+ security.declarePrivate('getRawActionInformation')
+ def getRawActionInformation(self):
+ """Return RawActionInformation instance that is not persistent and
+ is cacheable."""
+ return RawActionInformation(
+ {'id':self.getReference(),
+ 'name':self.getTitle(),
+ 'description':self.getDescription(),
+ 'category':self.getActionType(),
+ 'priority':self.getFloatIndex(),
+ 'icon':self.getIcon(),
+ 'action':self.getAction(),
+ 'condition':self.getCondition(),
+ 'action_permission':self.getActionPermissionList(),
+ }
+ )
+
+class RawActionInformation(object):
+ """The purpose of this class is to provide a cacheable instance having
+ an enough information of Action Information document."""
+
+ def __init__(self, kw):
+ self.action = kw.pop('action')
+ self.icon = kw.pop('icon')
+ self.condition = kw.pop('condition')
+ self.action_permission = kw.pop('action_permission')
+ self.param_dict = kw
+
+ def getPriority(self):
+ return self.param_dict['priority']
+
+ def test(self, ec):
+ """Test if the action should be displayed or not for the given context"""
+ permission_list = self.action_permission
+ if permission_list:
+ category = self.param_dict['category'] or ''
+ info = ec.vars
+ if (info['here'] is not None and
+ (category[:6] == 'object' or
+ category[:8] == 'workflow')):
+ context = info['here']
+ elif (info['folder'] is not None and
+ category[:6] == 'folder'):
+ context = info['folder']
+ else:
+ context = info['portal']
+ has_permission = getSecurityManager().getUser().has_permission
+ for permission in permission_list:
+ if not has_permission(permission, context):
+ return False
+ condition = self.condition
+ return condition is None or condition(ec)
+
+ def cook(self, ec):
+ param_dict = self.param_dict.copy()
+ action = self.action
+ param_dict['url'] = action is not None and action(ec) or ''
+ icon = self.icon
+ param_dict['icon'] = icon is not None and icon(ec) or ''
+ return param_dict
Modified: erp5/trunk/products/ERP5Type/ERP5Type.py
URL: http://svn.erp5.org/erp5/trunk/products/ERP5Type/ERP5Type.py?rev=29689&r1=29688&r2=29689&view=diff
==============================================================================
--- erp5/trunk/products/ERP5Type/ERP5Type.py [utf8] (original)
+++ erp5/trunk/products/ERP5Type/ERP5Type.py [utf8] Thu Oct 15 17:30:04 2009
@@ -33,6 +33,7 @@
from Products.ERP5Type.UnrestrictedMethod import UnrestrictedMethod
from Products.ERP5Type.Utils import deprecated, createExpressionContext
from Products.ERP5Type.XMLObject import XMLObject
+from Products.ERP5Type.Cache import CachingMethod
ERP5TYPE_SECURITY_GROUP_ID_GENERATION_SCRIPT = 'ERP5Type_asSecurityGroupId'
@@ -521,6 +522,27 @@
__traceback_info__ = self.getId(), target
return ob.restrictedTraverse(target)
+ def _getRawActionInformationList(self):
+ return sorted(
+ (x.getRawActionInformation() for x in \
+ self.getActionInformationList() if x.isVisible()),
+ key=lambda x:x.getPriority())
+ _getRawActionInformationList = CachingMethod(
+ _getRawActionInformationList,
+ id='_getRawActionInformationList',
+ cache_factory='erp5_content_long')
+
+ security.declarePrivate('getRawActionInformationList')
+ def getRawActionInformationList(self):
+ """Return all visible action informations sorted by priority."""
+ return self._getRawActionInformationList(self, scope=self.id)
+
+ security.declareProtected(Permissions.ModifyPortalContent,
+ 'clearGetRawActionInformationListCache')
+ def clearGetRawActionInformationListCache(self):
+ """Clear a cache of _getRawActionInformationList."""
+ self._getRawActionInformationList.delete(scope=self.id)
+
security.declarePrivate('getActionListFor')
def getActionListFor(self, ob=None):
"""Return all actions of the object"""
Modified: erp5/trunk/products/ERP5Type/Tool/TypesTool.py
URL: http://svn.erp5.org/erp5/trunk/products/ERP5Type/Tool/TypesTool.py?rev=29689&r1=29688&r2=29689&view=diff
==============================================================================
--- erp5/trunk/products/ERP5Type/Tool/TypesTool.py [utf8] (original)
+++ erp5/trunk/products/ERP5Type/Tool/TypesTool.py [utf8] Thu Oct 15 17:30:04 2009
@@ -41,6 +41,15 @@
security.declareObjectProtected(Permissions.AccessContentsInformation)
zope.interface.implements(interfaces.IActionProvider)
+
+ security.declarePrivate('getRawActionInformationListFor')
+ def getRawActionInformationListFor(self, ob=None):
+ """Return all action informations of the object"""
+ if ob is not None:
+ type_info = self.getTypeInfo(ob)
+ if type_info is not None:
+ return type_info.getRawActionInformationList()
+ return ()
security.declarePrivate('getActionListFor')
def getActionListFor(self, ob=None):
Modified: erp5/trunk/products/ERP5Type/patches/ActionsTool.py
URL: http://svn.erp5.org/erp5/trunk/products/ERP5Type/patches/ActionsTool.py?rev=29689&r1=29688&r2=29689&view=diff
==============================================================================
--- erp5/trunk/products/ERP5Type/patches/ActionsTool.py [utf8] (original)
+++ erp5/trunk/products/ERP5Type/patches/ActionsTool.py [utf8] Thu Oct 15 17:30:04 2009
@@ -39,11 +39,10 @@
elif hasattr(provider, 'getActionListFor'):
from Products.ERP5Type.Utils import createExpressionContext
ec = createExpressionContext(object)
- actions += sorted(
- (action.getActionInfo(ec)
- for action in provider.getActionListFor(object)
- if action.test(ec)),
- key=lambda x: x['priority'])
+ actions.extend(
+ (action.cook(ec)
+ for action in provider.getRawActionInformationListFor(object)
+ if action.test(ec)))
else:
# for Action Providers written for CMF versions before 1.5
actions.extend( self._listActionInfos(provider, object) )
More information about the Erp5-report
mailing list