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

Yvo Schubbe y.2004_ at wcm-solutions.de
Wed Jul 21 11:47:42 EDT 2004


Update of /cvs-repository/Products/CMFCore/interfaces
In directory cvs.zope.org:/tmp/cvs-serv31550/CMFCore/interfaces

Modified Files:
      Tag: yuppie-apb-redo-branch
	portal_actions.py 
Log Message:
- removed (never released) OldstyleActionProviderBase again:
  ActionProviderBase now also works with oldstyle dicts
  and action providers that still need an OAI have to call getOAI()

- added ActionInfo, a lazy custom dict class that replaces the old Action info mappings

- listActionInfos() and listFilteredActionsFor() now return ActionInfo objects

- removed duplicate filtering in listFilteredActionsFor():
  it's now expensive and there should be no duplicates anyway

- made getMapping() faster


=== Products/CMFCore/interfaces/portal_actions.py 1.16 => 1.16.8.1 ===
--- Products/CMFCore/interfaces/portal_actions.py:1.16	Wed Jun 30 11:40:17 2004
+++ Products/CMFCore/interfaces/portal_actions.py	Wed Jul 21 11:47:12 2004
@@ -72,7 +72,7 @@
 
         Permission -- Always available
 
-        Returns -- Dictionary of category / action list pairs.
+        Returns -- Dictionary of category / ActionInfo list pairs
         """
 
     def listFilteredActions(object=None):
@@ -93,7 +93,7 @@
         version. If 'object' isn't specified, the method uses for backwards
         compatibility 'info.content' as object.
 
-        Returns -- Tuple of ActionInformation objects
+        Returns -- Tuple of ActionInformation objects (or Action mappings)
         """
 
     def getActionObject(action):
@@ -110,7 +110,7 @@
 
     def listActionInfos(action_chain=None, object=None, check_visibility=1,
                         check_permissions=1, check_condition=1, max=-1):
-        """ List Action info mappings.
+        """ List ActionInfo objects.
 
         'action_chain' is a sequence of action 'paths' (e.g. 'object/view').
         If specified, only these actions will be returned in the given order.
@@ -121,46 +121,14 @@
 
         Permission -- Always available (not publishable)
 
-        Returns -- Tuple of Action info mappings
+        Returns -- Tuple of ActionInfo objects
         """
 
     def getActionInfo(action_chain, object=None, check_visibility=0,
                       check_condition=0):
-        """ Get an Action info mapping specified by a chain of actions.
+        """ Get an ActionInfo object specified by a chain of actions.
 
         Permission -- Always available
 
-        Returns -- Action info mapping
-        """
-
-
-class OldstyleActionProvider(ActionProvider):
-    """ Deprecated interface expected of an object that can provide actions.
-
-    Still used by 'Oldstyle CMF Discussion Tool' and 'CMF Workflow Tool'.
-    """
-
-    def listActions(info):
-        """ List all the actions defined by a provider.
-
-        Each action should contain the keys "name", "url", "permissions" and
-        "category", conforming to the specs outlined in
-        portal_actions.listFilteredActionsFor(). The info argument contains
-        at least the following attributes, some of which may be set to "None":
-
-        - isAnonymous
-
-        - portal
-
-        - portal_url
-
-        - folder
-
-        - folder_url
-
-        - content
-
-        - content_url
-
-        Returns -- Tuple of mappings describing actions
+        Returns -- ActionInfo object
         """



More information about the CMF-checkins mailing list