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
0
Merge Requests
0
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
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Titouan Soulard
erp5
Commits
cebd828c
Commit
cebd828c
authored
Jan 09, 2023
by
Cédric Le Ninivin
Committed by
Titouan Soulard
Nov 15, 2024
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
erp5_api_style: WIP Continue Work on jIO API Revision
parent
de5b6ca5
Changes
15
Show whitespace changes
Inline
Side-by-side
Showing
15 changed files
with
684 additions
and
93 deletions
+684
-93
bt5/erp5_api_style/MixinTemplateItem/portal_components/mixin.erp5.JIOAPIRevisionMixin.py
...eItem/portal_components/mixin.erp5.JIOAPIRevisionMixin.py
+115
-0
bt5/erp5_api_style/MixinTemplateItem/portal_components/mixin.erp5.JIOAPIRevisionMixin.xml
...Item/portal_components/mixin.erp5.JIOAPIRevisionMixin.xml
+133
-0
bt5/erp5_api_style/PathTemplateItem/portal_alarms/update_jio_api_revision_template.xml
...teItem/portal_alarms/update_jio_api_revision_template.xml
+206
-0
bt5/erp5_api_style/PropertySheetTemplateItem/portal_property_sheets/JIOAPIRevisionConstraint.xml
...eItem/portal_property_sheets/JIOAPIRevisionConstraint.xml
+66
-0
bt5/erp5_api_style/PropertySheetTemplateItem/portal_property_sheets/JIOAPIRevisionConstraint/jio_api_revision_constraint.xml
.../JIOAPIRevisionConstraint/jio_api_revision_constraint.xml
+80
-0
bt5/erp5_api_style/SkinTemplateItem/portal_skins/erp5_api_jio_sql_revision/Alarm_activateUpdateJIOAPIRevision.py
...pi_jio_sql_revision/Alarm_activateUpdateJIOAPIRevision.py
+25
-0
bt5/erp5_api_style/SkinTemplateItem/portal_skins/erp5_api_jio_sql_revision/Alarm_activateUpdateJIOAPIRevision.xml
...i_jio_sql_revision/Alarm_activateUpdateJIOAPIRevision.xml
+2
-2
bt5/erp5_api_style/SkinTemplateItem/portal_skins/erp5_api_jio_sql_revision/Base_getjIOAPIRevision.py
...skins/erp5_api_jio_sql_revision/Base_getjIOAPIRevision.py
+0
-4
bt5/erp5_api_style/SkinTemplateItem/portal_skins/erp5_api_jio_sql_revision/Base_updatejIOAPIRevision.py
...ns/erp5_api_jio_sql_revision/Base_updatejIOAPIRevision.py
+0
-25
bt5/erp5_api_style/SkinTemplateItem/portal_skins/erp5_api_jio_sql_revision/Base_updatejIOAPIRevision.xml
...s/erp5_api_jio_sql_revision/Base_updatejIOAPIRevision.xml
+0
-62
bt5/erp5_api_style/SkinTemplateItem/portal_skins/erp5_api_jio_sql_revision/Base_zCheckjIOAPIRevisionTableExists.sql
...jio_sql_revision/Base_zCheckjIOAPIRevisionTableExists.sql
+1
-0
bt5/erp5_api_style/SkinTemplateItem/portal_skins/erp5_api_jio_sql_revision/Base_zCheckjIOAPIRevisionTableExists.xml
...jio_sql_revision/Base_zCheckjIOAPIRevisionTableExists.xml
+53
-0
bt5/erp5_api_style/bt/template_mixin_id_list
bt5/erp5_api_style/bt/template_mixin_id_list
+1
-0
bt5/erp5_api_style/bt/template_path_list
bt5/erp5_api_style/bt/template_path_list
+1
-0
bt5/erp5_api_style/bt/template_property_sheet_id_list
bt5/erp5_api_style/bt/template_property_sheet_id_list
+1
-0
No files found.
bt5/erp5_api_style/MixinTemplateItem/portal_components/mixin.erp5.JIOAPIRevisionMixin.py
0 → 100644
View file @
cebd828c
# -*- coding: utf-8 -*-
##############################################################################
#
# Copyright (c) 2005-2010 Nexedi SA and Contributors. All Rights Reserved.
# Romain Courteaud <romain@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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#
##############################################################################
from
AccessControl
import
ClassSecurityInfo
from
MySQLdb
import
ProgrammingError
from
Products.ERP5Type
import
Permissions
class
JIOAPIRevisionMixin
:
security
=
ClassSecurityInfo
()
security
.
declareProtected
(
Permissions
.
AccessContentsInformation
,
'getJIOAPIRevision'
)
def
getJIOAPIRevision
(
self
):
"""
Return Object Revision
"""
return
self
.
_getJIOAPIRevisionTuple
()[
0
]
def
_unindexJIOAPIRevision
(
self
):
try
:
self
.
Base_zUnindexFromjIOAPIRevisionTable
(
uid
=
self
.
getUid
())
except
ProgrammingError
:
# jio_api_revision table is not created
pass
def
_getJIOAPIRevisionTuple
(
self
):
try
:
result
=
self
.
Base_zGetFromIOAPIRevisionTable
(
uid
=
self
.
getUid
())
except
ProgrammingError
:
# jio_api_revision table is not created
return
None
,
None
if
result
:
return
result
[
0
].
revision
,
result
[
0
].
hash
return
None
,
None
def
_calculateHash
(
self
):
hash_method
=
self
.
getTypeBasedMethod
(
"calculatejIOAPIRevisionHash"
)
if
not
hash_method
:
return
None
return
hash_method
()
security
.
declareProtected
(
Permissions
.
ManagePortal
,
'updateJIOAPIRevision'
)
def
updateJIOAPIRevision
(
self
):
"""
Update jIO API Revision
"""
calculated_hash
=
self
.
_calculateHash
()
if
not
calculated_hash
:
self
.
_unindexJIOAPIRevision
()
return
stored_hash
=
None
_
,
stored_hash
=
self
.
_getJIOAPIRevisionTuple
()
if
stored_hash
==
calculated_hash
:
return
new_revision
=
self
.
Base_getNewjIOAPIRevision
()
try
:
self
.
Base_zUpdatejIOAPIRevisionTable
(
uid
=
self
.
getUid
(),
revision
=
new_revision
,
hash
=
calculated_hash
,
)
except
ProgrammingError
:
# jio_api_revision table is not created
pass
return
security
.
declareProtected
(
Permissions
.
AccessContentsInformation
,
'checkJIOAPIRevisionConstraint'
)
def
checkJIOAPIRevisionConstraint
(
self
,
**
kw
):
"""
Check is calculated Hash equals to the stored one
Fixing is not offered as it needs to be centralised to avoid missing a new revision for an object
"""
calculated_hash
=
self
.
_calculateHash
()
_
,
stored_hash
=
self
.
_getJIOAPIRevisionTuple
()
if
calculated_hash
!=
stored_hash
:
return
[
self
.
Base_translateString
(
"Stored Hash ${stored_hash} difer from calculated hash ${calculated_hash}"
,
mapping
=
{
"stored_hash"
:
stored_hash
,
"calculated_hash"
:
calculated_hash
,
}
),]
return
[]
bt5/erp5_api_style/MixinTemplateItem/portal_components/mixin.erp5.JIOAPIRevisionMixin.xml
0 → 100644
View file @
cebd828c
<?xml version="1.0"?>
<ZopeData>
<record
id=
"1"
aka=
"AAAAAAAAAAE="
>
<pickle>
<global
name=
"Mixin Component"
module=
"erp5.portal_type"
/>
</pickle>
<pickle>
<dictionary>
<item>
<key>
<string>
_recorded_property_dict
</string>
</key>
<value>
<persistent>
<string
encoding=
"base64"
>
AAAAAAAAAAI=
</string>
</persistent>
</value>
</item>
<item>
<key>
<string>
default_reference
</string>
</key>
<value>
<string>
JIOAPIRevisionMixin
</string>
</value>
</item>
<item>
<key>
<string>
default_source_reference
</string>
</key>
<value>
<none/>
</value>
</item>
<item>
<key>
<string>
description
</string>
</key>
<value>
<none/>
</value>
</item>
<item>
<key>
<string>
id
</string>
</key>
<value>
<string>
mixin.erp5.JIOAPIRevisionMixin
</string>
</value>
</item>
<item>
<key>
<string>
portal_type
</string>
</key>
<value>
<string>
Mixin 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"
>
AAAAAAAAAAM=
</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/>
</value>
</item>
</dictionary>
</pickle>
</record>
<record
id=
"3"
aka=
"AAAAAAAAAAM="
>
<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"
>
AAAAAAAAAAQ=
</string>
</persistent>
</value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</pickle>
</record>
<record
id=
"4"
aka=
"AAAAAAAAAAQ="
>
<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_api_style/PathTemplateItem/portal_alarms/update_jio_api_revision_template.xml
0 → 100644
View file @
cebd828c
<?xml version="1.0"?>
<ZopeData>
<record
id=
"1"
aka=
"AAAAAAAAAAE="
>
<pickle>
<global
name=
"Alarm"
module=
"erp5.portal_type"
/>
</pickle>
<pickle>
<dictionary>
<item>
<key>
<string>
_local_properties
</string>
</key>
<value>
<tuple>
<dictionary>
<item>
<key>
<string>
id
</string>
</key>
<value>
<string>
configuration_form_id
</string>
</value>
</item>
<item>
<key>
<string>
type
</string>
</key>
<value>
<string>
string
</string>
</value>
</item>
</dictionary>
<dictionary>
<item>
<key>
<string>
id
</string>
</key>
<value>
<string>
catalog_query_string
</string>
</value>
</item>
<item>
<key>
<string>
type
</string>
</key>
<value>
<string>
string
</string>
</value>
</item>
</dictionary>
<dictionary>
<item>
<key>
<string>
id
</string>
</key>
<value>
<string>
module_list
</string>
</value>
</item>
<item>
<key>
<string>
type
</string>
</key>
<value>
<string>
lines
</string>
</value>
</item>
</dictionary>
<dictionary>
<item>
<key>
<string>
id
</string>
</key>
<value>
<string>
incremental_check
</string>
</value>
</item>
<item>
<key>
<string>
type
</string>
</key>
<value>
<string>
int
</string>
</value>
</item>
</dictionary>
</tuple>
</value>
</item>
<item>
<key>
<string>
active_sense_method_id
</string>
</key>
<value>
<string>
Alarm_activateUpdateJIOAPIRevision
</string>
</value>
</item>
<item>
<key>
<string>
automatic_solve
</string>
</key>
<value>
<int>
0
</int>
</value>
</item>
<item>
<key>
<string>
catalog_query_string
</string>
</key>
<value>
<string>
validation_state:!=deleted
</string>
</value>
</item>
<item>
<key>
<string>
categories
</string>
</key>
<value>
<tuple/>
</value>
</item>
<item>
<key>
<string>
configuration_form_id
</string>
</key>
<value>
<string>
Alarm_viewConsistencyCheckConfiguration
</string>
</value>
</item>
<item>
<key>
<string>
description
</string>
</key>
<value>
<string>
Clone this alarm for you projects and configure it through the Configuration Tab
</string>
</value>
</item>
<item>
<key>
<string>
enabled
</string>
</key>
<value>
<int>
0
</int>
</value>
</item>
<item>
<key>
<string>
id
</string>
</key>
<value>
<string>
update_jio_api_revision_template
</string>
</value>
</item>
<item>
<key>
<string>
incremental_check
</string>
</key>
<value>
<int>
1
</int>
</value>
</item>
<item>
<key>
<string>
module_list
</string>
</key>
<value>
<tuple/>
</value>
</item>
<item>
<key>
<string>
periodicity_day_frequency
</string>
</key>
<value>
<none/>
</value>
</item>
<item>
<key>
<string>
periodicity_hour
</string>
</key>
<value>
<tuple>
<int>
0
</int>
</tuple>
</value>
</item>
<item>
<key>
<string>
periodicity_hour_frequency
</string>
</key>
<value>
<none/>
</value>
</item>
<item>
<key>
<string>
periodicity_minute
</string>
</key>
<value>
<tuple>
<int>
0
</int>
</tuple>
</value>
</item>
<item>
<key>
<string>
periodicity_minute_frequency
</string>
</key>
<value>
<int>
1
</int>
</value>
</item>
<item>
<key>
<string>
periodicity_month
</string>
</key>
<value>
<tuple/>
</value>
</item>
<item>
<key>
<string>
periodicity_month_day
</string>
</key>
<value>
<tuple/>
</value>
</item>
<item>
<key>
<string>
periodicity_start_date
</string>
</key>
<value>
<object>
<klass>
<global
name=
"DateTime"
module=
"DateTime.DateTime"
/>
</klass>
<tuple>
<none/>
</tuple>
<state>
<tuple>
<float>
1230768000.0
</float>
<string>
GMT
</string>
</tuple>
</state>
</object>
</value>
</item>
<item>
<key>
<string>
periodicity_week
</string>
</key>
<value>
<tuple/>
</value>
</item>
<item>
<key>
<string>
periodicity_week_day
</string>
</key>
<value>
<tuple>
<string>
Sunday
</string>
</tuple>
</value>
</item>
<item>
<key>
<string>
periodicity_week_frequency
</string>
</key>
<value>
<none/>
</value>
</item>
<item>
<key>
<string>
portal_type
</string>
</key>
<value>
<string>
Alarm
</string>
</value>
</item>
<item>
<key>
<string>
report_method_id
</string>
</key>
<value>
<none/>
</value>
</item>
<item>
<key>
<string>
solve_method_id
</string>
</key>
<value>
<none/>
</value>
</item>
<item>
<key>
<string>
title
</string>
</key>
<value>
<string>
Update JIO API Revision Template
</string>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
bt5/erp5_api_style/PropertySheetTemplateItem/portal_property_sheets/JIOAPIRevisionConstraint.xml
0 → 100644
View file @
cebd828c
<?xml version="1.0"?>
<ZopeData>
<record
id=
"1"
aka=
"AAAAAAAAAAE="
>
<pickle>
<global
name=
"Property Sheet"
module=
"erp5.portal_type"
/>
</pickle>
<pickle>
<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>
description
</string>
</key>
<value>
<none/>
</value>
</item>
<item>
<key>
<string>
id
</string>
</key>
<value>
<string>
JIOAPIRevisionConstraint
</string>
</value>
</item>
<item>
<key>
<string>
portal_type
</string>
</key>
<value>
<string>
Property Sheet
</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>
<none/>
</pickle>
</record>
<record
id=
"4"
aka=
"AAAAAAAAAAQ="
>
<pickle>
<global
name=
"OOBTree"
module=
"BTrees.OOBTree"
/>
</pickle>
<pickle>
<none/>
</pickle>
</record>
</ZopeData>
bt5/erp5_api_style/PropertySheetTemplateItem/portal_property_sheets/JIOAPIRevisionConstraint/jio_api_revision_constraint.xml
0 → 100644
View file @
cebd828c
<?xml version="1.0"?>
<ZopeData>
<record
id=
"1"
aka=
"AAAAAAAAAAE="
>
<pickle>
<global
name=
"Script Constraint"
module=
"erp5.portal_type"
/>
</pickle>
<pickle>
<dictionary>
<item>
<key>
<string>
_identity_criterion
</string>
</key>
<value>
<persistent>
<string
encoding=
"base64"
>
AAAAAAAAAAI=
</string>
</persistent>
</value>
</item>
<item>
<key>
<string>
_range_criterion
</string>
</key>
<value>
<persistent>
<string
encoding=
"base64"
>
AAAAAAAAAAM=
</string>
</persistent>
</value>
</item>
<item>
<key>
<string>
categories
</string>
</key>
<value>
<tuple>
<string>
constraint_type/audit
</string>
</tuple>
</value>
</item>
<item>
<key>
<string>
description
</string>
</key>
<value>
<none/>
</value>
</item>
<item>
<key>
<string>
id
</string>
</key>
<value>
<string>
jio_api_revision_constraint
</string>
</value>
</item>
<item>
<key>
<string>
portal_type
</string>
</key>
<value>
<string>
Script Constraint
</string>
</value>
</item>
<item>
<key>
<string>
script_id
</string>
</key>
<value>
<string>
checkJIOAPIRevisionConstraint
</string>
</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/>
</value>
</item>
</dictionary>
</pickle>
</record>
<record
id=
"3"
aka=
"AAAAAAAAAAM="
>
<pickle>
<global
name=
"PersistentMapping"
module=
"Persistence.mapping"
/>
</pickle>
<pickle>
<dictionary>
<item>
<key>
<string>
data
</string>
</key>
<value>
<dictionary/>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
bt5/erp5_api_style/SkinTemplateItem/portal_skins/erp5_api_jio_sql_revision/Alarm_activateUpdateJIOAPIRevision.py
0 → 100644
View file @
cebd828c
kw
=
{}
if
not
context
.
Base_zCheckjIOAPIRevisionTableExists
():
context
.
Base_zCreatejIOAPIRevisionTable
()
if
context
.
getProperty
(
'incremental_check'
):
last_active_process
=
context
.
getLastActiveProcess
()
if
last_active_process
is
not
None
:
kw
[
'indexation_timestamp'
]
=
'>= %s'
%
last_active_process
.
getStartDate
().
ISO
()
active_process
=
context
.
newActiveProcess
().
getRelativeUrl
()
query_string
=
context
.
getProperty
(
'catalog_query_string'
,
''
)
# the query sould be something like "validation_state:!=deleted validation_state:!=draft portal_type:Organisation" etc
portal
=
context
.
getPortalObject
()
if
query_string
is
not
None
:
kw
.
update
(
SearchableText
=
query_string
)
kw
.
update
(
parent_uid
=
[
portal
.
restrictedTraverse
(
module
).
getUid
()
for
module
in
context
.
getProperty
(
'module_list'
)
or
[]])
object_list
=
portal
.
portal_catalog
(
**
kw
)
for
element
in
object_list
:
element
.
getObject
().
updateJIOAPIRevision
()
context
.
activate
(
after_tag
=
tag
).
getId
()
bt5/erp5_api_style/SkinTemplateItem/portal_skins/erp5_api_jio_sql_revision/
Base_getj
IOAPIRevision.xml
→
bt5/erp5_api_style/SkinTemplateItem/portal_skins/erp5_api_jio_sql_revision/
Alarm_activateUpdateJ
IOAPIRevision.xml
View file @
cebd828c
...
@@ -50,11 +50,11 @@
...
@@ -50,11 +50,11 @@
</item>
</item>
<item>
<item>
<key>
<string>
_params
</string>
</key>
<key>
<string>
_params
</string>
</key>
<value>
<string></string>
</value>
<value>
<string>
tag, fixit=False, **kw
</string>
</value>
</item>
</item>
<item>
<item>
<key>
<string>
id
</string>
</key>
<key>
<string>
id
</string>
</key>
<value>
<string>
Base_getj
IOAPIRevision
</string>
</value>
<value>
<string>
Alarm_activateUpdateJ
IOAPIRevision
</string>
</value>
</item>
</item>
</dictionary>
</dictionary>
</pickle>
</pickle>
...
...
bt5/erp5_api_style/SkinTemplateItem/portal_skins/erp5_api_jio_sql_revision/Base_getjIOAPIRevision.py
deleted
100644 → 0
View file @
de5b6ca5
result
=
context
.
Base_zGetFromIOAPIRevisionTable
(
uid
=
context
.
getUid
())
if
result
:
return
result
[
0
].
revision
return
None
bt5/erp5_api_style/SkinTemplateItem/portal_skins/erp5_api_jio_sql_revision/Base_updatejIOAPIRevision.py
deleted
100644 → 0
View file @
de5b6ca5
hash_method
=
context
.
getTypeBasedMethod
(
"getjIOAPIRevisionHash"
)
uid
=
context
.
getUid
()
if
not
hash_method
:
context
.
Base_zUnindexFromjIOAPIRevisionTable
(
uid
=
uid
)
return
current_hash
=
hash_method
()
if
not
current_hash
:
context
.
Base_zUnindexFromjIOAPIRevisionTable
(
uid
=
uid
)
return
stored_hash
=
None
stored_data
=
context
.
Base_zGetFromIOAPIRevisionTable
(
uid
=
uid
)
if
stored_data
:
stored_hash
=
stored_data
[
0
].
hash
if
stored_hash
==
current_hash
:
return
revision
=
context
.
Base_getNewjIOAPIRevision
()
context
.
Base_zUpdatejIOAPIRevisionTable
(
uid
=
uid
,
revision
=
revision
,
hash
=
current_hash
,
)
return
bt5/erp5_api_style/SkinTemplateItem/portal_skins/erp5_api_jio_sql_revision/Base_updatejIOAPIRevision.xml
deleted
100644 → 0
View file @
de5b6ca5
<?xml version="1.0"?>
<ZopeData>
<record
id=
"1"
aka=
"AAAAAAAAAAE="
>
<pickle>
<global
name=
"PythonScript"
module=
"Products.PythonScripts.PythonScript"
/>
</pickle>
<pickle>
<dictionary>
<item>
<key>
<string>
Script_magic
</string>
</key>
<value>
<int>
3
</int>
</value>
</item>
<item>
<key>
<string>
_bind_names
</string>
</key>
<value>
<object>
<klass>
<global
name=
"NameAssignments"
module=
"Shared.DC.Scripts.Bindings"
/>
</klass>
<tuple/>
<state>
<dictionary>
<item>
<key>
<string>
_asgns
</string>
</key>
<value>
<dictionary>
<item>
<key>
<string>
name_container
</string>
</key>
<value>
<string>
container
</string>
</value>
</item>
<item>
<key>
<string>
name_context
</string>
</key>
<value>
<string>
context
</string>
</value>
</item>
<item>
<key>
<string>
name_m_self
</string>
</key>
<value>
<string>
script
</string>
</value>
</item>
<item>
<key>
<string>
name_subpath
</string>
</key>
<value>
<string>
traverse_subpath
</string>
</value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</state>
</object>
</value>
</item>
<item>
<key>
<string>
_params
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
id
</string>
</key>
<value>
<string>
Base_updatejIOAPIRevision
</string>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
bt5/erp5_api_style/SkinTemplateItem/portal_skins/erp5_api_jio_sql_revision/Base_zCheckjIOAPIRevisionTableExists.sql
0 → 100644
View file @
cebd828c
SELECT
1
FROM
INFORMATION_SCHEMA
.
TABLES
WHERE
TABLE_TYPE
=
'BASE TABLE'
AND
TABLE_NAME
=
'jio_api_revision'
\ No newline at end of file
bt5/erp5_api_style/SkinTemplateItem/portal_skins/erp5_api_jio_sql_revision/Base_zCheckjIOAPIRevisionTableExists.xml
0 → 100644
View file @
cebd828c
<?xml version="1.0"?>
<ZopeData>
<record
id=
"1"
aka=
"AAAAAAAAAAE="
>
<pickle>
<global
name=
"SQL"
module=
"Products.ZSQLMethods.SQL"
/>
</pickle>
<pickle>
<dictionary>
<item>
<key>
<string>
_col
</string>
</key>
<value>
<list>
<dictionary>
<item>
<key>
<string>
name
</string>
</key>
<value>
<string>
1
</string>
</value>
</item>
<item>
<key>
<string>
null
</string>
</key>
<value>
<int>
0
</int>
</value>
</item>
<item>
<key>
<string>
type
</string>
</key>
<value>
<string>
i
</string>
</value>
</item>
<item>
<key>
<string>
width
</string>
</key>
<value>
<int>
0
</int>
</value>
</item>
</dictionary>
</list>
</value>
</item>
<item>
<key>
<string>
arguments_src
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
connection_id
</string>
</key>
<value>
<string>
erp5_sql_connection
</string>
</value>
</item>
<item>
<key>
<string>
id
</string>
</key>
<value>
<string>
Base_zCheckjIOAPIRevisionTableExists
</string>
</value>
</item>
<item>
<key>
<string>
title
</string>
</key>
<value>
<string></string>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
bt5/erp5_api_style/bt/template_mixin_id_list
0 → 100644
View file @
cebd828c
mixin.erp5.JIOAPIRevisionMixin
\ No newline at end of file
bt5/erp5_api_style/bt/template_path_list
View file @
cebd828c
portal_alarms/update_jio_api_revision_template
portal_callables/Base_asJSONTextFromJSON
portal_callables/Base_asJSONTextFromJSON
web_page_module/api-style_alldocs-response-schema.json
web_page_module/api-style_alldocs-response-schema.json
web_page_module/djv_js
web_page_module/djv_js
...
...
bt5/erp5_api_style/bt/template_property_sheet_id_list
0 → 100644
View file @
cebd828c
JIOAPIRevisionConstraint
\ 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