Class SystemPropertyAndEnvironmentSubstitutor
- java.lang.Object
-
- org.apache.commons.text.StringSubstitutor
-
- org.sdase.commons.server.dropwizard.bundles.SystemPropertyAndEnvironmentSubstitutor
-
public class SystemPropertyAndEnvironmentSubstitutor extends org.apache.commons.text.StringSubstitutor
AStringSubstitutor
that picks properties fromSystem.getProperty(String)
(preferred) andSystem.getenv(String)
(secondary) that may be modified by operators. Substitution variables are identified according the defaults ofStringSubstitutor
.
-
-
Constructor Summary
Constructors Constructor Description SystemPropertyAndEnvironmentSubstitutor()
SystemPropertyAndEnvironmentSubstitutor(boolean strict)
SystemPropertyAndEnvironmentSubstitutor(boolean strict, boolean substitutionInVariables)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected boolean
substitute(org.apache.commons.text.TextStringBuilder buf, int offset, int length)
-
Methods inherited from class org.apache.commons.text.StringSubstitutor
createInterpolator, getEscapeChar, getStringLookup, getValueDelimiterMatcher, getVariablePrefixMatcher, getVariableSuffixMatcher, isDisableSubstitutionInValues, isEnableSubstitutionInVariables, isEnableUndefinedVariableException, isPreserveEscapes, replace, replace, replace, replace, replace, replace, replace, replace, replace, replace, replace, replace, replace, replace, replaceIn, replaceIn, replaceIn, replaceIn, replaceIn, replaceIn, replaceSystemProperties, resolveVariable, setDisableSubstitutionInValues, setEnableSubstitutionInVariables, setEnableUndefinedVariableException, setEscapeChar, setPreserveEscapes, setValueDelimiter, setValueDelimiter, setValueDelimiterMatcher, setVariablePrefix, setVariablePrefix, setVariablePrefixMatcher, setVariableResolver, setVariableSuffix, setVariableSuffix, setVariableSuffixMatcher
-
-
-
-
Constructor Detail
-
SystemPropertyAndEnvironmentSubstitutor
public SystemPropertyAndEnvironmentSubstitutor()
-
SystemPropertyAndEnvironmentSubstitutor
public SystemPropertyAndEnvironmentSubstitutor(boolean strict)
-
SystemPropertyAndEnvironmentSubstitutor
public SystemPropertyAndEnvironmentSubstitutor(boolean strict, boolean substitutionInVariables)
- Parameters:
strict
-true
if looking up undefined environment variables should throw aUndefinedEnvironmentVariableException
,false
otherwise.substitutionInVariables
- a flag whether substitution is done in variable names.- See Also:
StringSubstitutor.setEnableSubstitutionInVariables(boolean)
-
-