org.apache.camel.component.properties
Class DefaultPropertiesParser
java.lang.Object
org.apache.camel.component.properties.DefaultPropertiesParser
- All Implemented Interfaces:
- PropertiesParser
public class DefaultPropertiesParser
- extends Object
- implements PropertiesParser
A parser to parse a string which contains property placeholders
- Version:
|
Field Summary |
protected org.slf4j.Logger |
log
|
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
log
protected final transient org.slf4j.Logger log
DefaultPropertiesParser
public DefaultPropertiesParser()
parseUri
public String parseUri(String text,
Properties properties,
String prefixToken,
String suffixToken)
throws IllegalArgumentException
- Description copied from interface:
PropertiesParser
- Parses the string and replaces the property placeholders with values from the given properties.
- Specified by:
parseUri in interface PropertiesParser
- Parameters:
text - the text to be parsedproperties - the properties resolved which values should be looked upprefixToken - the prefix tokensuffixToken - the suffix token
- Returns:
- the parsed text with replaced placeholders
- Throws:
IllegalArgumentException - if uri syntax is not valid or a property is not found
parseProperty
public String parseProperty(String key,
String value,
Properties properties)
- Description copied from interface:
PropertiesParser
- While parsing the uri using
parseUri each
parsed property found invokes this callback.
This strategy method allows you to hook into the parsing and do custom lookup and return the actual value to use.
- Specified by:
parseProperty in interface PropertiesParser
- Parameters:
key - the keyvalue - the valueproperties - the properties resolved which values should be looked up
- Returns:
- the value to use
Apache CAMEL