[CMF-checkins] CVS: CMF/CMFCore - CatalogTool.py:1.37.8.2 DiscussionTool.py:1.8.12.1 SkinsTool.py:1.19.6.2 TypesTool.py:1.46.12.2 UndoTool.py:1.11.8.2

Yvo Schubbe schubbe@web.de
Thu, 19 Dec 2002 17:09:22 -0500


Update of /cvs-repository/CMF/CMFCore
In directory cvs.zope.org:/tmp/cvs-serv8280/CMFCore

Modified Files:
      Tag: yuppie-collector096-branch
	CatalogTool.py DiscussionTool.py SkinsTool.py TypesTool.py 
	UndoTool.py 
Log Message:
tool interface cleanup:
- added interface tests and made them pass

=== CMF/CMFCore/CatalogTool.py 1.37.8.1 => 1.37.8.2 ===
--- CMF/CMFCore/CatalogTool.py:1.37.8.1	Wed Dec 18 16:41:33 2002
+++ CMF/CMFCore/CatalogTool.py	Thu Dec 19 17:08:51 2002
@@ -10,13 +10,11 @@
 # FOR A PARTICULAR PURPOSE
 # 
 ##############################################################################
-
 """ Basic portal catalog.
 
 $Id$
 """
 
-
 import os
 from utils import UniqueObject, _checkPermission, _getAuthenticatedUser
 from utils import getToolByName, _dtmldir
@@ -36,6 +34,8 @@
 from CMFCorePermissions import AccessInactivePortalContent
 from Acquisition import aq_base
 
+from interfaces.portal_catalog import portal_catalog as ICatalogTool
+
 
 class IndexableObjectWrapper:
 
@@ -72,7 +72,7 @@
     '''This is a ZCatalog that filters catalog queries.
     '''
 
-    __implements__ = ActionProviderBase.__implements__
+    __implements__ = (ICatalogTool, ActionProviderBase.__implements__)
 
     id = 'portal_catalog'
     meta_type = 'CMF Catalog'


=== CMF/CMFCore/DiscussionTool.py 1.8 => 1.8.12.1 ===
--- CMF/CMFCore/DiscussionTool.py:1.8	Sat Aug  3 22:31:30 2002
+++ CMF/CMFCore/DiscussionTool.py	Thu Dec 19 17:08:51 2002
@@ -26,6 +26,9 @@
 import Acquisition
 from AccessControl import ClassSecurityInfo
 
+from interfaces.portal_discussion \
+        import oldstyle_portal_discussion as IOldstyleDiscussionTool
+
 
 class OldDiscussable(Acquisition.Implicit):
     """
@@ -105,6 +108,9 @@
 
 
 class DiscussionTool (UniqueObject, SimpleItem):
+
+    __implements__ = IOldstyleDiscussionTool
+
     id = 'portal_discussion'
     meta_type = 'Oldstyle CMF Discussion Tool'
     # This tool is used to find the discussion for a given content object.


=== CMF/CMFCore/SkinsTool.py 1.19.6.1 => 1.19.6.2 ===
--- CMF/CMFCore/SkinsTool.py:1.19.6.1	Wed Dec 18 16:42:15 2002
+++ CMF/CMFCore/SkinsTool.py	Thu Dec 19 17:08:51 2002
@@ -43,6 +43,8 @@
 except ImportError:
     SUPPORTS_PAGE_TEMPLATES=0
 
+from interfaces.portal_skins import portal_skins as ISkinsTool
+
 
 def modifiedOptions():
     # Remove the existing "Properties" option and add our own.
@@ -61,7 +63,7 @@
     This tool is used to supply skins to a portal.
     '''
 
-    __implements__ = ActionProviderBase.__implements__
+    __implements__ = (ISkinsTool, ActionProviderBase.__implements__)
 
     id = 'portal_skins'
     meta_type = 'CMF Skins Tool'


=== CMF/CMFCore/TypesTool.py 1.46.12.1 => 1.46.12.2 ===
--- CMF/CMFCore/TypesTool.py:1.46.12.1	Wed Dec 18 16:42:26 2002
+++ CMF/CMFCore/TypesTool.py	Thu Dec 19 17:08:51 2002
@@ -33,12 +33,16 @@
 from CMFCorePermissions import ManagePortal
 from CMFCorePermissions import AccessContentsInformation
 
+from interfaces.portal_types import ContentTypeInformation as ITypeInformation
+from interfaces.portal_types import portal_types as ITypesTool
+
 _marker = []  # Create a new marker.
 
 class TypeInformation (SimpleItemWithProperties):
     """
     Base class for information about a content type.
     """
+
     _isTypeInformation = 1
 
     manage_options = (SimpleItemWithProperties.manage_options[:1] +
@@ -428,6 +432,9 @@
     """
     Portal content factory.
     """
+
+    __implements__ = ITypeInformation
+
     meta_type = 'Factory-based Type Information'
     security = ClassSecurityInfo()
 
@@ -522,6 +529,9 @@
     """
     Invokes a script rather than a factory to create the content.
     """
+
+    __implements__ = ITypeInformation
+
     meta_type = 'Scriptable Type Information'
     security = ClassSecurityInfo()
 
@@ -600,7 +610,7 @@
         Provides a configurable registry of portal content types.
     """
 
-    __implements__ = ActionProviderBase.__implements__
+    __implements__ = (ITypesTool, ActionProviderBase.__implements__)
 
     id = 'portal_types'
     meta_type = 'CMF Types Tool'


=== CMF/CMFCore/UndoTool.py 1.11.8.1 => 1.11.8.2 ===
--- CMF/CMFCore/UndoTool.py:1.11.8.1	Wed Dec 18 16:42:35 2002
+++ CMF/CMFCore/UndoTool.py	Thu Dec 19 17:08:51 2002
@@ -27,9 +27,12 @@
 from CMFCorePermissions import ManagePortal
 from CMFCorePermissions import ListUndoableChanges
 
+from interfaces.portal_undo import portal_undo as IUndoTool
+
+
 class UndoTool (UniqueObject, SimpleItem, ActionProviderBase):
 
-    __implements__ = ActionProviderBase.__implements__
+    __implements__ = (IUndoTool, ActionProviderBase.__implements__)
 
     id = 'portal_undo'
     meta_type = 'CMF Undo Tool'