[Zope-Checkins] CVS: Zope/lib/python/Products/PluginIndexes/common - PluggableIndex.py:1.4
Andreas Jung
andreas@digicool.com
Wed, 24 Apr 2002 11:42:17 -0400
Update of /cvs-repository/Zope/lib/python/Products/PluginIndexes/common
In directory cvs.zope.org:/tmp/cvs-serv6801/common
Modified Files:
PluggableIndex.py
Log Message:
Interface cleanup:
Pluggable indexes no longer subclass PluggableIndex.PluggableIndex.
Instead PluggableIndex.py only contains the interface description.
=== Zope/lib/python/Products/PluginIndexes/common/PluggableIndex.py 1.3 => 1.4 ===
import Interface
+class PluggableIndexInterface(Interface.Base):
-class PluggableIndex:
+ """interface for plugabble indexes"""
- """Base pluggable index class"""
+ def getId():
+ """ return Id of index """
-
- def getEntryForObject(self, documentId, default=None):
+ def getEntryForObject(documentId, default=None):
"""Get all information contained for a specific object by documentId"""
pass
- def index_object(self, documentId, obj, threshold=None):
+ def index_object(documentId, obj, threshold=None):
"""Index an object:
'documentId' is the integer ID of the document
@@ -38,12 +39,12 @@
pass
- def unindex_object(self, documentId):
+ def unindex_object(documentId):
"""Remove the documentId from the index"""
pass
- def uniqueValues(self, name=None, withLengths=0):
+ def uniqueValues(name=None, withLengths=0):
"""Returns the unique values for name.
If 'withLengths' is true, returns a sequence of tuples of
@@ -51,7 +52,7 @@
pass
- def _apply_index(self, request, cid=''):
+ def _apply_index(request, cid=''):
"""Apply the index to query parameters given in the argument, request.
The argument should be a mapping object.
@@ -69,6 +70,3 @@
pass
-PluggableIndexInterface = Interface.impliedInterface(PluggableIndex)
-
-PluggableIndex.__implements__ = PluggableIndexInterface