[Zope-CMF] [RFC] modification date

Florent Guillaume fg@nuxeo.com
Fri, 5 Jul 2002 22:20:06 +0000 (UTC)


Dieter Maurer  <dieter@handshake.de> wrote:
>   1. I have use cases where I do not want to have the modification time
>      set for each reindex (e.g. a change in workflow state requires
>      a catalog update but does not need to be considered as
>      a modification of the object).

Yes, there may be some fine tuning to do there. Note that the previous
state of the code was such that the modification date
(bobobase_modification_time) changed whenever the workflow state
changed.

I included in CVS an indirection through a notifyModified method. We
could probably call notifyModified from somewhere else and not do it
from reindexObject, or we could avoid calling it when reindexing from
the workflow, or we could make notifyModified the primary method to
call when an object has been modified and it would in turn call
reindexObject...

Really I'm looking for outside opinion here. A fundamental data point
is that a lot of user code calls reindexObject when something has
changed, and it's probably ok then to change the modification
date. The workflow reindexing could probably be treated specially.

>      But, your proposal is not problematic, because I just
>      do not neet to use your "modification_date".

Ok.

>   2. When I remember right, "reindexObject" is the same as
>      "indexObject". It would then be good, to have the
>      modification time handling at precisely one place
>      effective for both methods.

CMFCatalogAware's reindexObject is different from indexObject.  Also,
the code I have put CVS does time handling in one place.


Florent
-- 
Florent Guillaume, Nuxeo (Paris, France)
+33 1 40 33 79 87  http://nuxeo.com  mailto:fg@nuxeo.com