org.ow2.jonas.launcher.jonas
Class DefaultConfigurationProvider

java.lang.Object
  extended by org.ow2.jonas.launcher.jonas.DefaultConfigurationProvider
All Implemented Interfaces:
IConfigurationProvider

public class DefaultConfigurationProvider
extends Object
implements IConfigurationProvider

Default IConfigurationProvider for Apache Felix.

Author:
Guillaume Sauthier

Constructor Summary
DefaultConfigurationProvider()
          Default constructor.
 
Method Summary
protected  org.ow2.util.substitution.ISubstitutionEngine createSubstitutionEngine()
          Can be overridden if required.
 SortedMap<Integer,List<String>> getAutoInstallBundles()
           
 SortedMap<Integer,List<String>> getAutoStartBundles()
           
protected  List<String> getBundleLocationsFromDirectory(File directory)
           
 Map<String,String> getConfiguration()
           
 ClassLoader getFrameworkClassLoader(ClassLoader parentClassLoader)
           
protected  void initLevelBundles(Properties autoDeployProperties)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DefaultConfigurationProvider

public DefaultConfigurationProvider()
Default constructor.

Method Detail

createSubstitutionEngine

protected org.ow2.util.substitution.ISubstitutionEngine createSubstitutionEngine()
Can be overridden if required.

Returns:
the substituion engine that will be used for variable value resolution.

getConfiguration

public Map<String,String> getConfiguration()
                                    throws IOException
Specified by:
getConfiguration in interface IConfigurationProvider
Returns:
a Felix default configuration.
Throws:
IOException - configuration not found

initLevelBundles

protected void initLevelBundles(Properties autoDeployProperties)
                         throws IOException
Throws:
IOException

getBundleLocationsFromDirectory

protected List<String> getBundleLocationsFromDirectory(File directory)
                                                throws IOException
Parameters:
directory - Directory to look for bundles.
Returns:
A list of URLs corresponding to the files in the given directory. An empty String if the directory does not exists.
Throws:
IOException - when a bundle File cannot be turned into an URL

getAutoInstallBundles

public SortedMap<Integer,List<String>> getAutoInstallBundles()
Specified by:
getAutoInstallBundles in interface IConfigurationProvider
Returns:
list of the bundles to install and add it to the start level

getAutoStartBundles

public SortedMap<Integer,List<String>> getAutoStartBundles()
Specified by:
getAutoStartBundles in interface IConfigurationProvider
Returns:
map of the bundles to "automatically start for a given level"

getFrameworkClassLoader

public ClassLoader getFrameworkClassLoader(ClassLoader parentClassLoader)
Specified by:
getFrameworkClassLoader in interface IConfigurationProvider


Copyright © 2012 OW2 Consortium. All Rights Reserved.