Local interface registrations, and GenericSetup with local subscriber registrations
Martin Aspeli
optilude at gmx.net
Sun Sep 2 12:22:02 UTC 2007
Wichert Akkerman wrote:
> Previously George Lee wrote:
>> Is there GenericSetup support to register subscription adapters to a Plone
>> site (acting as a local site manager)? I see in the API that this can be
>> done in Python code, but don't know if there is GenericSetup support.
>
> No.
Though it wouldn't be too hard to add, and you could still do it with a
setuphandlers.py custom import step.
>> Also -- I think it's a stretch -- is it possible to register interfaces on a
>> local basis? So that instances of class Products.MyType.MyType would
>> implement IFoo on some local sites but not globally?
>
> No.
Yes - I can't think of a good way to do this, except to have a local
event handler for IObjectCreatedEvent which did an alsoProvides() on the
object instance.
Interfaces *implemented* by classes are inherently global.
Martin
--
Acquisition is a jealous mistress
More information about the Product-Developers
mailing list