sling-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Justin Edelson <jus...@justinedelson.com>
Subject Re: Add Configuration to Bundle at Install
Date Mon, 21 Feb 2011 00:43:38 GMT
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. HOWEVER, only writing code will let
you have logic like "only create this configuration if there aren't
any for this PID" (which is the true meaning of a default
configuration)

HTH,
Justin

On Sun, Feb 20, 2011 at 7:20 PM, Shay Thompson <sthompso@adobe.com> wrote:
>
> First off, forgive me if this should be sent to Felix list.
>
> 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?
>
> Thanks,
> Shay
>
> ______________________________________________________________________________
>
> Shay Thompson - Lead Computer Scientist
> Adobe Systems, Inc. - AES Foundation
>
>
>

Mime
View raw message