public class InternalSettingsPreparer
extends java.lang.Object
Modifier and Type | Field | Description |
---|---|---|
static java.lang.String |
SECRET_PROMPT_VALUE |
|
static java.lang.String |
TEXT_PROMPT_VALUE |
Constructor | Description |
---|---|
InternalSettingsPreparer() |
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.
|
public static final java.lang.String SECRET_PROMPT_VALUE
public static final java.lang.String TEXT_PROMPT_VALUE
public static Settings prepareSettings(Settings input)
public static Environment prepareEnvironment(Settings input, Terminal terminal)
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.input
- The custom settings to use. These are not overwritten by settings in the configuration file.terminal
- the Terminal to use for input/outputSettings
and Environment
as a Tuple
public static Environment prepareEnvironment(Settings input, Terminal terminal, java.util.Map<java.lang.String,java.lang.String> properties, java.nio.file.Path configPath)
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.input
- the custom settings to use; these are not overwritten by settings in the configuration fileterminal
- the Terminal to use for input/outputproperties
- map of properties key/value pairs (usually from the command-line)configPath
- path to config directory; (use null to indicate the default)Settings
and Environment
as a Tuple