[CMF-checkins] SVN: CMF/trunk/CMFTopic/ Wire up GenericSetup support for topics / criteria.

Tres Seaver tseaver at palladion.com
Sun Nov 20 22:02:27 EST 2005


Log message for revision 40287:
  Wire up GenericSetup support for topics / criteria.

Changed:
  U   CMF/trunk/CMFTopic/Topic.py
  A   CMF/trunk/CMFTopic/configure.zcml

-=-
Modified: CMF/trunk/CMFTopic/Topic.py
===================================================================
--- CMF/trunk/CMFTopic/Topic.py	2005-11-21 02:56:43 UTC (rev 40286)
+++ CMF/trunk/CMFTopic/Topic.py	2005-11-21 03:02:27 UTC (rev 40287)
@@ -21,12 +21,19 @@
 
 from Products.CMFDefault.SkinnedFolder import SkinnedFolder
 from Products.CMFCore.utils import getToolByName
+from zope.interface import Interface
+from zope.interface import implements
+from zope.interface import implementedBy
 
 from permissions import View
 from permissions import AddTopics
 from permissions import ChangeTopics
 
 
+class ITopic(Interface):
+    """ Marker interface.
+    """
+
 def addTopic( self, id, title='', REQUEST=None ):
     """ Create an empty topic.
     """
@@ -46,7 +53,7 @@
     o Each topic holds a set of zero or more Criteria objects specifying
       the query.
     """
-
+    implements(ITopic, implementedBy(SkinnedFolder))
     meta_type='Portal Topic'
 
     security = ClassSecurityInfo()

Added: CMF/trunk/CMFTopic/configure.zcml
===================================================================
--- CMF/trunk/CMFTopic/configure.zcml	2005-11-21 02:56:43 UTC (rev 40286)
+++ CMF/trunk/CMFTopic/configure.zcml	2005-11-21 03:02:27 UTC (rev 40287)
@@ -0,0 +1,18 @@
+<configure
+    xmlns="http://namespaces.zope.org/zope"
+    >
+
+  <adapter
+      factory=".exportimport.FolderishExporterImporter"
+      provides="Products.GenericSetup.interfaces.IFilesystemExporter"
+      for="Products.CMFTopic.Topic.ITopic"
+      />
+
+  <adapter
+      factory=".exportimport.FolderishExporterImporter"
+      provides="Products.GenericSetup.interfaces.IFilesystemImporter"
+      for="Products.CMFTopic.Topic.ITopic"
+      />
+
+</configure>
+



More information about the CMF-checkins mailing list