Exemplo n.º 1
0
/**
    Init planned value of the specified property to the specified value.
*/
void ShutdownPropertyOwner::initPlannedValue(
    const String& name,
    const String& value)
{
    struct ConfigProperty* configProperty = _lookupConfigProperty(name);
    configProperty->plannedValue = value;
}
/**
    Get current value of the specified property.
*/
String ProviderDirPropertyOwner::getCurrentValue(const String& name) const
{
    struct ConfigProperty * configProperty = _lookupConfigProperty(name);

    AutoMutex lock(_providerDirMutex);
    return configProperty->currentValue;
}
/**
    Update planned value of the specified property to the specified value.
*/
void ProviderDirPropertyOwner::updatePlannedValue(
    const String& name,
    const String& value)
{
    struct ConfigProperty* configProperty = _lookupConfigProperty(name);
    configProperty->plannedValue = value;
}
Exemplo n.º 4
0
/**
    Get information about the specified property.
*/
void ShutdownPropertyOwner::getPropertyInfo(
    const String& name,
    Array<String>& propertyInfo) const
{
    propertyInfo.clear();
    struct ConfigProperty * configProperty = _lookupConfigProperty(name);

    propertyInfo.append(configProperty->propertyName);
    propertyInfo.append(configProperty->defaultValue);
    propertyInfo.append(configProperty->currentValue);
    propertyInfo.append(configProperty->plannedValue);
    if (configProperty->dynamic)
    {
        propertyInfo.append(STRING_TRUE);
    }
    else
    {
        propertyInfo.append(STRING_FALSE);
    }
    if (configProperty->externallyVisible)
    {
        propertyInfo.append(STRING_TRUE);
    }
    else
    {
        propertyInfo.append(STRING_FALSE);
    }
}
void NormalizationPropertyOwner::getPropertyInfo(
    const String& name,
    Array<String>& propertyInfo) const
{
    struct ConfigProperty* configProperty = _lookupConfigProperty(name);

    propertyInfo.clear();

    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);
    }
}
void NormalizationPropertyOwner::getPropertyInfo(
    const String& name,
    Array<String>& propertyInfo) const
{
    struct ConfigProperty* configProperty = _lookupConfigProperty(name);

    buildPropertyInfo(name, configProperty, propertyInfo);
}
void NormalizationPropertyOwner::updatePlannedValue(
    const String& name,
    const String& value)
{
    struct ConfigProperty* configProperty = _lookupConfigProperty(name);

    configProperty->plannedValue = value;
}
/**
    Init current value of the specified property to the specified value.
*/
void ProviderDirPropertyOwner::initCurrentValue(
    const String& name,
    const String& value)
{
    struct ConfigProperty* configProperty = _lookupConfigProperty(name);
    AutoMutex lock(_providerDirMutex);
    configProperty->currentValue = value;
}
void NormalizationPropertyOwner::initCurrentValue(
    const String& name,
    const String& value)
{
    struct ConfigProperty* configProperty = _lookupConfigProperty(name);

    configProperty->currentValue = value;
    ObjectNormalizer::setEnableNormalization(
        String::equalNoCase(value,"true"));
}
void NormalizationPropertyOwner::initCurrentValue(
    const String& name,
    const String& value)
{
    struct ConfigProperty* configProperty = _lookupConfigProperty(name);

    configProperty->currentValue = value;
    ObjectNormalizer::setEnableNormalization(
        ConfigManager::parseBooleanValue(value));
}
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;
}
Exemplo n.º 12
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));


}
Exemplo n.º 14
0
/**
    Init current value of the specified property to the specified value.
*/
void LogPropertyOwner::initCurrentValue(
    const String& name,
    const String& value)
{
    if (String::equal(_logLevel->propertyName,name))
    {
        _logLevel->currentValue = value;
        Logger::setlogLevelMask(_logLevel->currentValue);
    }
    else
#if !defined(PEGASUS_USE_SYSLOGS)
    if (String::equal(_maxLogFileSizeKBytes->propertyName,name))
    {
        Boolean status = false;
        Uint64 maxLogFileSizeKBytes=0;

        status = StringConversion::decimalStringToUint64(
            value.getCString(),
            maxLogFileSizeKBytes);

        if (!status||(maxLogFileSizeKBytes <
            PEGASUS_MAXLOGFILESIZEKBYTES_CONFIG_PROPERTY_MINIMUM_VALUE))
        {
            throw InvalidPropertyValue(name, value);
        }
        _maxLogFileSizeKBytes->currentValue = value;

        Logger::setMaxLogFileSize((Uint32)(maxLogFileSizeKBytes*1024));
    }
    else
#endif
    {
        struct ConfigProperty* configProperty = _lookupConfigProperty(name);
        configProperty->currentValue = value;
    }
}
Exemplo n.º 15
0
/**
    Get planned value of the specified property.
*/
String ShutdownPropertyOwner::getPlannedValue(const String& name) const
{
    struct ConfigProperty * configProperty = _lookupConfigProperty(name);
    return configProperty->plannedValue;
}
Exemplo n.º 16
0
/**
    Get current value of the specified property.
*/
String ShutdownPropertyOwner::getCurrentValue(const String& name) const
{
    struct ConfigProperty * configProperty = _lookupConfigProperty(name);
    return configProperty->currentValue;
}
Exemplo n.º 17
0
/**
    Get default value of the specified property.
*/
String ProviderDirPropertyOwner::getDefaultValue(const String& name) const
{
    struct ConfigProperty * configProperty = _lookupConfigProperty(name);

    return configProperty->defaultValue;
}
void NormalizationPropertyOwner::initCurrentValue(const String & name, const String & value)
{
    struct ConfigProperty * configProperty = _lookupConfigProperty(name);

    configProperty->currentValue = value;
}
String NormalizationPropertyOwner::getDefaultValue(const String& name) const
{
    struct ConfigProperty* configProperty = _lookupConfigProperty(name);

    return configProperty->defaultValue;
}
Exemplo n.º 20
0
/**
    Checks to see if the specified property is dynamic or not.
*/
Boolean ShutdownPropertyOwner::isDynamic(const String& name) const
{
    struct ConfigProperty* configProperty = _lookupConfigProperty(name);
    return (configProperty->dynamic == IS_DYNAMIC);
}
String NormalizationPropertyOwner::getPlannedValue(const String & name) const
{
    struct ConfigProperty * configProperty = _lookupConfigProperty(name);

    return(configProperty->plannedValue);
}