@Reference(name="function", cardinality=OPTIONAL_MULTIPLE, policy=DYNAMIC, referenceInterface=PropertiesFunction.class) @Service(value=PlaceholderResolver.class) public class PlaceholderResolverImpl extends Object implements PlaceholderResolver
Modifier and Type | Field and Description |
---|---|
static String |
DEFAULT_PLACEHOLDER_PREFIX |
static String |
DEFAULT_PLACEHOLDER_SUFFIX |
static String |
PLACEHOLDER_PREFIX |
static String |
PLACEHOLDER_SUFFIX |
Constructor and Description |
---|
PlaceholderResolverImpl() |
Modifier and Type | Method and Description |
---|---|
protected void |
bindFunction(PropertiesFunction function) |
String |
replace(String value)
Replaces all the occurrences of variables with their matching values from the resolver using the given source string as a template.
|
boolean |
replaceAll(Dictionary<String,Object> dictionary)
Replaces all the occurrences of variables within the given dictionary
|
boolean |
replaceAll(Map<String,Object> dictionary)
Replaces all the occurrences of variables within the given dictionary
|
boolean |
replaceIn(StringBuilder value)
Replaces all the occurrences of variables within the given source builder with their matching values from the resolver.
|
String |
resolve(String value)
Resolve a placeholder using the strategy indicated by the prefix
|
protected void |
unbindFunction(PropertiesFunction function) |
public static final String PLACEHOLDER_PREFIX
public static final String PLACEHOLDER_SUFFIX
public static final String DEFAULT_PLACEHOLDER_PREFIX
public static final String DEFAULT_PLACEHOLDER_SUFFIX
public String resolve(String value)
PlaceholderResolver
resolve
in interface PlaceholderResolver
value
- the placeholder to resolvepublic String replace(String value)
PlaceholderResolver
replace
in interface PlaceholderResolver
public boolean replaceIn(StringBuilder value)
PlaceholderResolver
replaceIn
in interface PlaceholderResolver
value
- the builder to replace inpublic boolean replaceAll(Dictionary<String,Object> dictionary)
PlaceholderResolver
replaceAll
in interface PlaceholderResolver
dictionary
- the dictionary to replace inpublic boolean replaceAll(Map<String,Object> dictionary)
PlaceholderResolver
replaceAll
in interface PlaceholderResolver
dictionary
- the dictionary to replace inprotected void bindFunction(PropertiesFunction function)
protected void unbindFunction(PropertiesFunction function)
Copyright © 2011–2017 Red Hat. All rights reserved.