[Zope3-checkins] CVS: Zope3/src/zope/app/index/text - index.py:1.17

Jim Fulton jim at zope.com
Sun Sep 21 13:32:26 EDT 2003


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

Modified Files:
	index.py 
Log Message:
No-longer use context wrappers.


=== Zope3/src/zope/app/index/text/index.py 1.16 => 1.17 ===
--- Zope3/src/zope/app/index/text/index.py:1.16	Sun Aug 17 02:06:59 2003
+++ Zope3/src/zope/app/index/text/index.py	Sun Sep 21 13:31:55 2003
@@ -23,7 +23,7 @@
 
 from zope.component import getService
 from zope.app.services.servicenames import HubIds
-from zope.context import ContextMethod
+from zope.app.container.contained import Contained
 from zope.index.text.textindexwrapper import TextIndexWrapper
 
 from zope.app.interfaces.services.hub import \
@@ -34,7 +34,9 @@
 from zope.app.index import InterfaceIndexingSubscriber
 from zope.app.interfaces.catalog.index import ICatalogIndex
 
-class TextCatalogIndex(InterfaceIndexingSubscriber, TextIndexWrapper):
+
+class TextCatalogIndex(InterfaceIndexingSubscriber, TextIndexWrapper,
+                       Contained):
     implements(ICatalogIndex, IUITextCatalogIndex)
 
     default_interface = ISearchableText
@@ -55,7 +57,6 @@
         if update:
             wrapped_self._update(channel.iterObjectRegistrations())
         wrapped_self.currentlySubscribed = True
-    subscribe = ContextMethod(subscribe)
 
     def unsubscribe(wrapped_self, channel=None):
         if not wrapped_self.currentlySubscribed:
@@ -64,7 +65,6 @@
         channel.unsubscribe(wrapped_self, IObjectModifiedHubEvent)
         channel.unsubscribe(wrapped_self, IRegistrationHubEvent)
         wrapped_self.currentlySubscribed = False
-    unsubscribe = ContextMethod(unsubscribe)
 
     def isSubscribed(self):
         return self.currentlySubscribed
@@ -73,12 +73,10 @@
         if channel is None:
             channel = getService(wrapped_self, HubIds)
         return channel
-    _getChannel = ContextMethod(_getChannel)
 
     def _update(wrapped_self, registrations):
         for location, hubid, wrapped_object in registrations:
             texts = wrapped_self._getValue(wrapped_object)
             if texts is not None:
                 wrapped_self.index_doc(hubid, texts)
-    _update = ContextMethod(_update)
 




More information about the Zope3-Checkins mailing list