> On Sun, Feb 20, 2011 at 7:20 PM, Shay Thompson <[email protected]> wrote: >> I have a bundle which after installing requires the user to go to the >> Configuration tab in the Felix Web Console, click on the Bundle name or the >> + symbol to open the 'Create new factory configuration' window and then hit >> Save to create a new configuration for that bundle with the default values. >> >> My question is, is there a setting I can put somewhere in the bundle so when >> it gets installed a default Configuration is created for it automatically? >> Some switch or setting in the manifest perhaps? >>
On Mon, Feb 21, 2011 at 1:43 AM, Justin Edelson <[email protected]> wrote: > AFAIK, you have to do this in code. But it isn't a lot of code :) > > Take a look at the Activator in the jackrabbit server bundle. Either > on bundle start or when the ConfigAdmin service becomes available > (which ever comes first), the verifyConfiguration() method is called. > > This method does the following: > * lists the configurations for the factory PID > * if there aren't any configurations for the PID, create a default one > and save it. > > You could also use JCRInstall or FileInstall. These will let you > install a default configuration. ... and that default configuration could be supplied in your bundle. You might find some useful information on this in this thread: http://sling.markmail.org/thread/vd2az5cj3sogf7u2#mid:lqogsvyschzzcnwj+state:results Especially note the meaning of dashes in the config node name, as explained by Bertrand in this message: http://markmail.org/message/6lum4u6vnu2doanb -- Vidar S. Ramdal <[email protected]> - http://www.idium.no Sommerrogata 13-15, N-0255 Oslo, Norway + 47 22 00 84 00 Quando omni flunkus moritatus!
