Variables Service provides an interface which enables the value of variables to be found, or variables replaced in some given input:

Method Description

String getValue(String variableName)

Retrieves the value of the environment variable with the name variable. It will return an empty string, if the variable does not exists. However, an empty string return does not mean the variable does not exist: it might exist but its value may actually be 'empty'. If the variable has both system and config values, then the config value overrides the system value, and config value is returned.

Parameters:

  • variableName - the name of the variable.

Map<String, String> getVariables()

Retrieves a Map of the variable name and its value.

String replaceVariables(String input)

Evaluates variables in input and returns expanded string. If input does not contain variables, then it is returned unchanged.

Parameters:

  • input - the input string.

Save

Save