/** Update current value of the specified property to the specified value */ void DefaultPropertyOwner::updateCurrentValue( const String& name, const String& value, const String& userName, Uint32 timeoutSeconds) { // // make sure the property is dynamic before updating the value. // if (!isDynamic(name)) { throw NonDynamicConfigProperty(name); } #ifdef PEGASUS_ENABLE_DMTF_INDICATION_PROFILE_SUPPORT if (String::equal(name, "enableIndicationService")) { ConfigProperty *configProperty = 0; for (Uint32 i = 0; i < NUM_PROPERTIES; i++) { if (String::equal(_configProperties.get()[i].propertyName, name)) { configProperty = &_configProperties.get()[i]; break; } } PEGASUS_ASSERT(configProperty); _requestIndicationServiceStateChange( userName, ConfigManager::parseBooleanValue(value), timeoutSeconds); configProperty->currentValue = value; return; } #endif // // Since the validations done in initCurrrentValue are sufficient and // no additional validations required for update, we shall call // initCurrrentValue. // initCurrentValue(name, value); #ifdef PEGASUS_ENABLE_AUDIT_LOGGER if (String::equal(name, "enableAuditLog") && isValid(name, value)) { Boolean enableAuditLog = ConfigManager::parseBooleanValue(value); AuditLogger::setEnabled(enableAuditLog); } #endif }
void NormalizationPropertyOwner::updateCurrentValue( const String& name, const String& value) { // make sure the property is dynamic before updating the value. if (!isDynamic(name)) { throw NonDynamicConfigProperty(name); } initCurrentValue(name, value); }
/** Update current value of the specified property to the specified value. */ void ProviderDirPropertyOwner::updateCurrentValue( const String& name, const String& value, const String& userName, Uint32 timeoutSeconds) { // // make sure the property is dynamic before updating the value. // if (!isDynamic(name)) { throw NonDynamicConfigProperty(name); } initCurrentValue(name, value); }
/** Initialize config property with the value specified in the command line. */ Boolean ConfigManager::_initPropertyWithCommandLineOption( const String& option) { Uint32 pos = option.find('='); if (pos == PEG_NOT_FOUND) { // // The property value was not specified // throw UnrecognizedConfigProperty(option); } // // Get the property name and value // String propertyName = option.subString(0, pos); String propertyValue = option.subString(pos + 1); return initCurrentValue(propertyName, propertyValue); }
/** Update current value of the specified property to the specified value. */ void ShutdownPropertyOwner::updateCurrentValue( const String& name, const String& value, const String& userName, Uint32 timeoutSeconds) { // // make sure the property is dynamic before updating the value. // if (!isDynamic(name)) { throw NonDynamicConfigProperty(name); } // // Since the validations done in initCurrrentValue are sufficient and // no additional validations required for update, we will call // initCurrrentValue. // initCurrentValue(name, value); }