[Zope3-checkins] CVS: Zope3/src/zope/app/interfaces/index - field.py:1.3

Marius Gedminas mgedmin@codeworks.lt
Mon, 23 Jun 2003 12:44:39 -0400


Update of /cvs-repository/Zope3/src/zope/app/interfaces/index
In directory cvs.zope.org:/tmp/cvs-serv9136/src/zope/app/interfaces/index

Modified Files:
	field.py 
Log Message:
FieldIndex now can adapt objects to a specific interface before indexing them.
For example, now you can create an index that adapts objects to IZopeDublinCore
and indexes their 'title' attributes.



=== Zope3/src/zope/app/interfaces/index/field.py 1.2 => 1.3 ===
--- Zope3/src/zope/app/interfaces/index/field.py:1.2	Sun Jun 22 12:10:56 2003
+++ Zope3/src/zope/app/interfaces/index/field.py	Mon Jun 23 12:44:39 2003
@@ -18,10 +18,17 @@
 
 from zope.interface import Interface
 from zope.schema import BytesLine
+from zope.app.component.interfacefield import InterfaceField
 
 
 class IUIFieldIndex(Interface):
     """Interface for creating a FieldIndex from the ZMI."""
+
+    interface = InterfaceField(
+                    title=u"Interface",
+                    description=u"Interface to adapts objects to before"
+                                u" indexing",
+                    required=False)
 
     field_name = BytesLine(
                     title=u"Field Name",