org.apache.camel.component.properties
Class DefaultPropertiesResolver

java.lang.Object
  extended by org.apache.camel.component.properties.DefaultPropertiesResolver
All Implemented Interfaces:
PropertiesResolver

public class DefaultPropertiesResolver
extends Object
implements PropertiesResolver

Default PropertiesResolver which can resolve properties from file and classpath.

You can denote classpath: or file: as prefix in the uri to select whether the file is located in the classpath or on the file system.

Version:
$Revision: 20326 $

Constructor Summary
DefaultPropertiesResolver()
           
 
Method Summary
protected  Properties loadPropertiesFromClasspath(CamelContext context, String path)
           
protected  Properties loadPropertiesFromFilePath(CamelContext context, String path)
           
protected  Properties loadPropertiesFromRegistry(CamelContext context, String path)
           
 Properties resolveProperties(CamelContext context, String... uri)
          Resolve properties from the given uri
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DefaultPropertiesResolver

public DefaultPropertiesResolver()
Method Detail

resolveProperties

public Properties resolveProperties(CamelContext context,
                                    String... uri)
                             throws Exception
Description copied from interface: PropertiesResolver
Resolve properties from the given uri

Specified by:
resolveProperties in interface PropertiesResolver
Parameters:
context - the camel context
uri - uri(s) defining the source(s)
Returns:
the properties
Throws:
Exception - is thrown if resolving the properties failed

loadPropertiesFromFilePath

protected Properties loadPropertiesFromFilePath(CamelContext context,
                                                String path)
                                         throws IOException
Throws:
IOException

loadPropertiesFromClasspath

protected Properties loadPropertiesFromClasspath(CamelContext context,
                                                 String path)
                                          throws IOException
Throws:
IOException

loadPropertiesFromRegistry

protected Properties loadPropertiesFromRegistry(CamelContext context,
                                                String path)
                                         throws IOException
Throws:
IOException


Copyright © 2007-2010 IONA Open Source Community. All Rights Reserved.