public class EnvironmentMapModuleConfig extends MapModuleConfig
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.Constructor and Description |
---|
EnvironmentMapModuleConfig(Map<Object,Object> properties,
FileSystem fs,
String moduleName) |
Modifier and Type | Method and Description |
---|---|
Set<String> |
getPropertyNames() |
protected Object |
getValue(String propertyName)
Returns the value of the property with the specified name, or
null if it does not exist. |
boolean |
hasProperty(String name) |
setClassProperty, setPathProperty, setStringListProperty, setStringProperty
getOptionalBooleanProperty, getOptionalDateTimeProperty, getOptionalDoubleProperty, getOptionalFloatProperty, getOptionalIntProperty, getOptionalLongProperty, getOptionalPathListProperty, getOptionalPathProperty, getOptionalStringListProperty, getOptionalStringProperty
getBooleanProperty, getBooleanProperty, getClassProperty, getClassProperty, getDateTimeProperty, getDoubleProperty, getDoubleProperty, getEnumProperty, getEnumProperty, getEnumSetProperty, getEnumSetProperty, getFloatProperty, getFloatProperty, getIntervalProperty, getIntProperty, getIntProperty, getLongProperty, getLongProperty, getOptionalClassProperty, getOptionalEnumProperty, getOptionalEnumSetProperty, getOptionalIntervalProperty, getPathListProperty, getPathProperty, getPathProperty, getStringListProperty, getStringListProperty, getStringProperty, getStringProperty
public EnvironmentMapModuleConfig(Map<Object,Object> properties, FileSystem fs, String moduleName)
public boolean hasProperty(String name)
hasProperty
in interface ModuleConfig
hasProperty
in class MapModuleConfig
protected Object getValue(String propertyName)
AbstractMapModuleConfig
null
if it does not exist.
The returned object may be a String
or directly a more specialized type
(Date
or Float
for instance).getValue
in class MapModuleConfig
propertyName
- The name of the property to be looked upnull
otherwise.public Set<String> getPropertyNames()
getPropertyNames
in interface ModuleConfig
getPropertyNames
in class MapModuleConfig
Copyright © 2020. All rights reserved.