sling-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Felix Meschberger <fmesc...@gmail.com>
Subject Re: [RT] Post processing of POSTs
Date Thu, 03 Jul 2008 14:38:54 GMT
Hi,

Carsten Ziegeler schrieb:
> I currently have the use case that I would like to add do additional 
> changes when a POST is sent to Sling. One example is to set a last 
> modified date on a node when something is changed/updated in the 
> repository.
> 
> While this can be done through observation using observation is not 
> optimal especially as the user context is lost.
> 
> One idea I had is to add kind of a post processor to the sling post 
> servlet which is invoked after all changes are done and before the 
> session is safed. The problem here is now that the post processor should 
> know what has been done in order to do the right thing.
> 
> Fortunately, the sling post servlet uses the html response to keep track 
> of all changes. Unfortunately this is remembered in a string buffer 
> which is not suitable for further processing.
> 
> So what about keeping track of the changes in the html response in a way 
> that it makes possible for the post processor to inspect what has changed?

This once was the case, but since this functionality was private and not 
really used, I converted the modification list to a StringBuffer. This 
may of course be reverted ...


In addition, if we add post-processing, we should probably also add 
pre-processing for symmetry, right ? But how ?

Regards
Felix

Mime
View raw message