public class DefaultPropertiesParser extends Object implements AugmentedPropertyNameAwarePropertiesParser
| Modifier and Type | Field and Description |
|---|---|
protected org.slf4j.Logger |
log |
| Constructor and Description |
|---|
DefaultPropertiesParser() |
DefaultPropertiesParser(PropertiesComponent propertiesComponent) |
| Modifier and Type | Method and Description |
|---|---|
PropertiesComponent |
getPropertiesComponent() |
String |
parseProperty(String key,
String value,
Properties properties)
While parsing the uri using
parseUri each
parsed property found invokes this callback. |
String |
parseUri(String text,
Properties properties,
String prefixToken,
String suffixToken)
Parses the string and replaces the property placeholders with values from the given properties.
|
String |
parseUri(String text,
Properties properties,
String prefixToken,
String suffixToken,
String propertyPrefix,
String propertySuffix,
boolean fallbackToUnaugmentedProperty)
Parses the string, applying the optional
propertyPrefix and
propertySuffix to the parsed property names, and replaces the
property placeholders with values from the given properties. |
void |
setPropertiesComponent(PropertiesComponent propertiesComponent) |
protected final org.slf4j.Logger log
public DefaultPropertiesParser()
public DefaultPropertiesParser(PropertiesComponent propertiesComponent)
public PropertiesComponent getPropertiesComponent()
public void setPropertiesComponent(PropertiesComponent propertiesComponent)
public String parseUri(String text, Properties properties, String prefixToken, String suffixToken) throws IllegalArgumentException
PropertiesParserparseUri in interface PropertiesParsertext - the text to be parsedproperties - the properties resolved which values should be looked upprefixToken - the prefix tokensuffixToken - the suffix tokenIllegalArgumentException - if uri syntax is not valid or a property is not foundpublic String parseUri(String text, Properties properties, String prefixToken, String suffixToken, String propertyPrefix, String propertySuffix, boolean fallbackToUnaugmentedProperty) throws IllegalArgumentException
AugmentedPropertyNameAwarePropertiesParserpropertyPrefix and
propertySuffix to the parsed property names, and replaces the
property placeholders with values from the given properties.parseUri in interface AugmentedPropertyNameAwarePropertiesParsertext - the text to be parsedproperties - the properties resolved which values should be looked
upprefixToken - the prefix tokensuffixToken - the suffix tokenpropertyPrefix - the optional property name prefix to augment parsed
property names withpropertySuffix - the optional property name suffix to augment parsed
property names withfallbackToUnaugmentedProperty - flag indicating if the originally
parsed property name should by used for resolution if there is
no match to the augmented property nameIllegalArgumentException - if uri syntax is not valid or a property
is not foundpublic String parseProperty(String key, String value, Properties properties)
PropertiesParserparseUri 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.parseProperty in interface PropertiesParserkey - the keyvalue - the valueproperties - the properties resolved which values should be looked upApache Camel