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);
}
Пример #2
0
/**
    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);
    }

    struct ConfigProperty * configProperty = _lookupConfigProperty(name);

    configProperty->currentValue = 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);
}
Пример #5
0
/**
    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)
{
    struct ConfigProperty* configProperty = _lookupConfigProperty(name);

    //
    // make sure the property is dynamic before updating the value.
    //
    if (configProperty->dynamic != IS_DYNAMIC)
    {
        throw NonDynamicConfigProperty(name);
    }

    configProperty->currentValue = value;
}
void NormalizationPropertyOwner::updateCurrentValue(
    const String& name,
    const String& value,
    const String& userName,
    Uint32 timeoutSeconds)
{
    struct ConfigProperty* configProperty = _lookupConfigProperty(name);

    // make sure the property is dynamic before updating the value.
    if (configProperty->dynamic != IS_DYNAMIC)
    {
        throw NonDynamicConfigProperty(name);
    }

    configProperty->currentValue = value;
    ObjectNormalizer::setEnableNormalization(
        ConfigManager::parseBooleanValue(value));


}
Пример #7
0
/**
    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);
}