Just an update on update :) I've changed the implementation and now to change a resource, you adapt it to a ModifiableValueMap change the properties through put/putAll/remove, this goes into the transient space and then finally you call ResourceResolver#commit.
I think this is a nice and easy solution. In general my suggestion is that we play around with this api for a little time now and see how it feels Carsten 2012/7/31 Mike Müller <mike...@mysign.ch>: >> -----Original Message----- >> From: Bertrand Delacretaz [mailto:bdelacre...@apache.org] >> Sent: Tuesday, July 31, 2012 9:54 AM >> To: dev@sling.apache.org >> Subject: Re: [RT] API for modifying resources >> >> On Tue, Jul 31, 2012 at 9:48 AM, Mike Müller <mike...@mysign.ch> wrote: >> > ...that's what I meant in my post before, that update AND commit is >> > a little complicated. On the other hand, if we want to introduce a >> > transient >> > space as Carsten proposes, there have to be two different methods.... >> >> Really? What's wrong with ModifiableValueMap.put(..) and similar >> methods calling "save to transient space" behind the scenes? >> >> You'd then just need commit() or something to make changes persistent. > > That sounds okay form me and will make update obsolete. > > best regards > mike -- Carsten Ziegeler cziege...@apache.org