version 1.22, 2009/06/11 07:28:57
|
version 1.22.6.1, 2013/06/03 22:35:51
|
|
|
#include<Pegasus/Common/ObjectNormalizer.h> | #include<Pegasus/Common/ObjectNormalizer.h> |
#include "ConfigManager.h" | #include "ConfigManager.h" |
#include "NormalizationPropertyOwner.h" | #include "NormalizationPropertyOwner.h" |
|
#include "ConfigExceptions.h" |
|
|
| |
PEGASUS_NAMESPACE_BEGIN | PEGASUS_NAMESPACE_BEGIN |
| |
|
|
{ | { |
struct ConfigProperty* configProperty = _lookupConfigProperty(name); | struct ConfigProperty* configProperty = _lookupConfigProperty(name); |
| |
propertyInfo.clear(); |
buildPropertyInfo(name, configProperty, propertyInfo); |
|
|
propertyInfo.append(configProperty->propertyName); |
|
propertyInfo.append(configProperty->defaultValue); |
|
propertyInfo.append(configProperty->currentValue); |
|
propertyInfo.append(configProperty->plannedValue); |
|
|
|
if (configProperty->dynamic == IS_DYNAMIC) |
|
{ |
|
propertyInfo.append(STRING_TRUE); |
|
} |
|
else |
|
{ |
|
propertyInfo.append(STRING_FALSE); |
|
} |
|
|
|
if (configProperty->externallyVisible == IS_VISIBLE) |
|
{ |
|
propertyInfo.append(STRING_TRUE); |
|
} |
|
else |
|
{ |
|
propertyInfo.append(STRING_FALSE); |
|
} |
|
} | } |
| |
String NormalizationPropertyOwner::getDefaultValue(const String& name) const | String NormalizationPropertyOwner::getDefaultValue(const String& name) const |
|
|
const String& userName, | const String& userName, |
Uint32 timeoutSeconds) | Uint32 timeoutSeconds) |
{ | { |
|
struct ConfigProperty* configProperty = _lookupConfigProperty(name); |
|
|
// make sure the property is dynamic before updating the value. | // make sure the property is dynamic before updating the value. |
if (!isDynamic(name)) |
if (configProperty->dynamic != IS_DYNAMIC) |
{ | { |
throw NonDynamicConfigProperty(name); | throw NonDynamicConfigProperty(name); |
} | } |
initCurrentValue(name, value); |
|
|
configProperty->currentValue = value; |
|
ObjectNormalizer::setEnableNormalization( |
|
ConfigManager::parseBooleanValue(value)); |
|
|
|
|
} | } |
| |
void NormalizationPropertyOwner::updatePlannedValue( | void NormalizationPropertyOwner::updatePlannedValue( |