Package com.powsybl.commons.config
Class EnvironmentMapModuleConfig
java.lang.Object
com.powsybl.commons.config.AbstractModuleConfig
com.powsybl.commons.config.AbstractMapModuleConfig
com.powsybl.commons.config.MapModuleConfig
com.powsybl.commons.config.EnvironmentMapModuleConfig
- All Implemented Interfaces:
ModuleConfig
A
ModuleConfig
designed to read property values
from the map of environment variables.
For a configuration property named "property-name" in module "module-name",
the expected environment variables name is MODULE_NAME__PROPERTY_NAME.
CamelCase names are also translated to underscore-separated names.- Author:
- Yichen TANG <yichen.tang at rte-france.com>
-
Constructor Summary
ConstructorDescriptionEnvironmentMapModuleConfig
(Map<Object, Object> properties, FileSystem fs, String moduleName) -
Method Summary
Modifier and TypeMethodDescriptionprotected Object
Returns the value of the property with the specified name, ornull
if it does not exist.boolean
hasProperty
(String name) Methods inherited from class com.powsybl.commons.config.MapModuleConfig
setClassProperty, setPathProperty, setStringListProperty, setStringProperty
Methods inherited from class com.powsybl.commons.config.AbstractMapModuleConfig
getOptionalBooleanProperty, getOptionalDateTimeProperty, getOptionalDoubleProperty, getOptionalFloatProperty, getOptionalIntProperty, getOptionalLongProperty, getOptionalPathListProperty, getOptionalPathProperty, getOptionalStringListProperty, getOptionalStringProperty
Methods inherited from class com.powsybl.commons.config.AbstractModuleConfig
getBooleanProperty, getBooleanProperty, getClassProperty, getClassProperty, getDateTimeProperty, getDoubleProperty, getDoubleProperty, getEnumProperty, getEnumProperty, getEnumSetProperty, getEnumSetProperty, getFloatProperty, getFloatProperty, getIntProperty, getIntProperty, getLongProperty, getLongProperty, getOptionalClassProperty, getOptionalEnumProperty, getOptionalEnumSetProperty, getPathListProperty, getPathProperty, getPathProperty, getStringListProperty, getStringListProperty, getStringProperty, getStringProperty
-
Constructor Details
-
EnvironmentMapModuleConfig
-
-
Method Details
-
hasProperty
- Specified by:
hasProperty
in interfaceModuleConfig
- Overrides:
hasProperty
in classMapModuleConfig
-
getValue
Description copied from class:AbstractMapModuleConfig
Returns the value of the property with the specified name, ornull
if it does not exist. The returned object may be aString
or directly a more specialized type (Date
orFloat
for instance).- Overrides:
getValue
in classMapModuleConfig
- Parameters:
propertyName
- The name of the property to be looked up- Returns:
- The value of the specified property it it exists,
null
otherwise.
-
getPropertyNames
- Specified by:
getPropertyNames
in interfaceModuleConfig
- Overrides:
getPropertyNames
in classMapModuleConfig
-