Class ConfigurationUtil

java.lang.Object
com.github.toolarium.jwebserver.util.ConfigurationUtil

public final class ConfigurationUtil extends Object
The configuration util
  • Method Details

    • getInstance

      public static ConfigurationUtil getInstance()
      Get the instance
      Returns:
      the instance
    • expand

      public String expand(String value)
      Expand a string and replace environment variables or system properties
      Parameters:
      value - the value
      Returns:
      the expanded value
    • expand

      public String[] expand(String[] valueList)
      Expand a string and replace environment variables or system properties
      Parameters:
      valueList - the value list
      Returns:
      the expanded value list
    • convert

      public Integer convert(String name, String value, Integer defaultValue)
      Convert integer
      Parameters:
      name - the attribute name
      value - the value
      defaultValue - the default value
      Returns:
      the value
    • convert

      public Boolean convert(String name, String value, Boolean defaultValue)
      Convert boolean
      Parameters:
      name - the attribute name
      value - the value
      defaultValue - the default value
      Returns:
      the value
    • convert

      public VerboseLevel convert(String name, String value, VerboseLevel defaultValue)
      Convert verbose level
      Parameters:
      name - the attribute name
      value - the value
      defaultValue - the default value
      Returns:
      the value
    • convert

      public com.github.toolarium.common.security.ISecuredValue<String> convert(String name, String value, com.github.toolarium.common.security.ISecuredValue<String> defaultValue)
      Convert secured value
      Parameters:
      name - the attribute name
      value - the value
      defaultValue - the default value
      Returns:
      the value
    • parseStringArray

      public String[] parseStringArray(String stringArray)
      Parse the string array
      Parameters:
      stringArray - the string array
      Returns:
      the parsed string
    • formatArrayAsString

      public String formatArrayAsString(String[] stringArray)
      Format an array as string
      Parameters:
      stringArray - the welcome files
      Returns:
      the formated string