Commit e2f46ae8 authored by Arnaud Fontaine's avatar Arnaud Fontaine

ZODB Components: Migrate ERP5TioSafe Product from filesystem (MR !1190).

Also, as OAuthTool class is only used as a Folder ({Google,Facebook}Connector) remove
{unused,unmaintained,unfinished} code:
  * Properties are statically set on portal_oauth directly with non-persistent classes
    define in OAuthTool.py. This prevents migration to ZODB Components as migrating
    OAuthTool.py to erp5_oauth would break upgrade: chicken & egg issue: we need these
    classes on importFile(portal_oauth.xml) (portal_templates.download()) but they are
    not available until the bt5 is installed....
  * Several properties are supposed to be secret but statically set in OAuthTool.py.
  * This code has never been used since its introduction 9 years ago.
parent 3438bb87
############################################################################## ##############################################################################
# #
# Copyright (c) 2002-2009 Nexedi SA and Contributors. All Rights Reserved. # Copyright (c) 2010 Nexedi SARL and Contributors. All Rights Reserved.
# Aurelien Calonne <aurel@nexedi.com>
# #
# WARNING: This program as such is intended to be used by professional # WARNING: This program as such is intended to be used by professional
# programmers who take the whole responsability of assessing all potential # programmers who take the whole responsability of assessing all potential
...@@ -25,22 +26,50 @@ ...@@ -25,22 +26,50 @@
# #
############################################################################## ##############################################################################
# Update ERP5 Globals from Products.ERP5Type.Globals import InitializeClass
from Products.ERP5Type.Utils import initializeProduct, updateGlobals from Products.ERP5Type.Tool.BaseTool import BaseTool
from Tool import IntegrationTool, OAuthTool
import sys, Permissions
this_module = sys.modules[ __name__ ]
document_classes = updateGlobals(this_module, globals(),
permissions_module=Permissions)
# Finish installation class OAuthTool(BaseTool):
def initialize( context ): """
import Document OAuthTool is used to allow API authentification
initializeProduct(context, this_module, globals(), """
document_module=Document, title = 'OAuth Tool'
document_classes=document_classes, id = 'portal_oauth'
object_classes=(), meta_type = 'ERP5 OAuth Tool'
portal_tools=(IntegrationTool.IntegrationTool, portal_type = 'OAuth Tool'
OAuthTool.OAuthTool), allowed_types = ()
content_constructors=(),
content_classes=()) def __setstate__(self, value):
"""
Delete object() attributes which has never been used and whose classes
code has been deleted and dummy classes kept only to allow unpickle of
portal_oauth which happens before __setstate__() is called...
"""
BaseTool.__setstate__(self, value)
is_already_migrated = True
for attribute_name in ('consumer', 'my_access_token', 'my_request_token', 'signature_methods'):
try:
delattr(self, attribute_name)
is_already_migrated = False
except AttributeError:
pass
if not is_already_migrated:
# str attributes
for attribute_name in ('verifier', 'nonce'):
try:
delattr(self, attribute_name)
except AttributeError:
pass
InitializeClass(OAuthTool)
import sys
sys.modules['Products.ERP5TioSafe.Tool.OAuthTool'] = sys.modules[__name__]
class DummyClassForUnpickle(object):
def __init__(self, *_, **__):
pass
OAuthToken = DummyClassForUnpickle
OAuthConsumer = DummyClassForUnpickle
OAuthSignatureMethod = DummyClassForUnpickle
OAuthSignatureMethod_HMAC_SHA1 = DummyClassForUnpickle
OAuthSignatureMethod_PLAINTEXT = DummyClassForUnpickle
\ No newline at end of file
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="Tool Component" module="erp5.portal_type"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>default_reference</string> </key>
<value> <string>OAuthTool</string> </value>
</item>
<item>
<key> <string>default_source_reference</string> </key>
<value> <string>Products.ERP5TioSafe.Tool.OAuthTool</string> </value>
</item>
<item>
<key> <string>description</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>tool.erp5.OAuthTool</string> </value>
</item>
<item>
<key> <string>portal_type</string> </key>
<value> <string>Tool Component</string> </value>
</item>
<item>
<key> <string>sid</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>text_content_error_message</string> </key>
<value>
<tuple/>
</value>
</item>
<item>
<key> <string>text_content_warning_message</string> </key>
<value>
<tuple/>
</value>
</item>
<item>
<key> <string>version</string> </key>
<value> <string>erp5</string> </value>
</item>
<item>
<key> <string>workflow_history</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAI=</string> </persistent>
</value>
</item>
</dictionary>
</pickle>
</record>
<record id="2" aka="AAAAAAAAAAI=">
<pickle>
<global name="PersistentMapping" module="Persistence.mapping"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>data</string> </key>
<value>
<dictionary>
<item>
<key> <string>component_validation_workflow</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAM=</string> </persistent>
</value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</pickle>
</record>
<record id="3" aka="AAAAAAAAAAM=">
<pickle>
<global name="WorkflowHistoryList" module="Products.ERP5Type.Workflow"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_log</string> </key>
<value>
<list>
<dictionary>
<item>
<key> <string>action</string> </key>
<value> <string>validate</string> </value>
</item>
<item>
<key> <string>validation_state</string> </key>
<value> <string>validated</string> </value>
</item>
</dictionary>
</list>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
...@@ -6,215 +6,11 @@ ...@@ -6,215 +6,11 @@
</pickle> </pickle>
<pickle> <pickle>
<dictionary> <dictionary>
<item>
<key> <string>_count</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAI=</string> </persistent>
</value>
</item>
<item>
<key> <string>_mt_index</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAM=</string> </persistent>
</value>
</item>
<item>
<key> <string>_tree</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAQ=</string> </persistent>
</value>
</item>
<item>
<key> <string>consumer</string> </key>
<value>
<object>
<klass>
<global id="1.1" name="_dt_reconstructor" module="DateTime.DateTime"/>
</klass>
<tuple>
<global name="OAuthConsumer" module="Products.ERP5TioSafe.Tool.OAuthTool"/>
<global id="1.2" name="object" module="__builtin__"/>
<none/>
</tuple>
<state>
<dictionary>
<item>
<key> <string>key</string> </key>
<value> <string>e90f5a97ec5cecd1</string> </value>
</item>
<item>
<key> <string>secret</string> </key>
<value> <string>9b5f6c60bb007b24</string> </value>
</item>
</dictionary>
</state>
</object>
</value>
</item>
<item> <item>
<key> <string>id</string> </key> <key> <string>id</string> </key>
<value> <string>portal_oauth</string> </value> <value> <string>portal_oauth</string> </value>
</item> </item>
<item>
<key> <string>my_access_token</string> </key>
<value>
<object>
<klass> <reference id="1.1"/> </klass>
<tuple>
<global id="1.3" name="OAuthToken" module="Products.ERP5TioSafe.Tool.OAuthTool"/>
<reference id="1.2"/>
<none/>
</tuple>
<state>
<dictionary>
<item>
<key> <string>key</string> </key>
<value> <string>accesskey</string> </value>
</item>
<item>
<key> <string>secret</string> </key>
<value> <string>accesssecret</string> </value>
</item>
</dictionary> </dictionary>
</state>
</object>
</value>
</item>
<item>
<key> <string>my_request_token</string> </key>
<value>
<object>
<klass> <reference id="1.1"/> </klass>
<tuple>
<reference id="1.3"/>
<reference id="1.2"/>
<none/>
</tuple>
<state>
<dictionary>
<item>
<key> <string>key</string> </key>
<value> <string>requestkey</string> </value>
</item>
<item>
<key> <string>secret</string> </key>
<value> <string>requestsecret</string> </value>
</item>
</dictionary>
</state>
</object>
</value>
</item>
<item>
<key> <string>nonce</string> </key>
<value> <string>nonce</string> </value>
</item>
<item>
<key> <string>signature_methods</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAU=</string> </persistent>
</value>
</item>
<item>
<key> <string>verifier</string> </key>
<value> <string>verifier</string> </value>
</item>
</dictionary>
</pickle>
</record>
<record id="2" aka="AAAAAAAAAAI=">
<pickle>
<global name="Length" module="BTrees.Length"/>
</pickle>
<pickle> <int>0</int> </pickle>
</record>
<record id="3" aka="AAAAAAAAAAM=">
<pickle>
<global name="OOBTree" module="BTrees.OOBTree"/>
</pickle>
<pickle>
<tuple>
<tuple>
<tuple>
<tuple>
<string>RPM Client Interface</string>
<persistent> <string encoding="base64">AAAAAAAAAAY=</string> </persistent>
</tuple>
</tuple>
</tuple>
</tuple>
</pickle>
</record>
<record id="4" aka="AAAAAAAAAAQ=">
<pickle>
<global name="OOBTree" module="BTrees.OOBTree"/>
</pickle>
<pickle>
<none/>
</pickle>
</record>
<record id="5" aka="AAAAAAAAAAU=">
<pickle>
<tuple>
<global name="PersistentMapping" module="Persistence.mapping"/>
<tuple/>
</tuple>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>data</string> </key>
<value>
<dictionary>
<item>
<key> <string>HMAC-SHA1</string> </key>
<value>
<object>
<klass>
<global id="5.1" name="_dt_reconstructor" module="DateTime.DateTime"/>
</klass>
<tuple>
<global name="OAuthSignatureMethod_HMAC_SHA1" module="Products.ERP5TioSafe.Tool.OAuthTool"/>
<global id="5.2" name="object" module="__builtin__"/>
<none/>
</tuple>
</object>
</value>
</item>
<item>
<key> <string>PLAINTEXT</string> </key>
<value>
<object>
<klass> <reference id="5.1"/> </klass>
<tuple>
<global name="OAuthSignatureMethod_PLAINTEXT" module="Products.ERP5TioSafe.Tool.OAuthTool"/>
<reference id="5.2"/>
<none/>
</tuple>
</object>
</value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</pickle>
</record>
<record id="6" aka="AAAAAAAAAAY=">
<pickle>
<global name="OIBTree" module="BTrees.OIBTree"/>
</pickle>
<pickle>
<tuple>
<tuple>
<tuple>
<tuple>
<string>rpm</string>
<int>1</int>
</tuple>
</tuple>
</tuple>
</tuple>
</pickle> </pickle>
</record> </record>
</ZopeData> </ZopeData>
tool.erp5.OAuthTool
\ No newline at end of file
...@@ -26,8 +26,7 @@ ...@@ -26,8 +26,7 @@
############################################################################## ##############################################################################
from AccessControl import ClassSecurityInfo from AccessControl import ClassSecurityInfo
from Products.CMFCore.utils import getToolByName from Products.ERP5Type import Permissions, PropertySheet
from Products.ERP5Type import Permissions, PropertySheet, Constraint, interfaces
from Products.ERP5Type.XMLObject import XMLObject from Products.ERP5Type.XMLObject import XMLObject
class IntegrationMapping(XMLObject): class IntegrationMapping(XMLObject):
......
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="Document Component" module="erp5.portal_type"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>default_reference</string> </key>
<value> <string>IntegrationMapping</string> </value>
</item>
<item>
<key> <string>default_source_reference</string> </key>
<value> <string>Products.ERP5TioSafe.Document.IntegrationMapping</string> </value>
</item>
<item>
<key> <string>description</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>document.erp5.IntegrationMapping</string> </value>
</item>
<item>
<key> <string>portal_type</string> </key>
<value> <string>Document Component</string> </value>
</item>
<item>
<key> <string>sid</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>text_content_error_message</string> </key>
<value>
<tuple/>
</value>
</item>
<item>
<key> <string>text_content_warning_message</string> </key>
<value>
<tuple/>
</value>
</item>
<item>
<key> <string>version</string> </key>
<value> <string>erp5</string> </value>
</item>
<item>
<key> <string>workflow_history</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAI=</string> </persistent>
</value>
</item>
</dictionary>
</pickle>
</record>
<record id="2" aka="AAAAAAAAAAI=">
<pickle>
<global name="PersistentMapping" module="Persistence.mapping"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>data</string> </key>
<value>
<dictionary>
<item>
<key> <string>component_validation_workflow</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAM=</string> </persistent>
</value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</pickle>
</record>
<record id="3" aka="AAAAAAAAAAM=">
<pickle>
<global name="WorkflowHistoryList" module="Products.ERP5Type.Workflow"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_log</string> </key>
<value>
<list>
<dictionary>
<item>
<key> <string>action</string> </key>
<value> <string>validate</string> </value>
</item>
<item>
<key> <string>validation_state</string> </key>
<value> <string>validated</string> </value>
</item>
</dictionary>
</list>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
...@@ -28,14 +28,6 @@ ...@@ -28,14 +28,6 @@
from AccessControl import ClassSecurityInfo from AccessControl import ClassSecurityInfo
from Products.ERP5Type import Permissions, PropertySheet from Products.ERP5Type import Permissions, PropertySheet
from Products.ERP5Type.XMLObject import XMLObject from Products.ERP5Type.XMLObject import XMLObject
from Products.ERP5TioSafe.Utils import EchoDictTarget
from Products.PageTemplates.ZopePageTemplate import ZopePageTemplate
from App.Extensions import getBrain
from lxml import etree
from zLOG import LOG, ERROR
from urllib2 import URLError, HTTPError
_MARKER = []
class IntegrationModule(XMLObject): class IntegrationModule(XMLObject):
# CMF Type Definition # CMF Type Definition
...@@ -56,7 +48,7 @@ class IntegrationModule(XMLObject): ...@@ -56,7 +48,7 @@ class IntegrationModule(XMLObject):
, PropertySheet.Arrow , PropertySheet.Arrow
) )
def checkConsistency(self, fixit=False, filter=None, **kw): def checkConsistency(self, fixit=False, filter=None, **kw): # pylint: disable=redefined-builtin
""" """
consistency is checked through a web service request consistency is checked through a web service request
""" """
......
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="Document Component" module="erp5.portal_type"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>default_reference</string> </key>
<value> <string>IntegrationModule</string> </value>
</item>
<item>
<key> <string>default_source_reference</string> </key>
<value> <string>Products.ERP5TioSafe.Document.IntegrationModule</string> </value>
</item>
<item>
<key> <string>description</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>document.erp5.IntegrationModule</string> </value>
</item>
<item>
<key> <string>portal_type</string> </key>
<value> <string>Document Component</string> </value>
</item>
<item>
<key> <string>sid</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>text_content_error_message</string> </key>
<value>
<tuple/>
</value>
</item>
<item>
<key> <string>text_content_warning_message</string> </key>
<value>
<tuple/>
</value>
</item>
<item>
<key> <string>version</string> </key>
<value> <string>erp5</string> </value>
</item>
<item>
<key> <string>workflow_history</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAI=</string> </persistent>
</value>
</item>
</dictionary>
</pickle>
</record>
<record id="2" aka="AAAAAAAAAAI=">
<pickle>
<global name="PersistentMapping" module="Persistence.mapping"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>data</string> </key>
<value>
<dictionary>
<item>
<key> <string>component_validation_workflow</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAM=</string> </persistent>
</value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</pickle>
</record>
<record id="3" aka="AAAAAAAAAAM=">
<pickle>
<global name="WorkflowHistoryList" module="Products.ERP5Type.Workflow"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_log</string> </key>
<value>
<list>
<dictionary>
<item>
<key> <string>action</string> </key>
<value> <string>validate</string> </value>
</item>
<item>
<key> <string>validation_state</string> </key>
<value> <string>validated</string> </value>
</item>
</dictionary>
</list>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
...@@ -32,7 +32,7 @@ ...@@ -32,7 +32,7 @@
from Products.ERP5Type.Core.Folder import Folder from Products.ERP5Type.Core.Folder import Folder
from AccessControl import ClassSecurityInfo from AccessControl import ClassSecurityInfo
from Products.ERP5Type import Permissions, PropertySheet from Products.ERP5Type import Permissions, PropertySheet
from zLOG import LOG, INFO, ERROR, WARNING from zLOG import LOG, INFO, ERROR
from Products.ERP5Type.TransactionalVariable import getTransactionalVariable from Products.ERP5Type.TransactionalVariable import getTransactionalVariable
...@@ -81,7 +81,7 @@ class IntegrationSite(Folder): ...@@ -81,7 +81,7 @@ class IntegrationSite(Folder):
raise ValueError, "Empty category provided" raise ValueError, "Empty category provided"
# Split the category to have the base and the variation category # Split the category to have the base and the variation category
base_category, variation_category = category.split('/', 1) _, variation_category = category.split('/', 1)
# Check the product variations if exists the product # Check the product variations if exists the product
if product is not None: if product is not None:
......
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="Document Component" module="erp5.portal_type"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>default_reference</string> </key>
<value> <string>IntegrationSite</string> </value>
</item>
<item>
<key> <string>default_source_reference</string> </key>
<value> <string>Products.ERP5TioSafe.Document.IntegrationSite</string> </value>
</item>
<item>
<key> <string>description</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>document.erp5.IntegrationSite</string> </value>
</item>
<item>
<key> <string>portal_type</string> </key>
<value> <string>Document Component</string> </value>
</item>
<item>
<key> <string>sid</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>text_content_error_message</string> </key>
<value>
<tuple/>
</value>
</item>
<item>
<key> <string>text_content_warning_message</string> </key>
<value>
<tuple/>
</value>
</item>
<item>
<key> <string>version</string> </key>
<value> <string>erp5</string> </value>
</item>
<item>
<key> <string>workflow_history</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAI=</string> </persistent>
</value>
</item>
</dictionary>
</pickle>
</record>
<record id="2" aka="AAAAAAAAAAI=">
<pickle>
<global name="PersistentMapping" module="Persistence.mapping"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>data</string> </key>
<value>
<dictionary>
<item>
<key> <string>component_validation_workflow</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAM=</string> </persistent>
</value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</pickle>
</record>
<record id="3" aka="AAAAAAAAAAM=">
<pickle>
<global name="WorkflowHistoryList" module="Products.ERP5Type.Workflow"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_log</string> </key>
<value>
<list>
<dictionary>
<item>
<key> <string>action</string> </key>
<value> <string>validate</string> </value>
</item>
<item>
<key> <string>validation_state</string> </key>
<value> <string>validated</string> </value>
</item>
</dictionary>
</list>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
...@@ -28,7 +28,7 @@ ...@@ -28,7 +28,7 @@
from AccessControl import ClassSecurityInfo from AccessControl import ClassSecurityInfo
from Products.ERP5Type import Permissions, PropertySheet from Products.ERP5Type import Permissions, PropertySheet
from Products.ERP5Type.XMLObject import XMLObject from Products.ERP5Type.XMLObject import XMLObject
from Products.ERP5TioSafe.Utils import EchoDictTarget, NewEchoDictTarget from erp5.component.module.TioSafeUtils import EchoDictTarget, NewEchoDictTarget
from Products.PageTemplates.ZopePageTemplate import ZopePageTemplate from Products.PageTemplates.ZopePageTemplate import ZopePageTemplate
from App.Extensions import getBrain from App.Extensions import getBrain
from lxml import etree from lxml import etree
......
...@@ -87,7 +87,7 @@ class NewEchoDictTarget: ...@@ -87,7 +87,7 @@ class NewEchoDictTarget:
#self._current_tag = None #self._current_tag = None
try: try:
if len(self.parser_stack): if len(self.parser_stack):
value , subtag = self.parser_stack[-1][tag] _, subtag = self.parser_stack[-1][tag]
if subtag: if subtag:
if len(self.parser_stack) == 1: if len(self.parser_stack) == 1:
# This is the end of an object # This is the end of an object
...@@ -162,7 +162,7 @@ class EchoDictTarget: ...@@ -162,7 +162,7 @@ class EchoDictTarget:
def end(self, tag): def end(self, tag):
try: try:
value , root = self.parser_dict[tag] _, root = self.parser_dict[tag]
if root: if root:
self.result_list.append(self._current_object.copy()) self.result_list.append(self._current_object.copy())
except KeyError: except KeyError:
......
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="Module Component" module="erp5.portal_type"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>default_reference</string> </key>
<value> <string>TioSafeUtils</string> </value>
</item>
<item>
<key> <string>default_source_reference</string> </key>
<value> <string>Products.ERP5TioSafe.Utils</string> </value>
</item>
<item>
<key> <string>description</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>module.erp5.TioSafeUtils</string> </value>
</item>
<item>
<key> <string>portal_type</string> </key>
<value> <string>Module Component</string> </value>
</item>
<item>
<key> <string>sid</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>text_content_error_message</string> </key>
<value>
<tuple/>
</value>
</item>
<item>
<key> <string>text_content_warning_message</string> </key>
<value>
<tuple/>
</value>
</item>
<item>
<key> <string>version</string> </key>
<value> <string>erp5</string> </value>
</item>
<item>
<key> <string>workflow_history</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAI=</string> </persistent>
</value>
</item>
</dictionary>
</pickle>
</record>
<record id="2" aka="AAAAAAAAAAI=">
<pickle>
<global name="PersistentMapping" module="Persistence.mapping"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>data</string> </key>
<value>
<dictionary>
<item>
<key> <string>component_validation_workflow</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAM=</string> </persistent>
</value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</pickle>
</record>
<record id="3" aka="AAAAAAAAAAM=">
<pickle>
<global name="WorkflowHistoryList" module="Products.ERP5Type.Workflow"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_log</string> </key>
<value>
<list>
<dictionary>
<item>
<key> <string>action</string> </key>
<value> <string>validate</string> </value>
</item>
<item>
<key> <string>validation_state</string> </key>
<value> <string>validated</string> </value>
</item>
</dictionary>
</list>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
...@@ -38,7 +38,7 @@ pub = sync_tool.newContent(id="%s_%s_pub" %(reference, module_name), ...@@ -38,7 +38,7 @@ pub = sync_tool.newContent(id="%s_%s_pub" %(reference, module_name),
source_reference="%s_%s_synchronization" %(reference, module_name), source_reference="%s_%s_synchronization" %(reference, module_name),
url_string=portal_object.absolute_url(), url_string=portal_object.absolute_url(),
source=module.getId(), source=module.getId(),
conduit_module_id="Products.ERP5TioSafe.Conduit.ERP5%sConduit" %(abstract_class_name,), conduit_module_id="erp5.component.module.ERP5%sConduit" %(abstract_class_name,),
list_method_id="%sModule_get%sValueList"% (module_type, module_type), list_method_id="%sModule_get%sValueList"% (module_type, module_type),
xml_binding_generator_method_id="%s_asTioSafeXML" %(abstract_class_name,), xml_binding_generator_method_id="%s_asTioSafeXML" %(abstract_class_name,),
synchronization_id_generator_method_id="generateNewId", synchronization_id_generator_method_id="generateNewId",
...@@ -59,7 +59,7 @@ sub = sync_tool.newContent(id="%s_%s_sub" %(reference, module_name), ...@@ -59,7 +59,7 @@ sub = sync_tool.newContent(id="%s_%s_sub" %(reference, module_name),
url_string=portal_object.absolute_url(), url_string=portal_object.absolute_url(),
source=module.getRelativeUrl(), source=module.getRelativeUrl(),
list_method_id="getObjectList", list_method_id="getObjectList",
conduit_module_id="Products.ERP5TioSafe.Conduit.TioSafe%sConduit" %(abstract_class_name,), conduit_module_id="erp5.component.module.TioSafe%sConduit" %(abstract_class_name,),
xml_binding_generator_method_id="asXML", xml_binding_generator_method_id="asXML",
content_type="application/vnd.syncml+xml", content_type="application/vnd.syncml+xml",
synchronization_id_generator_method_id="generateNewId", synchronization_id_generator_method_id="generateNewId",
......
...@@ -38,7 +38,7 @@ for module in context.objectValues(portal_type="Integration Module"): ...@@ -38,7 +38,7 @@ for module in context.objectValues(portal_type="Integration Module"):
source_reference="%s_%s_synchronization" %(reference, module_name), source_reference="%s_%s_synchronization" %(reference, module_name),
url_string=portal_object.absolute_url(), url_string=portal_object.absolute_url(),
source=module.getRelativeUrl(), source=module.getRelativeUrl(),
conduit_module_id="Products.ERP5TioSafe.Conduit.ERP5%sConduit" %(abstract_class_name,), conduit_module_id="erp5.component.module.ERP5%sConduit" %(abstract_class_name,),
list_method_id="%sModule_get%sValueList"% (module_type, module_type), list_method_id="%sModule_get%sValueList"% (module_type, module_type),
xml_binding_generator_method_id="%s_asTioSafeXML" %(abstract_class_name,), xml_binding_generator_method_id="%s_asTioSafeXML" %(abstract_class_name,),
synchronization_id_generator_method_id="generateNewId", synchronization_id_generator_method_id="generateNewId",
...@@ -59,7 +59,7 @@ for module in context.objectValues(portal_type="Integration Module"): ...@@ -59,7 +59,7 @@ for module in context.objectValues(portal_type="Integration Module"):
url_string=portal_object.absolute_url(), url_string=portal_object.absolute_url(),
source=site.getRelativeUrl(), source=site.getRelativeUrl(),
list_method_id=module.getId(), list_method_id=module.getId(),
conduit_module_id="Products.ERP5TioSafe.Conduit.TioSafe%sConduit" %(abstract_class_name,), conduit_module_id="erp5.component.module.TioSafe%sConduit" %(abstract_class_name,),
xml_binding_generator_method_id="asXML", xml_binding_generator_method_id="asXML",
content_type="application/vnd.syncml+xml", content_type="application/vnd.syncml+xml",
synchronization_id_generator_method_id="generateNewId", synchronization_id_generator_method_id="generateNewId",
......
...@@ -94,7 +94,7 @@ for module_id, abstract_class_name in ordered_module_list: ...@@ -94,7 +94,7 @@ for module_id, abstract_class_name in ordered_module_list:
source_reference="%s_%s_synchronization" % (reference, module_name), source_reference="%s_%s_synchronization" % (reference, module_name),
url_string=portal_object.absolute_url(), url_string=portal_object.absolute_url(),
source=module.getRelativeUrl(), source=module.getRelativeUrl(),
conduit_module_id="Products.ERP5TioSafe.Conduit.ERP5%sConduit" % (abstract_class_name, ), conduit_module_id="erp5.component.module.ERP5%sConduit" % (abstract_class_name, ),
list_method_id="%sModule_get%sValueList" % (module_name, module_name), list_method_id="%sModule_get%sValueList" % (module_name, module_name),
xml_binding_generator_method_id="%s_asTioSafeXML" % (abstract_class_name, ), xml_binding_generator_method_id="%s_asTioSafeXML" % (abstract_class_name, ),
synchronization_id_generator_method_id="generateNewId", synchronization_id_generator_method_id="generateNewId",
...@@ -116,7 +116,7 @@ for module_id, abstract_class_name in ordered_module_list: ...@@ -116,7 +116,7 @@ for module_id, abstract_class_name in ordered_module_list:
url_string=portal_object.absolute_url(), url_string=portal_object.absolute_url(),
source=site.getRelativeUrl(), source=site.getRelativeUrl(),
list_method_id=module.getId(), list_method_id=module.getId(),
conduit_module_id="Products.ERP5TioSafe.Conduit.TioSafe%sConduit" % (abstract_class_name, ), conduit_module_id="erp5.component.module.TioSafe%sConduit" % (abstract_class_name, ),
xml_binding_generator_method_id="asXML", xml_binding_generator_method_id="asXML",
content_type="application/vnd.syncml+xml", content_type="application/vnd.syncml+xml",
synchronization_id_generator_method_id="generateNewId", synchronization_id_generator_method_id="generateNewId",
......
from AccessControl import ClassSecurityInfo from Products.ERP5Type.Globals import InitializeClass
from Products.ERP5Type.Globals import InitializeClass, DTMLFile
from Products.ERP5 import _dtmldir
from Products.ERP5Type import Permissions
from Products.ERP5Type.Tool.BaseTool import BaseTool from Products.ERP5Type.Tool.BaseTool import BaseTool
""" ERP5 portal_integrations tool """ """ ERP5 portal_integrations tool """
...@@ -16,13 +13,5 @@ class IntegrationTool(BaseTool): ...@@ -16,13 +13,5 @@ class IntegrationTool(BaseTool):
portal_type = 'Integration Tool' portal_type = 'Integration Tool'
allowed_type = () allowed_type = ()
# Declarative Security
security = ClassSecurityInfo()
# ZMI Methods
security.declareProtected(Permissions.ManagePortal, 'manage_overview')
manage_overview = DTMLFile('explainIntegrationTool', _dtmldir)
InitializeClass(IntegrationTool) InitializeClass(IntegrationTool)
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="Tool Component" module="erp5.portal_type"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>default_reference</string> </key>
<value> <string>IntegrationTool</string> </value>
</item>
<item>
<key> <string>default_source_reference</string> </key>
<value> <string>Products.ERP5TioSafe.Tool.IntegrationTool</string> </value>
</item>
<item>
<key> <string>description</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>tool.erp5.IntegrationTool</string> </value>
</item>
<item>
<key> <string>portal_type</string> </key>
<value> <string>Tool Component</string> </value>
</item>
<item>
<key> <string>sid</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>text_content_error_message</string> </key>
<value>
<tuple/>
</value>
</item>
<item>
<key> <string>text_content_warning_message</string> </key>
<value>
<tuple/>
</value>
</item>
<item>
<key> <string>version</string> </key>
<value> <string>erp5</string> </value>
</item>
<item>
<key> <string>workflow_history</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAI=</string> </persistent>
</value>
</item>
</dictionary>
</pickle>
</record>
<record id="2" aka="AAAAAAAAAAI=">
<pickle>
<global name="PersistentMapping" module="Persistence.mapping"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>data</string> </key>
<value>
<dictionary>
<item>
<key> <string>component_validation_workflow</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAM=</string> </persistent>
</value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</pickle>
</record>
<record id="3" aka="AAAAAAAAAAM=">
<pickle>
<global name="WorkflowHistoryList" module="Products.ERP5Type.Workflow"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_log</string> </key>
<value>
<list>
<dictionary>
<item>
<key> <string>action</string> </key>
<value> <string>validate</string> </value>
</item>
<item>
<key> <string>validation_state</string> </key>
<value> <string>validated</string> </value>
</item>
</dictionary>
</list>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
document.erp5.WebServiceRequestGroup
document.erp5.WebServiceConnector document.erp5.WebServiceConnector
document.erp5.WebServiceRequest document.erp5.WebServiceRequest
document.erp5.WebServiceRequestGroup
document.erp5.IntegrationMapping
document.erp5.IntegrationModule
document.erp5.IntegrationSite
\ No newline at end of file
...@@ -8,3 +8,4 @@ module.erp5.OrganisationERP5IntegrationConduit ...@@ -8,3 +8,4 @@ module.erp5.OrganisationERP5IntegrationConduit
module.erp5.TioSafeBaseConduit module.erp5.TioSafeBaseConduit
module.erp5.TioSafeNodeConduit module.erp5.TioSafeNodeConduit
module.erp5.TioSafeResourceConduit module.erp5.TioSafeResourceConduit
module.erp5.TioSafeUtils
\ No newline at end of file
tool.erp5.IntegrationTool
\ No newline at end of file
<dtml-var manage_page_header>
<dtml-var manage_tabs>
<p>Explain IntegrationTool</p>
This tool is used to define integration sites.
<dtml-var manage_page_footer>
This diff is collapsed.
<?xml version="1.0" encoding="utf-8"?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema">
<!-- Define the XML Schema of a node -->
<xs:element name="directory">
<xs:complexType>
<xs:sequence>
<xs:element name="node" maxOccurs="unbounded">
<xs:complexType>
<xs:sequence>
<xs:element name="title" type="xs:string" minOccurs="0"/>
<xs:element name="firstname" type="xs:string" minOccurs="0"/>
<xs:element name="lastname" type="xs:string" minOccurs="0"/>
<xs:element name="email" type="xs:string" minOccurs="0"/>
<xs:element name="birthday" type="xs:string" minOccurs="0"/>
<xs:element name="phone" type="xs:string" minOccurs="0"/>
<xs:element name="cellphone" type="xs:string" minOccurs="0"/>
<xs:element name="fax" type="xs:string" minOccurs="0"/>
<xs:element name="address" minOccurs="0" maxOccurs="unbounded">
<xs:complexType>
<xs:sequence>
<xs:element name="street" type="xs:string"/>
<xs:element name="zip" type="xs:string" minOccurs="0"/>
<xs:element name="city" type="xs:string" minOccurs="0"/>
<xs:element name="country" type="xs:string" minOccurs="0"/>
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element name="category" type="xs:string" minOccurs="0" maxOccurs="unbounded"/>
<xs:element name="relation" type="xs:string" minOccurs="0"/>
</xs:sequence>
<xs:attribute name="type" use="required"/>
</xs:complexType>
</xs:element>
</xs:sequence>
</xs:complexType>
</xs:element>
</xs:schema>
<?xml version="1.0" encoding="utf-8"?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema">
<!-- Define the XML Schema of a node -->
<xs:element name="catalog">
<xs:complexType>
<xs:sequence>
<xs:element name="resource" maxOccurs="unbounded">
<xs:complexType>
<xs:sequence>
<xs:element name="title" type="xs:string"/>
<xs:element name="reference" type="xs:string" minOccurs="0"/>
<xs:element name="sale_price" type="xs:float" minOccurs="0"/>
<xs:element name="purchase_price" type="xs:float" minOccurs="0"/>
<xs:element name="ean13" type="xs:string" minOccurs="0"/>
<xs:element name="category" type="xs:string" minOccurs="0" maxOccurs="unbounded"/>
</xs:sequence>
<xs:attribute name="type" use="required"/>
</xs:complexType>
</xs:element>
</xs:sequence>
</xs:complexType>
</xs:element>
</xs:schema>
<?xml version="1.0" encoding="utf-8"?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema">
<!-- Define the XML Schema of a transaction -->
<xs:element name="journal">
<xs:complexType>
<xs:sequence>
<xs:element name="transaction" maxOccurs="unbounded">
<xs:complexType>
<xs:sequence>
<xs:element name="title" type="xs:string" minOccurs="0"/>
<xs:element name="start_date" type="xs:string"/>
<xs:element name="stop_date" type="xs:string"/>
<xs:element name="reference" type="xs:string"/>
<xs:element name="currency" type="xs:string"/>
<xs:element name="payment_mode" type="xs:string"/>
<xs:element name="category" type="xs:string" minOccurs="0" maxOccurs="unbounded"/>
<xs:element name="arrow" maxOccurs="unbounded">
<xs:complexType>
<xs:sequence>
<xs:element name="source" type="xs:string" minOccurs="0"/>
<xs:element name="destination" type="xs:string" minOccurs="0"/>
</xs:sequence>
<xs:attribute name="type" use="required"/>
</xs:complexType>
</xs:element>
<xs:element name="movement" maxOccurs="unbounded">
<xs:complexType>
<xs:sequence>
<xs:element name="resource" type="xs:string"/>
<xs:element name="title" type="xs:string" minOccurs="0"/>
<xs:element name="reference" type="xs:string" minOccurs="0"/>
<xs:element name="quantity" type="xs:float"/>
<xs:element name="price" type="xs:float"/>
<xs:element name="VAT" type="xs:string"/>
<xs:element name="category" type="xs:string" minOccurs="0" maxOccurs="unbounded"/>
</xs:sequence>
</xs:complexType>
</xs:element>
</xs:sequence>
<xs:attribute name="type" use="required"/>
</xs:complexType>
</xs:element>
</xs:sequence>
</xs:complexType>
</xs:element>
</xs:schema>
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