public abstract class AmbariServerConfiguration extends Object
Modifier and Type | Field and Description |
---|---|
protected Map<String,String> |
configurationMap |
Modifier | Constructor and Description |
---|---|
protected |
AmbariServerConfiguration(Map<String,String> configurationMap) |
Modifier and Type | Method and Description |
---|---|
protected abstract AmbariServerConfigurationCategory |
getCategory() |
protected String |
getValue(AmbariServerConfigurationKey ambariServerConfigurationKey,
Map<String,String> configurationMap)
Gets the configuration value for given
AmbariServerConfigurationKey . |
protected String |
getValue(String propertyName,
Map<String,String> configurationMap,
String defaultValue)
Gets the configuration value for given
AmbariServerConfigurationKey . |
void |
setValueFor(AmbariServerConfigurationKey ambariServerConfigurationKey,
String value)
Sets the given value for the given configuration
|
void |
setValueFor(String configName,
String value)
Sets the given value for the given configuration
|
Map<String,String> |
toMap() |
protected String getValue(AmbariServerConfigurationKey ambariServerConfigurationKey, Map<String,String> configurationMap)
AmbariServerConfigurationKey
.
If no value is found in the supplied configuration map, the default value will be returned.
ambariServerConfigurationKey
- the AmbariServerConfigurationKey
for which to retrieve a valueconfigurationMap
- a map of configuration property names to valuesprotected String getValue(String propertyName, Map<String,String> configurationMap, String defaultValue)
AmbariServerConfigurationKey
.
If no value is found in the supplied configuration map, the default value will be returned.
propertyName
- the property name for which to retrieve a valueconfigurationMap
- a map of configuration property names to valuesdefaultValue
- the default value to use in the event the propery was not set in the configuration mappublic void setValueFor(String configName, String value)
configName
- the name of the configuration to set the value forvalue
- the new valueIllegalArgumentException
- in case the supplied configuration does not belong to the
configuration category of this instancepublic void setValueFor(AmbariServerConfigurationKey ambariServerConfigurationKey, String value)
ambariServerConfigurationKey
- the configuration key to set the value forvalue
- the new valueIllegalArgumentException
- in case the supplied configuration does not belong to the
configuration category of this instanceprotected abstract AmbariServerConfigurationCategory getCategory()
Copyright © 2022 Apache Software Foundation. All rights reserved.