AW: AW: [Zope3-dev] Propose interface change (well not really)
Jim Fulton
jim at zope.com
Thu Jul 8 19:13:38 EDT 2004
Roger ineichen wrote:
> Jim Fulton wrote:
..
>>Roger, I'm confused. Are you talking about the principal
>>source? Or the auth service?
>
>
> About the IPrincipalSource. I was lookig at the implementation of
> BTreePrincipalSource which is a sample of read/write principal source.
> Because it implements a IContainer. Then I was thinking of a
> read only principal source should at least provide IReadContainer.
> But this isn't the case. I was wrong because that's just one implementation.
> with a BTree container. What do you think about to have a Interface for to
> add principals like setPrincipal(self, login, ob) instead of
> __setitem__(self, login, ob)?
The point is that a principal source need not support principal
management. A principal soures only responsability is to provide
access to principals. Principal sources may provide additional features,
like principal management.
> Do we have to provide everywhere IContainer where we add object in Zope
> or can we use the method setPrincipal() instead if we have to add new
> interfaces?
It's up to an object to decide if and how to manage subobjects.
If an object is going to allow an arbitrary number of subobjects,
then the container framework is very convenient.
Jim
--
Jim Fulton mailto:jim at zope.com Python Powered!
CTO (540) 361-1714 http://www.python.org
Zope Corporation http://www.zope.com http://www.zope.org
More information about the Zope3-dev
mailing list