File contents
--- lib/python/Products/PluginIndexes/PathIndex/PathIndex.py.orig 2006-02-16 13:09:09.000000000 +0800
+++ lib/python/Products/PluginIndexes/PathIndex/PathIndex.py 2006-02-16 13:18:10.000000000 +0800
@@ -31,6 +31,7 @@
from Products.PluginIndexes.common.util import parseIndexRequest
from Products.PluginIndexes.interfaces import IPathIndex
from Products.PluginIndexes.interfaces import IUniqueValueIndex
+from Products.PluginIndexes.interfaces import ISortIndex
_marker = []
LOG = getLogger('Zope.PathIndex')
@@ -52,8 +53,9 @@
'all docids with this path component on this level'
"""
- __implements__ = (PluggableIndex.UniqueValueIndex,)
- implements(IPathIndex, IUniqueValueIndex)
+ __implements__ = (PluggableIndex.UniqueValueIndex,
+ PluggableIndex.SortIndex)
+ implements(IPathIndex, IUniqueValueIndex, ISortIndex)
meta_type="PathIndex"
@@ -266,6 +268,13 @@
except KeyError:
# XXX Why is default ignored?
return None
+
+ def keyForDocument(self, id):
+ # This method is superceded by documentToKeyMap
+ return self._unindex[id]
+
+ def documentToKeyMap(self):
+ return self._unindex
index_html = DTMLFile('dtml/index', globals())
manage_workspace = DTMLFile('dtml/managePathIndex', globals())