Rob Miller wrote:


you're more than welcome to either pitch this to plone-devel or to grab it by the horns and start working on it yourself. :-).

Hi Rob and all other CMF developers,

I know I'm getting myself in danger now as I know too little
yet about Zope 3 and I have no practical experience whatsoever
using the new event system or not even the slightes idea to
what extend the work for CMF-2.0 already achieved progress here.

So, before I start digging deeper into this I have some
fundamental (and hopefully trivial!) questions:

This is about using events for catalog awareness
If it's already there, please tell me and you can
stop reading. If not:

What would it need to get there?

I consider support for container events as given (Zope 2.9
or Zope 2.8 and Five 1.2).

 - Does that mean these events are there now when content
   is added/changed/removed in a CMF site or is there anything
   to be done first (like declaring Portal[Folder|Content]
   to provide some interface and making them generate these
   events?; add or change some base classes?)

 - Is there anything like a ZCatalog in Zope 3 including event
   handlers for IObject[Added|Removed|Changed|...]Event triggering
   [index|unindex|reindex] etc?
   If not: providing such handlers for the current catalog
   should be straight-forward. Something like

       getToolByName(obj, 'portal_catalog').[un|re]indexObject(obj)

   or am I missing something? (how to deal with multiple
   catalogs? wouldn't this be the wrong place for handling
   this anyway? but where then?)

 - Glueing it together needs some interface on the content
   side. E.g., say there is a marker interface 'ICatalogAware'
   declared for portal content and portal folder.
   Then we could configure subscribers like

  where - again - the handler could be as easy as

      def addedContent(obj, event):
          getToolByName(obj, 'portal_catalog').indexObject(obj)

  (BTW: where are those handlers typically defined?
   Should it be a method of the specific tool or a more
   general utility? If defined on the tool itself, how would
   one deal with several instances - either different CMF sites
   in one Zope instance or several catalogs in one portal site)

Now my questions: is the outline given above correct?
At least w.r.t. the big picute?

If so: Having this in place shouldn't this allow for easy
extension to  multiple catalogs (like the uid or reference
catalogs from AT) by simply registering them as further
subscribers to the respective events? How to do that?
(RTFM manual pointers welcome; maybe I just need to
read Philipp's chapter on sites and local utilies again
but as of now I don't see how you get this together with
the TTW generation of arbirary many CMF and/or Plone
sites in one Zope instance).

If this would be all true, is it correct to infer
then that this is something Plone shouldn't have to
deal with at all (except for configuration)?

Feedback welcome!



Zope-CMF maillist  -

See for bug reports and feature requests

Zope-CMF maillist  -

See for bug reports and feature requests

Reply via email to