public interface PropertiesComponent extends Component
Modifier and Type | Field and Description |
---|---|
static String |
DEFAULT_CREATED
Has the component been created as a default by
CamelContext during starting up Camel. |
static String |
DEFAULT_PREFIX_TOKEN
The default prefix token.
|
static String |
DEFAULT_SUFFIX_TOKEN
The default suffix token.
|
Modifier and Type | Method and Description |
---|---|
void |
addLocation(String location)
Adds the list of locations to the current locations, where to load properties.
|
String |
getPrefixToken() |
String |
getSuffixToken() |
Properties |
loadProperties()
Loads the properties from the default locations.
|
Properties |
loadProperties(String... locations)
Loads the properties from the given locations
|
String |
parseUri(String uri)
Parses the input text and resolve all property placeholders.
|
String |
parseUri(String uri,
String... locations)
Parses the input text and resolve all property placeholders.
|
void |
setIgnoreMissingLocation(boolean ignoreMissingLocation)
Whether to silently ignore if a location cannot be located, such as a properties file not found.
|
void |
setInitialProperties(Properties initialProperties)
Sets initial properties which will be added before any property locations are loaded.
|
void |
setLocation(String location)
A list of locations to load properties.
|
void |
setOverrideProperties(Properties overrideProperties)
Sets a special list of override properties that take precedence
and will use first, if a property exist.
|
createEndpoint, getExtension, getSupportedExtensions, trySetComponent, useRawUri
getCamelContext, setCamelContext, trySetCamelContext
static final String DEFAULT_PREFIX_TOKEN
static final String DEFAULT_SUFFIX_TOKEN
static final String DEFAULT_CREATED
CamelContext
during starting up Camel.String getPrefixToken()
String getSuffixToken()
String parseUri(String uri)
uri
- input textIllegalArgumentException
- is thrown if error during parsingString parseUri(String uri, String... locations)
uri
- input textlocations
- locations to load as properties (will not use the default locations)IllegalArgumentException
- is thrown if error during parsingProperties loadProperties()
IOError
- is thrown if error loading propertiesProperties loadProperties(String... locations)
locations
- locations to load as properties (will not use the default locations)IOError
- is thrown if error loading propertiesvoid setLocation(String location)
void addLocation(String location)
void setIgnoreMissingLocation(boolean ignoreMissingLocation)
void setInitialProperties(Properties initialProperties)
void setOverrideProperties(Properties overrideProperties)
Apache Camel