[Zope-CMF] Re: ActionProviderBase.getActionById
Yuppie
schubbe at web.de
Fri Oct 10 05:24:28 EDT 2003
Hi!
alan runyan wrote:
> Could we land a getActionById on ActionProviderBase. In plone
> we have tons of code that iterates through actions just to
> grab a specific action by its id. Anyone see any downsides?
+1 in general
Some thoughts regarding details:
1.) We can't call this method getActionById. In CMF 1.4 and later
TypeInformation subclasses from ActionProviderBase and its getActionById
interface / implemtation doesn't make much sense in the context of
ActionInformation objects. TypeInformation's getActionById was written
for oldstyle type actions. I'd propose 'getActionInfo'.
2.) I'm not sure what identifies an Action: Id isn't unique. Id +
Category would be more specific, but isn't unique either. Don't know
what makes sence.
3.) The method should return the result of ActionInformation.getAction .
4.) The method should check Permissions and Condition.
5.) It should be possible to pass a chain of action ids. If Permissions
/ Condition check fails on the first one, return the next.
Cheers,
Yuppie
More information about the Zope-CMF
mailing list