Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
erp5
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Labels
Merge Requests
140
Merge Requests
140
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Jobs
Commits
Open sidebar
nexedi
erp5
Commits
a2b4c035
Commit
a2b4c035
authored
May 27, 2020
by
Arnaud Fontaine
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ZODB Components: erp5_interfaces: Migrate SOAPBinding and InterfaceTool from filesystem.
parent
4c8bc987
Changes
8
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
239 additions
and
20 deletions
+239
-20
bt5/erp5_interfaces/DocumentTemplateItem/portal_components/document.erp5.SOAPBinding.py
...mplateItem/portal_components/document.erp5.SOAPBinding.py
+8
-9
bt5/erp5_interfaces/DocumentTemplateItem/portal_components/document.erp5.SOAPBinding.xml
...plateItem/portal_components/document.erp5.SOAPBinding.xml
+110
-0
bt5/erp5_interfaces/TestTemplateItem/portal_components/test.erp5.testSOAPBinding.py
...mplateItem/portal_components/test.erp5.testSOAPBinding.py
+1
-1
bt5/erp5_interfaces/ToolComponentTemplateItem/portal_components/tool.erp5.InterfaceTool.py
...TemplateItem/portal_components/tool.erp5.InterfaceTool.py
+7
-8
bt5/erp5_interfaces/ToolComponentTemplateItem/portal_components/tool.erp5.InterfaceTool.xml
...emplateItem/portal_components/tool.erp5.InterfaceTool.xml
+110
-0
bt5/erp5_interfaces/bt/template_document_id_list
bt5/erp5_interfaces/bt/template_document_id_list
+1
-0
bt5/erp5_interfaces/bt/template_tool_component_id_list
bt5/erp5_interfaces/bt/template_tool_component_id_list
+1
-0
product/ERP5/__init__.py
product/ERP5/__init__.py
+1
-2
No files found.
product/ERP5/Document/
SOAPBinding.py
→
bt5/erp5_interfaces/DocumentTemplateItem/portal_components/document.erp5.
SOAPBinding.py
View file @
a2b4c035
...
@@ -30,7 +30,6 @@ from AccessControl import ClassSecurityInfo
...
@@ -30,7 +30,6 @@ from AccessControl import ClassSecurityInfo
from
Products.ERP5Type
import
PropertySheet
from
Products.ERP5Type
import
PropertySheet
from
Products.ERP5Type.Permissions
import
AccessContentsInformation
from
Products.ERP5Type.Permissions
import
AccessContentsInformation
from
Products.ERP5Type.Base
import
Base
from
Products.ERP5Type.Base
import
Base
from
Products.ERP5Type.Cache
import
transactional_cached
try
:
try
:
from
spyne
import
MethodContext
from
spyne
import
MethodContext
except
ImportError
:
except
ImportError
:
...
@@ -60,13 +59,13 @@ class SOAPBinding(Base):
...
@@ -60,13 +59,13 @@ class SOAPBinding(Base):
security
.
declarePrivate
(
'registerServiceClass'
)
security
.
declarePrivate
(
'registerServiceClass'
)
@
classmethod
@
classmethod
def
registerServiceClass
(
cls
,
service_class
):
def
registerServiceClass
(
cls
,
service_class
):
path
=
'%s.%s'
%
(
service_class
.
__module__
,
service_class
.
__name__
)
path
=
'%s.%s'
%
(
service_class
.
__module__
,
service_class
.
__name__
)
cls
.
_service_class_dict
[
path
]
=
service_class
cls
.
_service_class_dict
[
path
]
=
service_class
@
classmethod
@
classmethod
def
getRegisteredServiceClassItemList
(
cls
):
def
getRegisteredServiceClassItemList
(
cls
):
return
sorted
((
'%s (%s)'
%
(
v
.
__name__
,
v
.
__module__
),
k
)
return
sorted
((
'%s (%s)'
%
(
v
.
__name__
,
v
.
__module__
),
k
)
for
k
,
v
in
cls
.
_service_class_dict
.
iteritems
())
for
k
,
v
in
cls
.
_service_class_dict
.
iteritems
())
security
.
declarePrivate
(
'getListItemUrl'
)
security
.
declarePrivate
(
'getListItemUrl'
)
def
getListItemUrl
(
self
,
*
args
):
def
getListItemUrl
(
self
,
*
args
):
...
@@ -74,7 +73,7 @@ class SOAPBinding(Base):
...
@@ -74,7 +73,7 @@ class SOAPBinding(Base):
def
_getServer
(
self
):
def
_getServer
(
self
):
try
:
try
:
serial
,
server
=
self
.
_v_server
serial
,
server
=
self
.
_v_server
# pylint: disable=access-member-before-definition
if
serial
==
self
.
_p_serial
:
if
serial
==
self
.
_p_serial
:
return
server
return
server
except
AttributeError
:
except
AttributeError
:
...
@@ -86,7 +85,7 @@ class SOAPBinding(Base):
...
@@ -86,7 +85,7 @@ class SOAPBinding(Base):
self
.
_v_server
=
self
.
_p_serial
,
server
self
.
_v_server
=
self
.
_p_serial
,
server
return
server
return
server
def
__call__
(
self
,
REQUEST
):
def
__call__
(
self
,
REQUEST
):
# pylint: disable=arguments-differ
server
=
self
.
_getServer
()
server
=
self
.
_getServer
()
if
REQUEST
.
method
==
'GET'
:
if
REQUEST
.
method
==
'GET'
:
wsdl
=
Wsdl11
(
server
.
app
.
interface
)
wsdl
=
Wsdl11
(
server
.
app
.
interface
)
...
@@ -96,7 +95,7 @@ class SOAPBinding(Base):
...
@@ -96,7 +95,7 @@ class SOAPBinding(Base):
if
hasattr
(
MethodContext
,
'SERVER'
):
if
hasattr
(
MethodContext
,
'SERVER'
):
ctx
=
MethodContext
(
server
,
MethodContext
.
SERVER
)
ctx
=
MethodContext
(
server
,
MethodContext
.
SERVER
)
else
:
# BBB spyne < 2.12
else
:
# BBB spyne < 2.12
ctx
=
MethodContext
(
server
)
ctx
=
MethodContext
(
server
)
# pylint: disable=no-value-for-parameter
ctx
.
in_string
=
REQUEST
.
stdin
ctx
.
in_string
=
REQUEST
.
stdin
ctx
,
=
server
.
generate_contexts
(
ctx
)
ctx
,
=
server
.
generate_contexts
(
ctx
)
ctx
.
udc
=
self
ctx
.
udc
=
self
...
@@ -116,7 +115,7 @@ except ImportError:
...
@@ -116,7 +115,7 @@ except ImportError:
else
:
else
:
class
HelloWorldService
(
ServiceBase
):
class
HelloWorldService
(
ServiceBase
):
@
rpc
(
Unicode
,
Integer
,
_returns
=
Iterable
(
Unicode
))
@
rpc
(
Unicode
,
Integer
,
_returns
=
Iterable
(
Unicode
))
def
say_hello
(
ctx
,
name
,
times
):
def
say_hello
(
ctx
,
name
,
times
):
# pylint: disable=no-self-argument
'''
'''
Docstrings for service methods appear as documentation in the wsdl
Docstrings for service methods appear as documentation in the wsdl
<b>what fun</b>
<b>what fun</b>
...
...
bt5/erp5_interfaces/DocumentTemplateItem/portal_components/document.erp5.SOAPBinding.xml
0 → 100644
View file @
a2b4c035
<?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>
SOAPBinding
</string>
</value>
</item>
<item>
<key>
<string>
default_source_reference
</string>
</key>
<value>
<string>
Products.ERP5.Document.SOAPBinding
</string>
</value>
</item>
<item>
<key>
<string>
description
</string>
</key>
<value>
<none/>
</value>
</item>
<item>
<key>
<string>
id
</string>
</key>
<value>
<string>
document.erp5.SOAPBinding
</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>
bt5/erp5_interfaces/TestTemplateItem/portal_components/test.erp5.testSOAPBinding.py
View file @
a2b4c035
...
@@ -29,7 +29,7 @@
...
@@ -29,7 +29,7 @@
import
unittest
import
unittest
import
SOAPpy
import
SOAPpy
from
Products.ERP5Type.tests.ERP5TypeTestCase
import
ERP5TypeTestCase
from
Products.ERP5Type.tests.ERP5TypeTestCase
import
ERP5TypeTestCase
from
Products.ERP5.D
ocument.SOAPBinding
import
SOAPBinding
from
erp5.component.d
ocument.SOAPBinding
import
SOAPBinding
from
spyne.service
import
ServiceBase
from
spyne.service
import
ServiceBase
from
spyne.decorator
import
srpc
from
spyne.decorator
import
srpc
from
spyne.model.complex
import
Iterable
from
spyne.model.complex
import
Iterable
...
...
product/ERP5/Tool/
InterfaceTool.py
→
bt5/erp5_interfaces/ToolComponentTemplateItem/portal_components/tool.erp5.
InterfaceTool.py
View file @
a2b4c035
...
@@ -30,12 +30,11 @@ from Products.ERP5Type.Globals import InitializeClass
...
@@ -30,12 +30,11 @@ from Products.ERP5Type.Globals import InitializeClass
from
Products.ERP5Type.Tool.BaseTool
import
BaseTool
from
Products.ERP5Type.Tool.BaseTool
import
BaseTool
class
InterfaceTool
(
BaseTool
):
class
InterfaceTool
(
BaseTool
):
"""
"""
Placeholder for SOAP Interfaces
Placeholder for SOAP Interfaces
"""
"""
id
=
'portal_interfaces'
meta_type
=
'ERP5 Interface Tool'
portal_type
=
'Interface Tool'
id
=
'portal_interfaces'
InitializeClass
(
InterfaceTool
)
meta_type
=
'ERP5 Interface Tool'
\ No newline at end of file
portal_type
=
'Interface Tool'
InitializeClass
(
InterfaceTool
)
bt5/erp5_interfaces/ToolComponentTemplateItem/portal_components/tool.erp5.InterfaceTool.xml
0 → 100644
View file @
a2b4c035
<?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>
InterfaceTool
</string>
</value>
</item>
<item>
<key>
<string>
default_source_reference
</string>
</key>
<value>
<string>
Products.ERP5.Tool.InterfaceTool
</string>
</value>
</item>
<item>
<key>
<string>
description
</string>
</key>
<value>
<none/>
</value>
</item>
<item>
<key>
<string>
id
</string>
</key>
<value>
<string>
tool.erp5.InterfaceTool
</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>
bt5/erp5_interfaces/bt/template_document_id_list
0 → 100644
View file @
a2b4c035
document.erp5.SOAPBinding
\ No newline at end of file
bt5/erp5_interfaces/bt/template_tool_component_id_list
0 → 100644
View file @
a2b4c035
tool.erp5.InterfaceTool
\ No newline at end of file
product/ERP5/__init__.py
View file @
a2b4c035
...
@@ -46,7 +46,7 @@ from Tool import CategoryTool, IdTool, TemplateTool,\
...
@@ -46,7 +46,7 @@ from Tool import CategoryTool, IdTool, TemplateTool,\
TrashTool
,
ContributionTool
,
NotificationTool
,
PasswordTool
,
\
TrashTool
,
ContributionTool
,
NotificationTool
,
PasswordTool
,
\
GadgetTool
,
ContributionRegistryTool
,
IntrospectionTool
,
\
GadgetTool
,
ContributionRegistryTool
,
IntrospectionTool
,
\
AcknowledgementTool
,
SolverTool
,
\
AcknowledgementTool
,
SolverTool
,
\
UrlRegistryTool
,
InterfaceTool
,
\
UrlRegistryTool
,
\
CertificateAuthorityTool
,
InotifyTool
CertificateAuthorityTool
,
InotifyTool
import
ERP5Site
import
ERP5Site
from
Document
import
PythonScript
,
SQLMethod
from
Document
import
PythonScript
,
SQLMethod
...
@@ -72,7 +72,6 @@ portal_tools = ( CategoryTool.CategoryTool,
...
@@ -72,7 +72,6 @@ portal_tools = ( CategoryTool.CategoryTool,
UrlRegistryTool
.
UrlRegistryTool
,
UrlRegistryTool
.
UrlRegistryTool
,
CertificateAuthorityTool
.
CertificateAuthorityTool
,
CertificateAuthorityTool
.
CertificateAuthorityTool
,
InotifyTool
.
InotifyTool
,
InotifyTool
.
InotifyTool
,
InterfaceTool
.
InterfaceTool
,
)
)
content_classes
=
()
content_classes
=
()
content_constructors
=
()
content_constructors
=
()
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment