public class PlaceholderUtils extends Object
| Modifier and Type | Field and Description |
|---|---|
static org.springframework.util.PropertyPlaceholderHelper |
PLACEHOLDER_HELPER_STRICT |
| Constructor and Description |
|---|
PlaceholderUtils() |
| Modifier and Type | Method and Description |
|---|---|
static InputStream |
resolvePlaceholders(InputStream configInputStream,
SettingsBean settingsBean,
boolean ignoreUnresolvablePlaceholders)
Resolve
${...} placeholders in the given configuration resource stream, replacing them with corresponding values from DX
settings (SettingsBean) with a fallback to Java system properties. |
static String |
resolvePlaceholders(String text,
SettingsBean settingsBean,
boolean ignoreUnresolvablePlaceholders)
Resolve
${...} placeholders in the given text, replacing them with corresponding values from DX settings
(SettingsBean) with a fallback to Java system properties. |
public static final org.springframework.util.PropertyPlaceholderHelper PLACEHOLDER_HELPER_STRICT
public static InputStream resolvePlaceholders(InputStream configInputStream, SettingsBean settingsBean, boolean ignoreUnresolvablePlaceholders) throws IOException
${...} placeholders in the given configuration resource stream, replacing them with corresponding values from DX
settings (SettingsBean) with a fallback to Java system properties. Unresolvable placeholders with no default value are
ignored and passed through unchanged if the flag is set to true.configInputStream - the configuration resource input stream to relpace plpaceholders insettingsBean - the DX settings bean instanceignoreUnresolvablePlaceholders - whether unresolved placeholders are to be ignoredIOException - in case of an I/O errorsIllegalArgumentException - if there is an unresolvable placeholder and the "ignoreUnresolvablePlaceholders" flag is
falsepublic static String resolvePlaceholders(String text, SettingsBean settingsBean, boolean ignoreUnresolvablePlaceholders)
${...} placeholders in the given text, replacing them with corresponding values from DX settings
(SettingsBean) with a fallback to Java system properties. Unresolvable placeholders with no default value are ignored and
passed through unchanged if the flag is set to true.text - the String to resolvesettingsBean - the DX settings bean instanceignoreUnresolvablePlaceholders - whether unresolved placeholders are to be ignoredIllegalArgumentException - if there is an unresolvable placeholder and the "ignoreUnresolvablePlaceholders" flag is
falseCopyright © 2004–2020 Jahia Solutions Group SA. All rights reserved.