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

Jim Fulton jim at zope.com
Mon Sep 8 15:22:11 EDT 2003


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

Modified Files:
      Tag: parentgeddon-branch
	index.py 
Log Message:
Checking in work in progress on parentgeddon-branch so Fred can help
me to get the tests passing.  Specific log entries will be provided
when we merge this into the head.


=== Zope3/src/zope/app/index/field/index.py 1.12 => 1.12.6.1 ===
--- Zope3/src/zope/app/index/field/index.py:1.12	Sun Aug 17 02:06:51 2003
+++ Zope3/src/zope/app/index/field/index.py	Mon Sep  8 14:21:40 2003
@@ -23,19 +23,18 @@
 
 from zope.component import getService
 from zope.app.services.servicenames import HubIds
-from zope.context import ContextMethod
+from zope.app.interfaces.event import ISubscriber
 from zope.index.field.index import FieldIndex as FieldIndexWrapper
 from zope.interface import implements
-
-from zope.app.interfaces.services.hub import \
-     IRegistrationHubEvent, \
-     IObjectModifiedHubEvent
-
+from zope.app.container.contained import Contained
+from zope.app.interfaces.services.hub import IObjectModifiedHubEvent
+from zope.app.interfaces.services.hub import IRegistrationHubEvent
 from zope.app.interfaces.index.field import IUIFieldIndex, IUIFieldCatalogIndex
 from zope.app.interfaces.catalog.index import ICatalogIndex
 from zope.app.index import InterfaceIndexingSubscriber
 
-class FieldCatalogIndex(InterfaceIndexingSubscriber, FieldIndexWrapper):
+class FieldCatalogIndex(InterfaceIndexingSubscriber, FieldIndexWrapper,
+                        Contained):
     implements(ICatalogIndex, IUIFieldCatalogIndex)
 
 class FieldIndex(FieldCatalogIndex):
@@ -53,7 +52,6 @@
         if update:
             self._update(channel.iterObjectRegistrations())
         self.currentlySubscribed = True
-    subscribe = ContextMethod(subscribe)
 
     def unsubscribe(self, channel=None):
         if not self.currentlySubscribed:
@@ -62,7 +60,6 @@
         channel.unsubscribe(self, IObjectModifiedHubEvent)
         channel.unsubscribe(self, IRegistrationHubEvent)
         self.currentlySubscribed = False
-    unsubscribe = ContextMethod(unsubscribe)
 
     def isSubscribed(self):
         return self.currentlySubscribed
@@ -71,11 +68,9 @@
         if channel is None:
             channel = getService(self, HubIds)
         return channel
-    _getChannel = ContextMethod(_getChannel)
 
     def _update(self, registrations):
         for location, hubid, wrapped_object in registrations:
             value = self._getValue(wrapped_object)
             if value is not None:
                 self.index_doc(hubid, value)
-    _update = ContextMethod(_update)




More information about the Zope3-Checkins mailing list