[Zope-CMF] DublinCore Contributors
Florent Guillaume
fg@nuxeo.com
Mon, 23 Jun 2003 16:22:08 +0200
In article <1053960015.7764.10.camel@trigger.palladion.com> you write:
> On Mon, 2003-05-26 at 05:45, Ignacio Dosil Lago wrote:
> >
> > Hi all
> > As a content can be modified by different users, for item, when several
> > owners in the same folder:
> > what about updating the contributors tuple automatically as a content is
> > modified?
>
> This is easy enough to do, using only skin methods.
>
> > what if the last modifier login name is shown with the last modification time
> > or, at least, add a method or attribute to the default DublinCore
> > implementation to allow it?
>
> Last modifier is harder, unless you force the ordering of the
> contributors to be significant.
>
> > Are there any reasons not to do this?
>
> The biggest issue is wiring up all your content to call the method you
> write at appropriate times. Zope3's event service makes this simpler:
> all an object is responsible for is notifying the world that it is
> created / modified, while one of the listeners to those events updates
> the created / created_by / modified / modified_by metadata. In fact,
> Christian Theune wired that listener up to do exactly what you propose.
In CMF >= 1.3 it's pretty easy, just overload the notifyModified()
method to do any additional bookkeeping it needs. The last modifier
problem is exactly why I added this.
See
http://cvs.nuxeo.org/cgi-bin/viewcvs.cgi/NuxCPSDocuments/BaseDocument.py?rev=HEAD&content-type=text/vnd.viewcvs-markup
for an example of how it's done in CPS.
Florent
--
Florent Guillaume, Nuxeo (Paris, France)
+33 1 40 33 79 87 http://nuxeo.com mailto:fg@nuxeo.com