|
|
Choosing A Webhost: |
CVS: Products/CMFCore/interfaces - portal_actions.py:1.20: msg#00054web.zope.cmf.cvs
Update of /cvs-repository/Products/CMFCore/interfaces In directory cvs.zope.org:/tmp/cvs-serv24836/CMFCore/interfaces Modified Files: portal_actions.py Log Message: merged yuppie-new_actions-branch: - added ActionCategory and Action interfaces - added ActionCategory and Action classes - modified ActionsTool to make use of these new classes - removed deprecated 'name' and 'permissions' keys from ActionInfo - allowed 'description' key in ActionInfo - implemented IAction in the oldstyle ActionInformation class and used this interface to simplify ActionInfo - updated setup handlers, tests, default profile and skins - fixed ActionInfo issue regarding permissions in oldstyle action dicts === Products/CMFCore/interfaces/portal_actions.py 1.19 => 1.20 === --- Products/CMFCore/interfaces/portal_actions.py:1.19 Tue Sep 14 15:02:21 2004 +++ Products/CMFCore/interfaces/portal_actions.py Tue Jan 25 14:49:41 2005 @@ -90,7 +90,7 @@ Raises an ValueError exception if the action is of the wrong format. Permission -- Private - + Returns -- The actions object reference. """ @@ -120,6 +120,40 @@ """ +class ActionCategory(Interface): + """ Group of Action objects. + """ + + def listActions(): + """ List the actions defined in this category and its subcategories. + + Permission -- Python only + + Returns -- Tuple of Action objects. + """ + + +class Action(Interface): + """ Reference to an action. + """ + + def getInfoData(): + """ Get the data needed to create an ActionInfo. + + Default keys are: 'id', 'category', 'title', 'description', 'url', + 'icon', 'available', 'permissions' and 'visible'. + + Instead of computed values callable expression objects or methods are + returned. For performance reasons, these objects are called later and + only if the values are actually needed. The keys for all these lazy + values are registered in a separate list. + + Permission -- Python only + + Returns -- Lazy info mapping and list of lazy keys. + """ + + class ActionInfo(Interface): """ A lazy dictionary for Action infos. @@ -138,13 +172,7 @@ - available (boolean): the result of checking the condition - - allowed (boolean): the result of checking permissions - - Deprecated keys: - - - name (string): use 'id' or 'title' instead - - - permissions (tuple): use 'allowed' instead; The user must have at - least one of the listed permissions to access the action. If the list - is empty, the user is allowed. + - allowed (boolean): the result of checking permissions; + The user must have at least one of the listed permissions to access + the action. If the list is empty, the user is allowed. """
|
|
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| Previous by Date: | CVS: Products/CMFCore - ActionInformation.py:1.27 ActionsTool.py:1.55 __init__.py:1.31, Yvo Schubbe |
|---|---|
| Next by Date: | CVS: Products/CMFCore/tests - test_ActionInformation.py:1.12 test_ActionProviderBase.py:1.18 test_ActionsTool.py:1.18, Yvo Schubbe |
| Previous by Thread: | CVS: Products/CMFCore - ActionInformation.py:1.27 ActionsTool.py:1.55 __init__.py:1.31, Yvo Schubbe |
| Next by Thread: | CVS: Products/CMFCore/tests - test_ActionInformation.py:1.12 test_ActionProviderBase.py:1.18 test_ActionsTool.py:1.18, Yvo Schubbe |
| Indexes: | [Date] [Thread] [Top] [All Lists] |
Free MagazinesCisco NewsReceive a free quarterly e-newsletter with exclusive articles on how Cisco IT uses its own products and solutions to enable the business. subscribe Systems Management News, the newspaper for IT systems administration and data center managers! Each issue of Systems Management News is chock-full of news and analysis to help you understand what's happening in your field. subscribe The Enterprise Newsweekly eWeek is the essential technology information source for builders of e-business. subscribe Oracle Magazine Oracle Magazine contains technology strategy articles, sample code, tips, Oracle and partner news, how to articles for developers and DBAs, and more. Oracle (NASDAQ: ORCL) is the world's largest enterprise software company. subscribe Total Telecom Total Telecom is "The Economist of the communications industry". subscribe |