Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
W
wendelin
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
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Klaus Wölfel
wendelin
Commits
f11959a4
Commit
f11959a4
authored
May 17, 2018
by
Klaus Wölfel
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Data Bucket Stream: Deprecate old api methods
parent
83b5ec6c
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
21 additions
and
0 deletions
+21
-0
bt5/erp5_wendelin/DocumentTemplateItem/portal_components/document.erp5.DataBucketStream.py
...eItem/portal_components/document.erp5.DataBucketStream.py
+21
-0
No files found.
bt5/erp5_wendelin/DocumentTemplateItem/portal_components/document.erp5.DataBucketStream.py
View file @
f11959a4
...
@@ -33,6 +33,7 @@ from AccessControl import ClassSecurityInfo
...
@@ -33,6 +33,7 @@ from AccessControl import ClassSecurityInfo
from
Products.ERP5.Document.Document
import
Document
from
Products.ERP5.Document.Document
import
Document
from
Products.ERP5Type
import
Permissions
,
PropertySheet
from
Products.ERP5Type
import
Permissions
,
PropertySheet
from
Products.ERP5Type.BTreeData
import
PersistentString
from
Products.ERP5Type.BTreeData
import
PersistentString
from
Products.ERP5Type.Log
import
log
class
IndexSequence
:
class
IndexSequence
:
"""
"""
...
@@ -180,6 +181,7 @@ class DataBucketStream(Document):
...
@@ -180,6 +181,7 @@ class DataBucketStream(Document):
def
_getOb
(
self
,
id
,
*
args
,
**
kw
):
def
_getOb
(
self
,
id
,
*
args
,
**
kw
):
return
None
return
None
def
getBucketByKey
(
self
,
key
=
None
):
def
getBucketByKey
(
self
,
key
=
None
):
"""
"""
...
@@ -193,6 +195,10 @@ class DataBucketStream(Document):
...
@@ -193,6 +195,10 @@ class DataBucketStream(Document):
"""
"""
key
=
self
.
_long_index_tree
[
index
]
key
=
self
.
_long_index_tree
[
index
]
return
self
.
getBucketByKey
(
key
).
value
return
self
.
getBucketByKey
(
key
).
value
def
getBucket
(
self
,
key
):
log
(
'DeprecationWarning: Please use getBucketByKey'
)
return
self
.
getBucketByKey
(
key
)
def
hasBucketKey
(
self
,
key
):
def
hasBucketKey
(
self
,
key
):
"""
"""
...
@@ -250,6 +256,10 @@ class DataBucketStream(Document):
...
@@ -250,6 +256,10 @@ class DataBucketStream(Document):
return
sequence
return
sequence
return
sequence
[:
count
]
return
sequence
[:
count
]
def
getBucketKeySequence
(
self
,
start_key
=
None
,
count
=
None
):
log
(
'DeprecationWarning: Please use getBucketKeySequenceByKey'
)
return
self
.
getBucketKeySequenceByKey
(
start_key
=
start_key
,
count
=
count
)
def
getBucketIndexKeySequenceByIndex
(
self
,
start_index
=
None
,
stop_index
=
None
,
def
getBucketIndexKeySequenceByIndex
(
self
,
start_index
=
None
,
stop_index
=
None
,
count
=
None
,
exclude_start_index
=
False
,
exclude_stop_index
=
False
):
count
=
None
,
exclude_start_index
=
False
,
exclude_stop_index
=
False
):
"""
"""
...
@@ -297,6 +307,10 @@ class DataBucketStream(Document):
...
@@ -297,6 +307,10 @@ class DataBucketStream(Document):
if
count
is
not
None
:
if
count
is
not
None
:
sequence
=
sequence
[:
count
]
sequence
=
sequence
[:
count
]
return
IndexValueSequence
(
self
,
sequence
)
return
IndexValueSequence
(
self
,
sequence
)
def
getBucketValueSequence
(
self
,
start_key
=
None
,
count
=
None
):
log
(
'DeprecationWarning: Please use getBucketValueSequenceByKey'
)
return
self
.
getBucketValueSequenceByKey
(
start_key
=
start_key
,
count
=
count
)
def
getBucketKeyItemSequenceByKey
(
self
,
start_key
=
None
,
stop_key
=
None
,
def
getBucketKeyItemSequenceByKey
(
self
,
start_key
=
None
,
stop_key
=
None
,
count
=
None
,
exclude_start_key
=
False
,
exclude_stop_key
=
False
):
count
=
None
,
exclude_start_key
=
False
,
exclude_stop_key
=
False
):
...
@@ -309,6 +323,12 @@ class DataBucketStream(Document):
...
@@ -309,6 +323,12 @@ class DataBucketStream(Document):
if
count
is
None
:
if
count
is
None
:
return
sequence
return
sequence
return
sequence
[:
count
]
return
sequence
[:
count
]
def
getBucketItemSequence
(
self
,
start_key
=
None
,
count
=
None
,
exclude_start_key
=
False
):
log
(
'DeprecationWarning: Please use getBucketKeyItemSequenceByKey'
)
return
self
.
getBucketKeyItemSequenceByKey
(
start_key
=
start_key
,
count
=
count
,
exclude_start_key
=
exclude_start_key
)
def
getBucketIndexItemSequenceByIndex
(
self
,
start_index
=
None
,
stop_index
=
None
,
def
getBucketIndexItemSequenceByIndex
(
self
,
start_index
=
None
,
stop_index
=
None
,
count
=
None
,
exclude_start_index
=
False
,
exclude_stop_index
=
False
):
count
=
None
,
exclude_start_index
=
False
,
exclude_stop_index
=
False
):
...
@@ -392,3 +412,4 @@ class DataBucketStream(Document):
...
@@ -392,3 +412,4 @@ class DataBucketStream(Document):
self
.
initIndexTree
()
self
.
initIndexTree
()
for
count
,
key
in
enumerate
(
self
.
getBucketKeySequenceByKey
()):
for
count
,
key
in
enumerate
(
self
.
getBucketKeySequenceByKey
()):
self
.
_long_index_tree
.
insert
(
count
,
key
)
self
.
_long_index_tree
.
insert
(
count
,
key
)
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