public class DefaultPropertiesResolver extends Object implements PropertiesResolver
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.Constructor and Description |
---|
DefaultPropertiesResolver(PropertiesComponent propertiesComponent) |
Modifier and Type | Method and Description |
---|---|
protected Properties |
loadPropertiesFromClasspath(CamelContext context,
boolean ignoreMissingLocation,
PropertiesLocation location) |
protected Properties |
loadPropertiesFromFilePath(CamelContext context,
boolean ignoreMissingLocation,
PropertiesLocation location) |
protected Properties |
loadPropertiesFromRegistry(CamelContext context,
boolean ignoreMissingLocation,
PropertiesLocation location) |
protected Properties |
prepareLoadedProperties(Properties properties)
Strategy to prepare loaded properties before being used by Camel.
|
Properties |
resolveProperties(CamelContext context,
boolean ignoreMissingLocation,
List<PropertiesLocation> locations)
Resolve properties from the given uri
|
public DefaultPropertiesResolver(PropertiesComponent propertiesComponent)
public Properties resolveProperties(CamelContext context, boolean ignoreMissingLocation, List<PropertiesLocation> locations) throws Exception
PropertiesResolver
resolveProperties
in interface PropertiesResolver
context
- the camel contextignoreMissingLocation
- ignore silently if the property file is missinglocations
- location(s) defining the source(s)Exception
- is thrown if resolving the properties failedprotected Properties loadPropertiesFromFilePath(CamelContext context, boolean ignoreMissingLocation, PropertiesLocation location) throws IOException
IOException
protected Properties loadPropertiesFromClasspath(CamelContext context, boolean ignoreMissingLocation, PropertiesLocation location) throws IOException
IOException
protected Properties loadPropertiesFromRegistry(CamelContext context, boolean ignoreMissingLocation, PropertiesLocation location) throws IOException
IOException
protected Properties prepareLoadedProperties(Properties properties)
properties
- the propertiesApache Camel