(file) Return to FileSystemPropertyOwner.cpp CVS log (file) (dir) Up to [Pegasus] / pegasus / src / Pegasus / Config

Diff for /pegasus/src/Pegasus/Config/FileSystemPropertyOwner.cpp between version 1.2 and 1.3

version 1.2, 2002/04/25 03:18:01 version 1.3, 2002/04/25 04:23:40
Line 135 
Line 135 
     }     }
 } }
  
 /**  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);
         }         }
Line 189 
Line 180 
             propertyInfo.append(STRING_FALSE);             propertyInfo.append(STRING_FALSE);
         }         }
     }     }
     else  
     {  
         throw UnrecognizedConfigProperty(name);  
     }  
 }  
  
  
 /** /**
Line 201 
Line 187 
 */ */
 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);  
     }  
 } }
  
 /** /**
Line 224 
Line 196 
 */ */
 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);  
     }  
 } }
  
 /** /**
Line 247 
Line 205 
 */ */
 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);  
     }  
 } }
  
 /** /**
Line 272 
Line 216 
     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);  
     }  
 } }
  
  
Line 298 
Line 228 
     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);  
     }  
 } }
  
 /** /**
Line 330 
Line 246 
     {     {
         throw NonDynamicConfigProperty(name);         throw NonDynamicConfigProperty(name);
     }     }
   
       struct ConfigProperty* configProperty = _lookupConfigProperty(name);
       configProperty->currentValue = value;
 } }
  
  
Line 340 
Line 259 
     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);  
     }  
 } }
  
 /** /**
Line 376 
Line 281 
 */ */
 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);  
     }  
 } }
  
  


Legend:
Removed from v.1.2  
changed lines
  Added in v.1.3

No CVS admin address has been configured
Powered by
ViewCVS 0.9.2