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(org.apache.camel.CamelContext context,
boolean ignoreMissingLocation,
PropertiesLocation location) |
protected Properties |
loadPropertiesFromFilePath(org.apache.camel.CamelContext context,
boolean ignoreMissingLocation,
PropertiesLocation location) |
protected Properties |
loadPropertiesFromRegistry(org.apache.camel.CamelContext context,
boolean ignoreMissingLocation,
PropertiesLocation location) |
protected Properties |
prepareLoadedProperties(Properties properties)
Strategy to prepare loaded properties before being used by Camel.
|
Properties |
resolveProperties(org.apache.camel.CamelContext context,
boolean ignoreMissingLocation,
List<PropertiesLocation> locations)
Resolve properties from the given uri
|
public DefaultPropertiesResolver(PropertiesComponent propertiesComponent)
public Properties resolveProperties(org.apache.camel.CamelContext context, boolean ignoreMissingLocation, List<PropertiesLocation> locations) throws Exception
PropertiesResolverresolveProperties in interface PropertiesResolvercontext - 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(org.apache.camel.CamelContext context, boolean ignoreMissingLocation, PropertiesLocation location) throws IOException
IOExceptionprotected Properties loadPropertiesFromClasspath(org.apache.camel.CamelContext context, boolean ignoreMissingLocation, PropertiesLocation location) throws IOException
IOExceptionprotected Properties loadPropertiesFromRegistry(org.apache.camel.CamelContext context, boolean ignoreMissingLocation, PropertiesLocation location) throws IOException
IOExceptionprotected Properties prepareLoadedProperties(Properties properties)
properties - the propertiesApache Camel