Class ConfigUtils


  • public class ConfigUtils
    extends Object
    • Constructor Detail

      • ConfigUtils

        public ConfigUtils()
    • Method Detail

      • interpolate

        public static String interpolate​(String expression,
                                         boolean required)
        Interpolates the given expression. The expression is expected to be in the form of ${config.property.name}.
        Parameters:
        expression - the expression to interpolate
        required - whether the expression is required to be present in the configuration
        Returns:
        null if the resulting expression is empty, otherwise the interpolated expression
      • getConfigValue

        public static String getConfigValue​(String configProperty,
                                            boolean required)
        Obtains the value of the {@param configProperty} expression. This expressions MUST be in the form of ${...}
      • doGetConfigValue

        public static String doGetConfigValue​(String configPropertyName,
                                              boolean required,
                                              String propertyName)
        Obtains the value of the {@param propertyName} name, meaning that the name must NOT start with '${' or end with '}'