[Zope3-dev] Re: RFC - Partial Adapters
Steve Alexander
steve at z3u.com
Fri Jan 2 18:56:58 EST 2004
Garrett Smith wrote:
> Jim Fulton wrote:
>
>> I see partial adapter uses as being relatively limited. <shrug>.
>
>
> I'm trying to 'get' this concept. It looks like this is a facility to
> express one-to-many relationships between objects in terms of an interface.
>
> In your example, is ISublocations merely a marker interface?
>
> It's also not clear to me how the term 'partial' applies to these adapters.
Rather than get the single adapter that is more appropriate, you get all
of the adapters that match.
Each adapter contributes one "part" of the total results. So, each one
is a partial adapter.
In the example, each ISublocations adapter tells you about some
locations that exist under the location being adapted. If you iterate
over the matching partial adapters, and get all of the locations from
each partial adapters, you will have all of the locations under the
object you originally adapted.
--
Steve Alexander
More information about the Zope3-dev
mailing list