version 1.2, 2002/04/25 03:18:01
|
version 1.3, 2002/04/25 04:23:40
|
|
|
} | } |
} | } |
| |
/** |
struct ConfigProperty* FileSystemPropertyOwner::_lookupConfigProperty( |
Get information about the specified property. |
const String& name) |
*/ |
|
void FileSystemPropertyOwner::getPropertyInfo( |
|
const String& name, |
|
Array<String>& propertyInfo) |
|
{ | { |
propertyInfo.clear(); |
|
|
|
if (String::equalNoCase(_repositoryDir->propertyName, name)) | if (String::equalNoCase(_repositoryDir->propertyName, name)) |
{ | { |
propertyInfo.append(_repositoryDir->propertyName); |
return _repositoryDir; |
propertyInfo.append(_repositoryDir->defaultValue); |
|
propertyInfo.append(_repositoryDir->currentValue); |
|
propertyInfo.append(_repositoryDir->plannedValue); |
|
if (_repositoryDir->dynamic) |
|
{ |
|
propertyInfo.append(STRING_TRUE); |
|
} |
|
else |
|
{ |
|
propertyInfo.append(STRING_FALSE); |
|
} |
|
} | } |
else if (String::equalNoCase(_providerDir->propertyName, name)) | else if (String::equalNoCase(_providerDir->propertyName, name)) |
{ | { |
propertyInfo.append(_providerDir->propertyName); |
return _providerDir; |
propertyInfo.append(_providerDir->defaultValue); |
} |
propertyInfo.append(_providerDir->currentValue); |
else if (String::equalNoCase(_consumerDir->propertyName, name)) |
propertyInfo.append(_providerDir->plannedValue); |
|
if (_providerDir->dynamic) |
|
{ | { |
propertyInfo.append(STRING_TRUE); |
return _consumerDir; |
} | } |
else | else |
{ | { |
propertyInfo.append(STRING_FALSE); |
throw UnrecognizedConfigProperty(name); |
} | } |
} | } |
else if (String::equalNoCase(_consumerDir->propertyName, name)) |
|
|
/** |
|
Get information about the specified property. |
|
*/ |
|
void FileSystemPropertyOwner::getPropertyInfo( |
|
const String& name, |
|
Array<String>& propertyInfo) |
{ | { |
propertyInfo.append(_consumerDir->propertyName); |
propertyInfo.clear(); |
propertyInfo.append(_consumerDir->defaultValue); |
|
propertyInfo.append(_consumerDir->currentValue); |
struct ConfigProperty* configProperty = _lookupConfigProperty(name); |
propertyInfo.append(_consumerDir->plannedValue); |
|
if (_consumerDir->dynamic) |
propertyInfo.append(configProperty->propertyName); |
|
propertyInfo.append(configProperty->defaultValue); |
|
propertyInfo.append(configProperty->currentValue); |
|
propertyInfo.append(configProperty->plannedValue); |
|
if (configProperty->dynamic) |
{ | { |
propertyInfo.append(STRING_TRUE); | propertyInfo.append(STRING_TRUE); |
} | } |
|
|
propertyInfo.append(STRING_FALSE); | propertyInfo.append(STRING_FALSE); |
} | } |
} | } |
else |
|
{ |
|
throw UnrecognizedConfigProperty(name); |
|
} |
|
} |
|
| |
| |
/** | /** |
|
|
*/ | */ |
const String FileSystemPropertyOwner::getDefaultValue(const String& name) | const String FileSystemPropertyOwner::getDefaultValue(const String& name) |
{ | { |
if (String::equalNoCase(_repositoryDir->propertyName, name)) |
struct ConfigProperty* configProperty = _lookupConfigProperty(name); |
{ |
return configProperty->defaultValue; |
return (_repositoryDir->defaultValue); |
|
} |
|
else if (String::equalNoCase(_providerDir->propertyName, name)) |
|
{ |
|
return (_providerDir->defaultValue); |
|
} |
|
else if (String::equalNoCase(_consumerDir->propertyName, name)) |
|
{ |
|
return (_consumerDir->defaultValue); |
|
} |
|
else |
|
{ |
|
throw UnrecognizedConfigProperty(name); |
|
} |
|
} | } |
| |
/** | /** |
|
|
*/ | */ |
const String FileSystemPropertyOwner::getCurrentValue(const String& name) | const String FileSystemPropertyOwner::getCurrentValue(const String& name) |
{ | { |
if (String::equalNoCase(_repositoryDir->propertyName, name)) |
struct ConfigProperty* configProperty = _lookupConfigProperty(name); |
{ |
return configProperty->currentValue; |
return (_repositoryDir->currentValue); |
|
} |
|
else if (String::equalNoCase(_providerDir->propertyName, name)) |
|
{ |
|
return (_providerDir->currentValue); |
|
} |
|
else if (String::equalNoCase(_consumerDir->propertyName, name)) |
|
{ |
|
return (_consumerDir->currentValue); |
|
} |
|
else |
|
{ |
|
throw UnrecognizedConfigProperty(name); |
|
} |
|
} | } |
| |
/** | /** |
|
|
*/ | */ |
const String FileSystemPropertyOwner::getPlannedValue(const String& name) | const String FileSystemPropertyOwner::getPlannedValue(const String& name) |
{ | { |
if (String::equalNoCase(_repositoryDir->propertyName, name)) |
struct ConfigProperty* configProperty = _lookupConfigProperty(name); |
{ |
return configProperty->plannedValue; |
return (_repositoryDir->plannedValue); |
|
} |
|
else if (String::equalNoCase(_providerDir->propertyName, name)) |
|
{ |
|
return (_providerDir->plannedValue); |
|
} |
|
else if (String::equalNoCase(_consumerDir->propertyName, name)) |
|
{ |
|
return (_consumerDir->plannedValue); |
|
} |
|
else |
|
{ |
|
throw UnrecognizedConfigProperty(name); |
|
} |
|
} | } |
| |
/** | /** |
|
|
const String& name, | const String& name, |
const String& value) | const String& value) |
{ | { |
if (String::equalNoCase(_repositoryDir->propertyName, name)) |
struct ConfigProperty* configProperty = _lookupConfigProperty(name); |
{ |
configProperty->currentValue = value; |
_repositoryDir->currentValue = value; |
|
} |
|
else if (String::equalNoCase(_providerDir->propertyName, name)) |
|
{ |
|
_providerDir->currentValue = value; |
|
} |
|
else if (String::equalNoCase(_consumerDir->propertyName, name)) |
|
{ |
|
_consumerDir->currentValue = value; |
|
} |
|
else |
|
{ |
|
throw UnrecognizedConfigProperty(name); |
|
} |
|
} | } |
| |
| |
|
|
const String& name, | const String& name, |
const String& value) | const String& value) |
{ | { |
if (String::equalNoCase(_repositoryDir->propertyName, name)) |
struct ConfigProperty* configProperty = _lookupConfigProperty(name); |
{ |
configProperty->plannedValue = value; |
_repositoryDir->plannedValue = value; |
|
} |
|
else if (String::equalNoCase(_providerDir->propertyName, name)) |
|
{ |
|
_providerDir->plannedValue = value; |
|
} |
|
else if (String::equalNoCase(_consumerDir->propertyName, name)) |
|
{ |
|
_consumerDir->plannedValue = value; |
|
} |
|
else |
|
{ |
|
throw UnrecognizedConfigProperty(name); |
|
} |
|
} | } |
| |
/** | /** |
|
|
{ | { |
throw NonDynamicConfigProperty(name); | throw NonDynamicConfigProperty(name); |
} | } |
|
|
|
struct ConfigProperty* configProperty = _lookupConfigProperty(name); |
|
configProperty->currentValue = value; |
} | } |
| |
| |
|
|
const String& name, | const String& name, |
const String& value) | const String& value) |
{ | { |
if (String::equalNoCase(_repositoryDir->propertyName, name)) |
struct ConfigProperty* configProperty = _lookupConfigProperty(name); |
{ |
configProperty->plannedValue = value; |
_repositoryDir->plannedValue = value; |
|
} |
|
else if (String::equalNoCase(_providerDir->propertyName, name)) |
|
{ |
|
_providerDir->plannedValue = value; |
|
} |
|
else if (String::equalNoCase(_consumerDir->propertyName, name)) |
|
{ |
|
_consumerDir->plannedValue = value; |
|
} |
|
else |
|
{ |
|
throw UnrecognizedConfigProperty(name); |
|
} |
|
} | } |
| |
/** | /** |
|
|
*/ | */ |
Boolean FileSystemPropertyOwner::isDynamic(const String& name) | Boolean FileSystemPropertyOwner::isDynamic(const String& name) |
{ | { |
if (String::equalNoCase(_repositoryDir->propertyName, name)) |
struct ConfigProperty* configProperty = _lookupConfigProperty(name); |
{ |
return configProperty->dynamic; |
return (_repositoryDir->dynamic); |
|
} |
|
else if (String::equalNoCase(_providerDir->propertyName, name)) |
|
{ |
|
return (_providerDir->dynamic); |
|
} |
|
else if (String::equalNoCase(_consumerDir->propertyName, name)) |
|
{ |
|
return (_consumerDir->dynamic); |
|
} |
|
else |
|
{ |
|
throw UnrecognizedConfigProperty(name); |
|
} |
|
} | } |
| |
| |