Package com.day.cq.mailer.commons
Class ProfileVariableSubstitutor
java.lang.Object
org.apache.commons.lang.text.StrSubstitutor
com.day.cq.mailer.commons.ProfileVariableSubstitutor
Deprecated.
use org.apache.commons.text.StringSubstitutor and, where needed,
org.apache.commons.text.StringLookup instead.
Extents the
StrSubstitutor
to clean up variables that have not been replaced.- Since:
- 5.4
- See Also:
-
Field Summary
Fields inherited from class org.apache.commons.lang.text.StrSubstitutor
DEFAULT_ESCAPE, DEFAULT_PREFIX, DEFAULT_SUFFIX -
Constructor Summary
Constructors -
Method Summary
Methods inherited from class org.apache.commons.lang.text.StrSubstitutor
getEscapeChar, getVariablePrefixMatcher, getVariableResolver, getVariableSuffixMatcher, isEnableSubstitutionInVariables, replace, replace, replace, replace, replace, replace, replace, replace, replace, replace, replace, replace, replaceIn, replaceIn, replaceIn, replaceIn, replaceSystemProperties, setEnableSubstitutionInVariables, setEscapeChar, setVariablePrefix, setVariablePrefix, setVariablePrefixMatcher, setVariableResolver, setVariableSuffix, setVariableSuffix, setVariableSuffixMatcher
-
Constructor Details
-
ProfileVariableSubstitutor
Deprecated.
-
-
Method Details
-
replace
Deprecated.Replaces all the occurrences of variables with their matching values from the resolver using the given source string as a template. ifdoCleanupnon replaced variables are removed (i.e. replaced by "").- Parameters:
source- - the string to replace in, null returns nulldoCleanup- - True to do the clean up- Returns:
- the result of the replace operation
-