You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@jackrabbit.apache.org by j....@gmail.com on 2005/05/25 16:22:31 UTC

EventListeners as "autoupdate"

Hi there 

How do I replicate the automatic update of a "Last Modified Date" property?

I can't seem to find a mixin type that will help me and I don't feel
like "extending" nt:resource (or is it mimeresouce!!) which seems to
be the only node type that does this.

I have tried to use an eventListener. I register a
"ModDateUpdateListener" upon login. This works nicely as long as there
is only one active session, since events generated in session X
triggers the listeners on all sessions (the noLocal flag when
registering the listener doesn't help here as that simply means that
session X doesn't receive the event itself)

Alternatively I could keep a workspace global session for this type of
listeners, but that seem quite klunky.

So what I'm after is either the magic nodetype that updates
last-modified-date or something like a workspace global listener pool

Thanks in advance

/Johal

Re: EventListeners as "autoupdate"

Posted by David Nuescheler <da...@gmail.com>.
i think the mix:lastModified would be a good idea, in conjunction
with respect to a pluggable mapping for behaviour of "protected" properties
in general.
i think i remember an earlier thread about opv=INITIALIZE & COMPUTE

is here already a jira entry for this?

regards,
david

On 5/25/05, j.alkjaer@gmail.com <j....@gmail.com> wrote:
> Hi there
> 
> How do I replicate the automatic update of a "Last Modified Date" property?
> 
> I can't seem to find a mixin type that will help me and I don't feel
> like "extending" nt:resource (or is it mimeresouce!!) which seems to
> be the only node type that does this.
> 
> I have tried to use an eventListener. I register a
> "ModDateUpdateListener" upon login. This works nicely as long as there
> is only one active session, since events generated in session X
> triggers the listeners on all sessions (the noLocal flag when
> registering the listener doesn't help here as that simply means that
> session X doesn't receive the event itself)
> 
> Alternatively I could keep a workspace global session for this type of
> listeners, but that seem quite klunky.
> 
> So what I'm after is either the magic nodetype that updates
> last-modified-date or something like a workspace global listener pool
> 
> Thanks in advance
> 
> /Johal
> 


-- 
----------------------------------------------------------------------
standardize your content-repository !
                               http://www.jcp.org/en/jsr/detail?id=170
---------------------------------------< david.nuescheler@day.com >---

This message is a private communication. If you are not the intended
recipient, please do not read, copy, or use it, and do not disclose it
to others. Please notify the sender of the delivery error by replying
to this message, and then delete it from your system. Thank you.

The sender does not assume any liability for timely, trouble free,
complete, virus free, secure, error free or uninterrupted arrival of
this e-mail. For verification please request a hard copy version.


mailto:david.nuescheler@day.com
http://www.day.com

David Nuescheler
Chief Technology Officer
Day Software AG
Barfuesserplatz 6 / Postfach
4001 Basel
Switzerland

T  41 61 226 98 98
F  41 61 226 98 97