jackrabbit-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Alexandru Popescu ☀" <the.mindstorm.mailingl...@gmail.com>
Subject Re: Achieving "jcr:lastModified" on non-nt:resource structured node types
Date Mon, 07 May 2007 20:38:49 GMT
On 5/7/07, Shaun Barriball <sbarriba@yahoo.co.uk> wrote:
> Hi all,
> We have a number of structured node types that require a "acme:lastModified"
> audit property which records the last time the node was saved. This is one
> example of typical audit properties you might want like
> "acme:lastModifiedBy" with the user name etc. This property is used, in
> particular, by a number of scheduled processes which must periodically batch
> process certain changes.
>
> Can anyone recommend a suitable best practice or JCR pattern to solve the
> above?
>
> It's obviously easy to add acme:lastModified to the specific node types but
> the difficult question is how to consistently set this property to ensure
> that the value is accurate.
>
>  - we could use an observation listener for any property changes, or
>
>  - we have a delegate pattern that would permit overriding node.save() but
> this is not always called where operation bypass the session.
>
>
> Any suggestions?
>

I would probably create a mixin type and then use the observation
feature to take care of updating it.

./alex
--
.w( the_mindstorm )p.

> Regards,
> Shaun.
>
>

Mime
View raw message