[CMF-checkins] CVS: CMF/CMFDefault - DiscussionTool.py:1.11.6.2 MetadataTool.py:1.17.6.2
Yvo Schubbe
schubbe@web.de
Thu, 19 Dec 2002 17:10:01 -0500
Update of /cvs-repository/CMF/CMFDefault
In directory cvs.zope.org:/tmp/cvs-serv8512/CMFDefault
Modified Files:
Tag: yuppie-collector096-branch
DiscussionTool.py MetadataTool.py
Log Message:
tool interface cleanup:
- added interface tests and made them pass
=== CMF/CMFDefault/DiscussionTool.py 1.11.6.1 => 1.11.6.2 ===
--- CMF/CMFDefault/DiscussionTool.py:1.11.6.1 Wed Dec 18 16:43:06 2002
+++ CMF/CMFDefault/DiscussionTool.py Thu Dec 19 17:09:31 2002
@@ -29,12 +29,16 @@
from Products.CMFCore.ActionProviderBase import ActionProviderBase
from Products.CMFCore.Expression import Expression
+from Products.CMFCore.interfaces.portal_discussion \
+ import portal_discussion as IDiscussionTool
+
+
class DiscussionNotAllowed( Exception ):
pass
class DiscussionTool( UniqueObject, SimpleItem, ActionProviderBase ):
- __implements__ = ActionProviderBase.__implements__
+ __implements__ = (IDiscussionTool, ActionProviderBase.__implements__)
id = 'portal_discussion'
meta_type = 'Default Discussion Tool'
=== CMF/CMFDefault/MetadataTool.py 1.17.6.1 => 1.17.6.2 ===
--- CMF/CMFDefault/MetadataTool.py:1.17.6.1 Wed Dec 18 16:43:26 2002
+++ CMF/CMFDefault/MetadataTool.py Thu Dec 19 17:09:31 2002
@@ -10,9 +10,9 @@
# FOR A PARTICULAR PURPOSE
#
##############################################################################
+""" CMFDefault portal_metadata tool.
-"""\
-CMFDefault portal_metadata tool.
+$Id$
"""
from OFS.SimpleItem import SimpleItem
@@ -28,6 +28,10 @@
from Products.CMFCore.ActionProviderBase import ActionProviderBase
from utils import _dtmldir
+from Products.CMFCore.interfaces.portal_metadata \
+ import portal_metadata as IMetadataTool
+
+
class MetadataElementPolicy( SimpleItem ):
"""
Represent a type-specific policy about a particular DCMI element.
@@ -197,7 +201,7 @@
class MetadataTool( UniqueObject, SimpleItem, ActionProviderBase ):
- __implements__ = ActionProviderBase.__implements__
+ __implements__ = (IMetadataTool, ActionProviderBase.__implements__)
id = 'portal_metadata'
meta_type = 'Default Metadata Tool'