Class InternalSettingsPreparer


  • public class InternalSettingsPreparer
    extends java.lang.Object
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static Environment prepareEnvironment​(Settings input, Terminal terminal)
      Prepares the settings by gathering all elasticsearch system properties, optionally loading the configuration settings, and then replacing all property placeholders.
      static Environment prepareEnvironment​(Settings input, Terminal terminal, java.util.Map<java.lang.String,​java.lang.String> properties, java.nio.file.Path configPath)
      Prepares the settings by gathering all elasticsearch system properties, optionally loading the configuration settings, and then replacing all property placeholders.
      static Settings prepareSettings​(Settings input)
      Prepares the settings by gathering all elasticsearch system properties and setting defaults.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • SECRET_PROMPT_VALUE

        public static final java.lang.String SECRET_PROMPT_VALUE
        See Also:
        Constant Field Values
      • TEXT_PROMPT_VALUE

        public static final java.lang.String TEXT_PROMPT_VALUE
        See Also:
        Constant Field Values
    • Constructor Detail

      • InternalSettingsPreparer

        public InternalSettingsPreparer()
    • Method Detail

      • prepareSettings

        public static Settings prepareSettings​(Settings input)
        Prepares the settings by gathering all elasticsearch system properties and setting defaults.
      • prepareEnvironment

        public static Environment prepareEnvironment​(Settings input,
                                                     Terminal terminal)
        Prepares the settings by gathering all elasticsearch system properties, optionally loading the configuration settings, and then replacing all property placeholders. If a Terminal is provided and configuration settings are loaded, settings with a value of ${prompt.text} or ${prompt.secret} will result in a prompt for the setting to the user.
        Parameters:
        input - The custom settings to use. These are not overwritten by settings in the configuration file.
        terminal - the Terminal to use for input/output
        Returns:
        the Settings and Environment as a Tuple
      • prepareEnvironment

        public static Environment prepareEnvironment​(Settings input,
                                                     Terminal terminal,
                                                     java.util.Map<java.lang.String,​java.lang.String> properties,
                                                     java.nio.file.Path configPath)
        Prepares the settings by gathering all elasticsearch system properties, optionally loading the configuration settings, and then replacing all property placeholders. If a Terminal is provided and configuration settings are loaded, settings with a value of ${prompt.text} or ${prompt.secret} will result in a prompt for the setting to the user.
        Parameters:
        input - the custom settings to use; these are not overwritten by settings in the configuration file
        terminal - the Terminal to use for input/output
        properties - map of properties key/value pairs (usually from the command-line)
        configPath - path to config directory; (use null to indicate the default)
        Returns:
        the Settings and Environment as a Tuple