Hi all,

I'm trying to add new File Install configurations programaticaly and am not 
having much luck. Has anyone done this before? Any insight would be 
appreciated. Here's what I'm trying.

Configuration config = 
configAdmin.createFactoryConfiguration("org.apache.felix.fileinstall-" + 
file.getName().replaceAll("\\s<smb://s>",""));
Dictionary<String, String> dict = new Hashtable<String, String>();
dict.put("felix.fileinstall.dir", file.getAbsolutePath());
config.update(dict);

The result is several entries in the web console under the "Configuration 
Status" like:

PID = 
org.apache.felix.fileinstall-pdi-birt-output.001f0458-d562-4567-b969-9b1b158389a9
  Factory PID = org.apache.felix.fileinstall-pdi-birt-output
  BundleLocation = 
file:/Users/nbaker/IdeaProjects/Dashboards/Kettle/trunk/plugins/pluginRegistry/karaf-plugin/karaf/deploy/pentaho-osgi-utils-TRUNK-SNAPSHOT.jar
  felix.fileinstall.dir = 
/Users/nbaker/IdeaProjects/Dashboards/Kettle/trunk/osgi-plugins/pdi-birt-output
  service.factoryPid = org.apache.felix.fileinstall-pdi-birt-output
  service.pid = 
org.apache.felix.fileinstall-pdi-birt-output.001f0458-d562-4567-b969-9b1b158389a9


Thanks,
Nick Baker

Reply via email to