Specialization of abstract interface class ConfigurationPlugin, retrieves configuration data from the system environment.
Its priority value usually is Configuration.PRIO_ENVIRONMENT, which is higher than Configuration.PRIO_STANDARD but lower than Configuration.PRIO_CLI_ARGS.
Variable categories are used as a prefix together with an underscore '_'. This means, if variable LOCALE in category ALIB is accessed, the environment variable ALIB_LOCALE is read.
Category and Variable names are insensitive in respect to character case.
Public Methods | |
Environment () | |
boolean | load (Variable variable, boolean searchOnly) |
Public Methods inherited from ConfigurationPlugin | |
boolean | load (Variable variable) |
boolean | store (Variable variable) |
boolean | store (Variable variable, Object externalizedValue) |
Protected Fields | |
AString | tmpAS = new AString() |
A temporary string to reuse. | |
Protected Fields inherited from ConfigurationPlugin | |
XTernalizer | defaultStringConverter = new XTernalizer() |
Additional Inherited Members | |
Public Fields inherited from ConfigurationPlugin | |
XTernalizer | stringConverter |
Protected Methods inherited from ConfigurationPlugin | |
ConfigurationPlugin () | |
Environment | ( | ) |
Constructor.
boolean load | ( | Variable | variable, |
boolean | searchOnly | ||
) |
Searches the variable in the environment.
variable | The variable to retrieve. |
searchOnly | If true , the variable is not set. Defaults to false . |
true
if variable was found, false
if not. Reimplemented from ConfigurationPlugin.