[CMF-checkins] CVS: CMF/CMFCore/interfaces - portal_actions.py:1.9

Yvo Schubbe schubbe@web.de
Mon, 6 Jan 2003 15:38:24 -0500


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

Modified Files:
	portal_actions.py 
Log Message:
Merged yuppie-collector096-branch:
- Cleaned up Interfaces and API Help. (Collector #96)
- Removed deprecated 'register' module and interface.

=== CMF/CMFCore/interfaces/portal_actions.py 1.8 => 1.9 ===
--- CMF/CMFCore/interfaces/portal_actions.py:1.8	Thu Aug  1 15:05:12 2002
+++ CMF/CMFCore/interfaces/portal_actions.py	Mon Jan  6 15:38:19 2003
@@ -10,14 +10,20 @@
 # FOR A PARTICULAR PURPOSE
 # 
 ##############################################################################
-""" Actions tool interface description.
+""" Actions tool interface.
 
 $Id$
 """
 
-from Interface import Base, Attribute
+from Interface import Attribute
+try:
+    from Interface import Interface
+except ImportError:
+    # for Zope versions before 2.6.0
+    from Interface import Base as Interface
 
-class portal_actions(Base):
+
+class portal_actions(Interface):
     '''Gathers a list of links which the user is allowed to view according to
     the current context.
     '''
@@ -64,13 +70,20 @@
         '''
 
 
-class ActionProvider(Base):
+class ActionProvider(Interface):
     '''The interface expected of an object that can provide actions.
     '''
 
     # listActions__roles__ = ()  # No permission.
     def listActions(info):
-        '''Support for the old list of mappings is currently supported:
+        """ Return all the actions defined by a provider.
+
+        The info argument is currently used by 'Oldstyle CMF Discussion Tool'
+        and 'CMF Workflow Tool'.
+
+        Returns -- Tuple of ActionInformation objects
+
+        Oldstyle dictionary actions are currently also supported:
         Returns a list of mappings describing actions.  Each action
         should contain the keys "name", "url", "permissions", and
         "category", conforming to the specs outlined in
@@ -86,5 +99,5 @@
           content
           content_url
           The new way of doing this is....
-        '''
+        """