Commit c8ad77fb authored by Arnaud Fontaine's avatar Arnaud Fontaine

ZODB Components: Migrate Products.ERP5Type.WebServiceTool from filesystem.

parent 91b98ea1
...@@ -33,7 +33,7 @@ from Products.PageTemplates.ZopePageTemplate import ZopePageTemplate ...@@ -33,7 +33,7 @@ from Products.PageTemplates.ZopePageTemplate import ZopePageTemplate
from App.Extensions import getBrain from App.Extensions import getBrain
from lxml import etree from lxml import etree
from zLOG import LOG, ERROR, INFO from zLOG import LOG, ERROR, INFO
from Products.ERP5Type.Tool.WebServiceTool import ConnectionError from erp5.component.tool.WebServiceTool import ConnectionError
from Products.ERP5Type.Cache import CachingMethod from Products.ERP5Type.Cache import CachingMethod
ID_SEPARATOR="-" ID_SEPARATOR="-"
......
...@@ -29,10 +29,9 @@ ...@@ -29,10 +29,9 @@
from zLOG import LOG, WARNING from zLOG import LOG, WARNING
from AccessControl import ClassSecurityInfo from AccessControl import ClassSecurityInfo
from Products.ERP5Type.Globals import InitializeClass, DTMLFile from Products.ERP5Type.Globals import InitializeClass
from Products.ERP5Type.Tool.BaseTool import BaseTool from Products.ERP5Type.Tool.BaseTool import BaseTool
from Products.ERP5Type import Permissions from Products.ERP5Type import Permissions
from Products.ERP5Type import _dtmldir
class ConnectionError(Exception): class ConnectionError(Exception):
pass pass
...@@ -85,9 +84,6 @@ class WebServiceTool(BaseTool): ...@@ -85,9 +84,6 @@ class WebServiceTool(BaseTool):
security = ClassSecurityInfo() security = ClassSecurityInfo()
security.declareProtected(Permissions.ManagePortal, 'manage_overview')
manage_overview = DTMLFile('explainWebServiceTool', _dtmldir )
security.declareProtected(Permissions.AccessContentsInformation, security.declareProtected(Permissions.AccessContentsInformation,
'getConnectionPluginList') 'getConnectionPluginList')
def getConnectionPluginList(self): def getConnectionPluginList(self):
......
<?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>WebServiceTool</string> </value>
</item>
<item>
<key> <string>default_source_reference</string> </key>
<value> <string>Products.ERP5Type.Tool.WebServiceTool</string> </value>
</item>
<item>
<key> <string>description</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>tool.erp5.WebServiceTool</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>
tool.erp5.WebServiceTool
\ No newline at end of file
...@@ -26,7 +26,6 @@ ...@@ -26,7 +26,6 @@
# #
############################################################################## ##############################################################################
from Products.ERP5Type.Tool.WebServiceTool import ConnectionError
from Products.ERP5.ERP5Site import getSite from Products.ERP5.ERP5Site import getSite
class MethodWrapper(object): class MethodWrapper(object):
...@@ -43,6 +42,7 @@ class MethodWrapper(object): ...@@ -43,6 +42,7 @@ class MethodWrapper(object):
response = method(*args, **kw) response = method(*args, **kw)
return method.absolute_url(), response return method.absolute_url(), response
else: else:
from erp5.component.tool.WebServiceTool import ConnectionError
raise ConnectionError("Method %s does not exist" %(method_name)) raise ConnectionError("Method %s does not exist" %(method_name))
class SQLConnection: class SQLConnection:
......
...@@ -89,7 +89,7 @@ import Products.ERP5Type.Workflow ...@@ -89,7 +89,7 @@ import Products.ERP5Type.Workflow
def initialize( context ): def initialize( context ):
# Import Product Components # Import Product Components
from Tool import (CacheTool, MemcachedTool, from Tool import (CacheTool, MemcachedTool,
TypesTool, WebServiceTool, PropertySheetTool, TypesTool, PropertySheetTool,
ComponentTool) ComponentTool)
import Document import Document
from Base import Base from Base import Base
...@@ -105,7 +105,6 @@ def initialize( context ): ...@@ -105,7 +105,6 @@ def initialize( context ):
portal_tools = ( CacheTool.CacheTool, portal_tools = ( CacheTool.CacheTool,
MemcachedTool.MemcachedTool, MemcachedTool.MemcachedTool,
TypesTool.TypesTool, TypesTool.TypesTool,
WebServiceTool.WebServiceTool,
PropertySheetTool.PropertySheetTool, PropertySheetTool.PropertySheetTool,
ComponentTool.ComponentTool ComponentTool.ComponentTool
) )
......
<dtml-var manage_page_header>
<dtml-var manage_tabs>
<h3>Web Service Tool</h3>
<p>
Web Service Tool can do all kinds of web services in all kinds of protocols.
</p>
<dtml-var manage_page_footer>
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