Commit 60c4d915 authored by Arnaud Fontaine's avatar Arnaud Fontaine

ZODB Components: Add 'Tool Component' found in Products.XXX.Tool on FS.

parent 3a59ff76
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="ActionInformation" module="Products.CMFCore.ActionInformation"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>action</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAI=</string> </persistent>
</value>
</item>
<item>
<key> <string>categories</string> </key>
<value>
<tuple>
<string>action_type/object_view</string>
</tuple>
</value>
</item>
<item>
<key> <string>category</string> </key>
<value> <string>object_view</string> </value>
</item>
<item>
<key> <string>condition</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAM=</string> </persistent>
</value>
</item>
<item>
<key> <string>description</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>icon</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>view</string> </value>
</item>
<item>
<key> <string>permissions</string> </key>
<value>
<tuple>
<string>View</string>
</tuple>
</value>
</item>
<item>
<key> <string>priority</string> </key>
<value> <float>1.0</float> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string>View</string> </value>
</item>
<item>
<key> <string>visible</string> </key>
<value> <int>1</int> </value>
</item>
</dictionary>
</pickle>
</record>
<record id="2" aka="AAAAAAAAAAI=">
<pickle>
<global name="Expression" module="Products.CMFCore.Expression"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>text</string> </key>
<value> <string>string:${object_url}/ComponentMixin_view</string> </value>
</item>
</dictionary>
</pickle>
</record>
<record id="3" aka="AAAAAAAAAAM=">
<pickle>
<global name="Expression" module="Products.CMFCore.Expression"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>text</string> </key>
<value> <string>python: object is not None and not object.isWebMode()</string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
......@@ -55,6 +55,7 @@
<item>Mixin Component</item>
<item>Module Component</item>
<item>Test Component</item>
<item>Tool Component</item>
</portal_type>
<portal_type id="Contribution Registry Tool">
<item>Contribution Predicate</item>
......
......@@ -82,6 +82,9 @@
<portal_type id="Test Component">
<item>SortIndex</item>
</portal_type>
<portal_type id="Tool Component">
<item>SortIndex</item>
</portal_type>
<portal_type id="Trash Bin">
<item>Base</item>
<item>SimpleItem</item>
......
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="Base Type" module="erp5.portal_type"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_property_domain_dict</string> </key>
<value>
<dictionary>
<item>
<key> <string>short_title</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAI=</string> </persistent>
</value>
</item>
<item>
<key> <string>title</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAM=</string> </persistent>
</value>
</item>
</dictionary>
</value>
</item>
<item>
<key> <string>acquire_local_roles</string> </key>
<value> <int>0</int> </value>
</item>
<item>
<key> <string>content_icon</string> </key>
<value> <string>web_page.png</string> </value>
</item>
<item>
<key> <string>content_meta_type</string> </key>
<value> <string>ERP5 Text Document</string> </value>
</item>
<item>
<key> <string>description</string> </key>
<value> <string>A Tool Component as used to be found in Products.XXX.Tool</string> </value>
</item>
<item>
<key> <string>factory</string> </key>
<value> <string>addDocumentComponent</string> </value>
</item>
<item>
<key> <string>filter_content_types</string> </key>
<value> <int>1</int> </value>
</item>
<item>
<key> <string>group_list</string> </key>
<value>
<tuple/>
</value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>Tool Component</string> </value>
</item>
<item>
<key> <string>init_script</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>permission</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>type_class</string> </key>
<value> <string>ToolComponent</string> </value>
</item>
<item>
<key> <string>type_interface</string> </key>
<value>
<tuple/>
</value>
</item>
<item>
<key> <string>type_mixin</string> </key>
<value>
<tuple/>
</value>
</item>
</dictionary>
</pickle>
</record>
<record id="2" aka="AAAAAAAAAAI=">
<pickle>
<tuple>
<global name="TranslationInformation" module="Products.ERP5Type.TranslationProviderBase"/>
<tuple/>
</tuple>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>domain_name</string> </key>
<value> <string>erp5_content</string> </value>
</item>
<item>
<key> <string>property_name</string> </key>
<value> <string>short_title</string> </value>
</item>
</dictionary>
</pickle>
</record>
<record id="3" aka="AAAAAAAAAAM=">
<pickle>
<tuple>
<global name="TranslationInformation" module="Products.ERP5Type.TranslationProviderBase"/>
<tuple/>
</tuple>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>domain_name</string> </key>
<value> <string>erp5_content</string> </value>
</item>
<item>
<key> <string>property_name</string> </key>
<value> <string>title</string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
......@@ -179,4 +179,8 @@
<type>Test Component</type>
<workflow>component_validation_workflow, dynamic_class_generation_interaction_workflow, edit_workflow</workflow>
</chain>
<chain>
<type>Tool Component</type>
<workflow>component_validation_workflow, dynamic_class_generation_interaction_workflow, edit_workflow</workflow>
</chain>
</workflow_chain>
\ No newline at end of file
......@@ -76,6 +76,7 @@
<string>Mixin Component</string>
<string>Module Component</string>
<string>Test Component</string>
<string>Tool Component</string>
</list>
</value>
</item>
......
......@@ -75,6 +75,7 @@
<string>Mixin Component</string>
<string>Module Component</string>
<string>Test Component</string>
<string>Tool Component</string>
</list>
</value>
</item>
......
......@@ -148,6 +148,7 @@ Template Tool | upgrade_from_repository
Template Tool | view
Test Component | run_live_test
Test Component | view
Tool Component | view
Trash Bin | jump_bt5
Trash Bin | view
Trash Folder | view
......
......@@ -25,6 +25,7 @@ Component Tool | Interface Component
Component Tool | Mixin Component
Component Tool | Module Component
Component Tool | Test Component
Component Tool | Tool Component
Contribution Registry Tool | Contribution Predicate
Domain Tool | Base Domain
Domain | Domain
......
......@@ -86,6 +86,7 @@ TALES Constraint
Template Tool
Test Component
Test Tool
Tool Component
Trash Bin
Trash Folder
Trash Tool
......
......@@ -30,6 +30,7 @@ Simulation Movement | SortIndex
String Attribute Match Constraint | ConstraintType
TALES Constraint | ConstraintType
Test Component | SortIndex
Tool Component | SortIndex
Trash Bin | Base
Trash Bin | SimpleItem
Trash Bin | Task
\ No newline at end of file
......@@ -59,4 +59,7 @@ System Preference | preference_workflow
TALES Constraint | dynamic_class_generation_interaction_workflow
Test Component | component_validation_workflow
Test Component | dynamic_class_generation_interaction_workflow
Test Component | edit_workflow
\ No newline at end of file
Test Component | edit_workflow
Tool Component | component_validation_workflow
Tool Component | dynamic_class_generation_interaction_workflow
Tool Component | edit_workflow
\ No newline at end of file
# -*- coding: utf-8 -*-
##############################################################################
#
# Copyright (c) 2019 Nexedi SA and Contributors. All Rights Reserved.
# Arnaud Fontaine <arnaud.fontaine@nexedi.com>
#
# WARNING: This program as such is intended to be used by professional
# programmers who take the whole responsibility of assessing all potential
# consequences resulting from its eventual inadequacies and bugs
# End users who are looking for a ready-to-use solution with commercial
# guarantees and support are strongly adviced to contract a Free Software
# Service Company
#
# This program is Free Software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA.
#
##############################################################################
from Products.ERP5Type.Core.DocumentComponent import DocumentComponent
from AccessControl import ClassSecurityInfo
from Products.ERP5Type import Permissions
import zope.interface
from Products.ERP5Type.interfaces.component import IComponent
class ToolComponent(DocumentComponent):
"""
ZODB Component for Tools, used to be found on Products.XXX.Tool on FS
"""
meta_type = 'ERP5 Tool Component'
portal_type = 'Tool Component'
zope.interface.implements(IComponent)
security = ClassSecurityInfo()
security.declareObjectProtected(Permissions.AccessContentsInformation)
@staticmethod
def _getFilesystemPath():
# TODO-arnau: useful?
raise NotImplementedError
@staticmethod
def _getDynamicModuleNamespace():
return 'erp5.component.tool'
@staticmethod
def getIdPrefix():
return 'tool'
......@@ -188,6 +188,8 @@ def initializeDynamicModules():
holds Interface modules previously found in Products.NAME.interfaces
erp5.component.mixin:
holds Mixin modules previously found in Products.NAME.mixin
erp5.component.Tool:
holds Tool modules previously found in Products.NAME.Tool
erp5.component.extension:
holds Extension modules previously found in bt5 in
$INSTANCE_HOME/Extensions
......@@ -245,6 +247,9 @@ def initializeDynamicModules():
erp5.component.document = ComponentDynamicPackage('erp5.component.document',
'Document Component')
erp5.component.tool = ComponentDynamicPackage('erp5.component.tool',
'Tool Component')
erp5.component.interface = ComponentDynamicPackage('erp5.component.interface',
'Interface Component')
......
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