Hi Bertrand, On Tue, Jul 20, 2010 at 11:47 AM, Bertrand Delacretaz < [email protected]> wrote:
> Hi Victor, > > Thanks very much for exposing your use case. > > On Tue, Jul 20, 2010 at 10:42 AM, Victor Saar <[email protected]> wrote: > > What I'm trying to do right now is to render selected parts of the > content > > in a certain representation, which is identified by an extension and > > selectors. The result is then packed in a zip file and stored in the > > repository > > for later delivery. The update of the zip file is triggered by some event > > (e.g. > > a change to the repository or configuration) and is thus outside of the > > usual > > request/response cycle... > > Ok, so in your case the SlingServlet would be called programmatically, > not from an existing http request. > Right. > > I think the detached requests factory that I suggest in my previous > mail might help, how does the following scenario sound? > > @Reference > DetachedRRFactory f; > > @Reference > SlingServlet s; > > Map<String, String> parameters = ... > RRpair p = f.getRequestResponsePair("POST", "/foo", parameters); > s.processrequest(p.getRequest(), p.getResponse()); > > This looks like an elegant way to me. I assume that any extension, selectors and suffix would be provided in the parameters? -Victor
