2011/3/28 Bertrand Delacretaz <[email protected]>: > Hi, > > On Mon, Mar 28, 2011 at 11:57 AM, Olivier Grisel > <[email protected]> wrote: >> 2011/3/28 Rupert Westenthaler <[email protected]>: >>>... I would suggest to define a "stanbol.home" and interpret such path >>> relative to this folder. >>> Bundles that use the commons.web bundle would than to make sure (e.g. >>> in the activate method) to copy such files to the specified directory. >> >> Yes it's probably simpler to copy all the contributed static resources >> ( JS, css, logos and style images ...), and freemarker templates into >> a two dedicated folders under the sling folder of the stanbol instance >> at bundle activation time and register those folders for static >> resource lookup and for the FreemarkerViewProcessor.... > > This sounds mildly scary - what happens for example when a bundle is > removed, or upgraded? > > I'm not too familiar with how JAX-RS accesses its resources, couldn't > that be delegated to an OSGi service?
I have to check for the static resources. For the Freemarker templates, the lookup is completely pluggable and could therefore be delegated to an OSGi service that implements the template loader interface: http://freemarker.sourceforge.net/docs/pgui_config_templateloading.html It could furthermore leverage the MultiTemplateLoader implementation to delegate the lookup to ClassTemplateLoader for each contribution in order of registration. -- Olivier http://twitter.com/ogrisel - http://github.com/ogrisel
