Loading configuration files

2009-10-30 Thread Vidar Ramdal
Is there a way to provide configuration files (*.config) as
initial-content in a bundle?

We need to set a config property for the Authorization Header
Authenticator, and I've found the config file under the
sling/config/org/o/a/s/httpauth/impl/AuthorizationHeaderAuthenticationHandler.config
- which I have edited.
Now, I'd like to apply this configuration when I install a bundle.

Is that possible, and how?

-- 
Vidar S. Ramdal vi...@idium.no - http://www.idium.no
Sommerrogata 13-15, N-0255 Oslo, Norway
+ 47 22 00 84 00 / +47 21 531941, ext 2070


Re: Loading configuration files

2009-10-30 Thread Alexander Klimetschek
On Fri, Oct 30, 2009 at 18:21, Vidar Ramdal vi...@idium.no wrote:
 Is there a way to provide configuration files (*.config) as
 initial-content in a bundle?

 We need to set a config property for the Authorization Header
 Authenticator, and I've found the config file under the
 sling/config/org/o/a/s/httpauth/impl/AuthorizationHeaderAuthenticationHandler.config
 - which I have edited.
 Now, I'd like to apply this configuration when I install a bundle.

 Is that possible, and how?

Yes, using the jcrinstall bundle and creating a sling:OsgiConfig node
(which you can easily define as initial content). The node must reside
in a config folder and have the name of the service pid, ie. the
class name. For Example:

/libs/sling/config/org.apache.sling.commons.log.LogManager

The properties of this node will be mapped one to one on OSGI config
properties, eg.

org.apache.sling.commons.log.level = info
(string property)

See also Install, modify and remove a configuration on
http://sling.apache.org/site/jcr-installer-jcrjcrinstall-and-osgiinstaller.html

Regards,
Alex

-- 
Alexander Klimetschek
alexander.klimetsc...@day.com