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
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Cédric Le Ninivin
erp5
Commits
8758d090
Commit
8758d090
authored
Jan 23, 2019
by
Xiaowu Zhang
Committed by
Cédric Le Ninivin
Apr 14, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ERP5Configurator: add WebServiceConfiguratorItem
parent
7d34917f
Changes
8
Show whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
368 additions
and
0 deletions
+368
-0
bt5/erp5_configurator/ActionTemplateItem/portal_types/Web%20Service%20Configurator%20Item/view.xml
...portal_types/Web%20Service%20Configurator%20Item/view.xml
+79
-0
bt5/erp5_configurator/DocumentTemplateItem/portal_components/document.erp5.WebServiceConfiguratorItem.py
...al_components/document.erp5.WebServiceConfiguratorItem.py
+116
-0
bt5/erp5_configurator/DocumentTemplateItem/portal_components/document.erp5.WebServiceConfiguratorItem.xml
...l_components/document.erp5.WebServiceConfiguratorItem.xml
+109
-0
bt5/erp5_configurator/PortalTypeAllowedContentTypeTemplateItem/allowed_content_types.xml
...eAllowedContentTypeTemplateItem/allowed_content_types.xml
+1
-0
bt5/erp5_configurator/PortalTypeTemplateItem/portal_types/Web%20Service%20Configurator%20Item.xml
...Item/portal_types/Web%20Service%20Configurator%20Item.xml
+60
-0
bt5/erp5_configurator/bt/template_action_path_list
bt5/erp5_configurator/bt/template_action_path_list
+1
-0
bt5/erp5_configurator/bt/template_portal_type_allowed_content_type_list
...gurator/bt/template_portal_type_allowed_content_type_list
+1
-0
bt5/erp5_configurator/bt/template_portal_type_id_list
bt5/erp5_configurator/bt/template_portal_type_id_list
+1
-0
No files found.
bt5/erp5_configurator/ActionTemplateItem/portal_types/Web%20Service%20Configurator%20Item/view.xml
0 → 100644
View file @
8758d090
<?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>
<string></string>
</value>
</item>
<item>
<key>
<string>
description
</string>
</key>
<value>
<string></string>
</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}/ConfiguratorItem_view
</string>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
bt5/erp5_configurator/DocumentTemplateItem/portal_components/document.erp5.WebServiceConfiguratorItem.py
0 → 100644
View file @
8758d090
##############################################################################
#
# Copyright (c) 2006 Nexedi SARL and Contributors. All Rights Reserved.
# Ivan Tyagov <ivan@nexedi.com>
#
# WARNING: This program as such is intended to be used by professional
# programmers who take the whole responsability 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
# garantees 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#
##############################################################################
import
zope.interface
from
AccessControl
import
ClassSecurityInfo
from
Products.ERP5Type
import
Permissions
,
PropertySheet
,
interfaces
from
Products.ERP5Type.XMLObject
import
XMLObject
from
Products.ERP5Type.Message
import
translateString
from
erp5.component.mixin.ConfiguratorItemMixin
import
ConfiguratorItemMixin
from
erp5.component.interface.IConfiguratorItem
import
IConfiguratorItem
class
WebServiceConfiguratorItem
(
ConfiguratorItemMixin
,
XMLObject
):
""" This class install a Organisation."""
meta_type
=
'ERP5 Web Service Configurator'
portal_type
=
'Web Service Configurator Item'
add_permission
=
Permissions
.
AddPortalContent
isPortalContent
=
1
isRADContent
=
1
# Declarative security
security
=
ClassSecurityInfo
()
security
.
declareObjectProtected
(
Permissions
.
AccessContentsInformation
)
# Declarative interfaces
zope
.
interface
.
implements
(
IConfiguratorItem
)
# Declarative properties
property_sheets
=
(
PropertySheet
.
Base
,
PropertySheet
.
XMLObject
,
PropertySheet
.
CategoryCore
,
PropertySheet
.
DublinCore
,
PropertySheet
.
FTPConnectorConfiguration
,
PropertySheet
.
FTPConnector
,
PropertySheet
.
Login
,
PropertySheet
.
Reference
,
PropertySheet
.
Url
)
def
_checkConsistency
(
self
,
fixit
=
False
,
filter
=
None
,
**
kw
):
""" Setup Web Service. """
property_list
=
[
'url_protocol'
,
'url_string'
,
'user_id'
,
'description'
,
'reference'
,
'footer'
,
'destination'
,
'import_filename'
,
'header'
,
'bind_address'
,
'use_temporary_file_on_write'
,
'country_code'
,
'password'
,
'psv'
,
'output_filename'
,
'source'
]
portal
=
self
.
getPortalObject
()
result_list
=
portal
.
portal_catalog
(
portal_type
=
'FTP Connector'
,
reference
=
self
.
getReference
())
if
len
(
result_list
):
web_service
=
result_list
[
0
]
if
not
fixit
:
for
key
in
property_list
:
value
=
web_service
.
getProperty
(
key
)
if
value
is
None
or
value
!=
self
.
getProperty
(
key
):
return
[
self
.
_createConstraintMessage
(
'Web Service %s has wrong value:%s'
%
(
self
.
getReference
(),
key
))]
else
:
if
not
fixit
:
return
[
self
.
_createConstraintMessage
(
'Web Service %s is not created'
%
self
.
getReference
())]
web_service
=
portal
.
portal_web_services
.
newContent
(
portal_type
=
'FTP Connector'
)
if
not
fixit
:
if
web_service
.
getValidationState
()
!=
'validated'
:
return
[
self
.
_createConstraintMessage
(
'Web Service %s is not validated'
%
self
.
getReference
())]
else
:
org_dict
=
{}
for
key
in
property_list
:
org_dict
[
key
]
=
self
.
getProperty
(
key
)
web_service
.
edit
(
**
org_dict
)
if
portal
.
portal_workflow
.
isTransitionPossible
(
web_service
.
getObject
(),
'validate'
):
web_service
.
validate
(
comment
=
translateString
(
"Validated by Configurator"
))
return
[]
bt5/erp5_configurator/DocumentTemplateItem/portal_components/document.erp5.WebServiceConfiguratorItem.xml
0 → 100644
View file @
8758d090
<?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>
WebServiceConfiguratorItem
</string>
</value>
</item>
<item>
<key>
<string>
description
</string>
</key>
<value>
<none/>
</value>
</item>
<item>
<key>
<string>
id
</string>
</key>
<value>
<string>
document.erp5.WebServiceConfiguratorItem
</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>
<string>
W: 64, 43: Redefining built-in \'filter\' (redefined-builtin)
</string>
<string>
W: 31, 0: Unused interfaces imported from Products.ERP5Type (unused-import)
</string>
</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_configurator/PortalTypeAllowedContentTypeTemplateItem/allowed_content_types.xml
View file @
8758d090
...
@@ -44,6 +44,7 @@
...
@@ -44,6 +44,7 @@
<item>
Solver Configurator Item
</item>
<item>
Solver Configurator Item
</item>
<item>
Standard BT5 Configurator Item
</item>
<item>
Standard BT5 Configurator Item
</item>
<item>
System Preference Configurator Item
</item>
<item>
System Preference Configurator Item
</item>
<item>
Web Service Configurator Item
</item>
<item>
Workflow Security Configurator Item
</item>
<item>
Workflow Security Configurator Item
</item>
</portal_type>
</portal_type>
<portal_type
id=
"Organisation Configurator Item"
>
<portal_type
id=
"Organisation Configurator Item"
>
...
...
bt5/erp5_configurator/PortalTypeTemplateItem/portal_types/Web%20Service%20Configurator%20Item.xml
0 → 100644
View file @
8758d090
<?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>
content_icon
</string>
</key>
<value>
<string>
document.gif
</string>
</value>
</item>
<item>
<key>
<string>
content_meta_type
</string>
</key>
<value>
<string>
ERP5 Account Configurator Item
</string>
</value>
</item>
<item>
<key>
<string>
description
</string>
</key>
<value>
<string>
Setup an Accounting Account.
</string>
</value>
</item>
<item>
<key>
<string>
factory
</string>
</key>
<value>
<string>
addAccountConfiguratorItem
</string>
</value>
</item>
<item>
<key>
<string>
id
</string>
</key>
<value>
<string>
Web Service Configurator Item
</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>
type_class
</string>
</key>
<value>
<string>
WebServiceConfiguratorItem
</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>
</ZopeData>
bt5/erp5_configurator/bt/template_action_path_list
View file @
8758d090
...
@@ -27,6 +27,7 @@ Site Property Configurator Item | view
...
@@ -27,6 +27,7 @@ Site Property Configurator Item | view
Solver Configurator Item | view
Solver Configurator Item | view
Standard BT5 Configurator Item | view
Standard BT5 Configurator Item | view
System Preference Configurator Item | view
System Preference Configurator Item | view
Web Service Configurator Item | view
Workflow Security Configurator Item | view
Workflow Security Configurator Item | view
Workflow | configurator_settings
Workflow | configurator_settings
Workflow | launch_configuration
Workflow | launch_configuration
...
...
bt5/erp5_configurator/bt/template_portal_type_allowed_content_type_list
View file @
8758d090
...
@@ -34,6 +34,7 @@ Configuration Save | Site Property Configurator Item
...
@@ -34,6 +34,7 @@ Configuration Save | Site Property Configurator Item
Configuration Save | Solver Configurator Item
Configuration Save | Solver Configurator Item
Configuration Save | Standard BT5 Configurator Item
Configuration Save | Standard BT5 Configurator Item
Configuration Save | System Preference Configurator Item
Configuration Save | System Preference Configurator Item
Configuration Save | Web Service Configurator Item
Configuration Save | Workflow Security Configurator Item
Configuration Save | Workflow Security Configurator Item
Organisation Configurator Item | Address
Organisation Configurator Item | Address
Organisation Configurator Item | Email
Organisation Configurator Item | Email
...
...
bt5/erp5_configurator/bt/template_portal_type_id_list
View file @
8758d090
...
@@ -30,4 +30,5 @@ Site Property Configurator Item
...
@@ -30,4 +30,5 @@ Site Property Configurator Item
Solver Configurator Item
Solver Configurator Item
Standard BT5 Configurator Item
Standard BT5 Configurator Item
System Preference Configurator Item
System Preference Configurator Item
Web Service Configurator Item
Workflow Security Configurator Item
Workflow Security Configurator Item
\ No newline at end of file
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