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

Diff for /pegasus/src/Pegasus/Config/ConfigManager.h between version 1.33 and 1.34

version 1.33, 2006/08/08 17:47:10 version 1.34, 2006/11/14 18:34:49
Line 29 
Line 29 
 // //
 //============================================================================== //==============================================================================
 // //
 // Author: Nag Boranna (nagaraja_boranna@hp.com)  
 //  
 // Modified By: Sushma Fernandes, Hewlett-Packard Company  
 //                 (sushma_fernandes@hp.com)  
 //              Roger Kumpf, Hewlett-Packard Company (roger_kumpf@hp.com)  
 //              Aruran, IBM (ashanmug@in.ibm.com) for Bug# 3612  
 //              Aruran, IBM (ashanmug@in.ibm.com) for Bug# 3610  
 //              David Dillard, VERITAS Software Corp.  
 //                  (david.dillard@veritas.com)  
 //  
 //%//////////////////////////////////////////////////////////////////////////// //%////////////////////////////////////////////////////////////////////////////
  
  
Line 79 
Line 69 
   This class reads configuration properties from the config file, maps the   This class reads configuration properties from the config file, maps the
   properties to owners, and implements access methods.   properties to owners, and implements access methods.
 */ */
   
 class PEGASUS_CONFIG_LINKAGE ConfigManager class PEGASUS_CONFIG_LINKAGE ConfigManager
 { {
   
 private: private:
  
     /**     /**
Line 91 
Line 79 
      */      */
     static ConfigManager* _instance;     static ConfigManager* _instance;
  
   
     /** Constructor. */     /** Constructor. */
     ConfigManager();     ConfigManager();
  
   
     /**     /**
     Initialize config property with the value specified as a     Initialize config property with the value specified as a
     command line option.     command line option.
Line 113 
Line 99 
     load config properties from the file     load config properties from the file
  
     @exception CannotRenameFile  if failed to rename the config file.     @exception CannotRenameFile  if failed to rename the config file.
     @exception CannotOpenFile if failed to set permissions on the config file.          @exception CannotOpenFile if failed to set permissions on the config
               file.
     @exception ConfigFileSyntaxError  if there are synatx error     @exception ConfigFileSyntaxError  if there are synatx error
                             while parsing the config files.                             while parsing the config files.
     */     */
Line 121 
Line 108 
  
  
     /**     /**
     Initialize config property owners and add them to the property owner table          Initialize config property owners and add them to the property owner
           table
     */     */
     void _initPropertyTable();     void _initPropertyTable();
  
Line 134 
Line 122 
     /**     /**
     HashTable used to identify fixed values.     HashTable used to identify fixed values.
     */     */
     typedef HashTable<String,      typedef HashTable<String, const char*, EqualFunc<String>, HashFunc<String> >
         const char*,EqualFunc<String>,HashFunc<String> > FixedValueTable;          FixedValueTable;
  
     /*     /*
     friend declaration needed by some compilers to allow OwnerTable and     friend declaration needed by some compilers to allow OwnerTable and
Line 154 
Line 142 
     };     };
  
     /**     /**
     HashTable to store the config property names and          HashTable to store the config property names and property owners
     property owners  
     */     */
     AutoPtr<PropertyTable> _propertyTable; //PEP101      AutoPtr<PropertyTable> _propertyTable;
  
     /**     /**
     Handler to access the config files.     Handler to access the config files.
     */     */
     AutoPtr<ConfigFileHandler>    _configFileHandler; //PEP101      AutoPtr<ConfigFileHandler> _configFileHandler;
  
     /**     /**
     Pegasus home variable     Pegasus home variable
Line 176 
Line 163 
     */     */
     static const String PEGASUS_HOME_DEFAULT;     static const String PEGASUS_HOME_DEFAULT;
  
   
     /**     /**
     Property Owners     Property Owners
  
Line 219 
Line 205 
     */     */
     static ConfigManager* getInstance();     static ConfigManager* getInstance();
  
   
     /**     /**
     Terminate the ConfigManager.     Terminate the ConfigManager.
     */     */
     static void destroy( void );      static void destroy();
   
     /**     /**
     Initialize the current value of a config property.     Initialize the current value of a config property.
  
Line 242 
Line 228 
     /**     /**
     Update current value of a property.     Update current value of a property.
  
     @param  propertyName  The name of the property to update (eg. "httpPort").          @param propertyName  The name of the property to update
               (e.g., "httpPort").
     @param  propertyValue The new value of the property.  If the value is     @param  propertyValue The new value of the property.  If the value is
                           null, the property should be reset to its default              null, the property should be reset to its default value.
                           value.          @param unset Specifies whether the property should be updated or unset.
     @param  unset         Specifies whether the property should be updated  
                           or unset.  
     @return true if the property found and updated, else false.     @return true if the property found and updated, else false.
  
     @exception NonDynamicConfigProperty  if property is not dynamic.     @exception NonDynamicConfigProperty  if property is not dynamic.
Line 262 
Line 247 
     /**     /**
     Update planned value of a property.     Update planned value of a property.
  
     @param  propertyName  The name of the property to update (eg. "httpPort").          @param propertyName The name of the property to update
               (e.g., "httpPort").
     @param  propertyValue The new value of the property.  If the value is     @param  propertyValue The new value of the property.  If the value is
                           null, the property should be reset to its default              null, the property should be reset to its default value.
                           value.          @param unset Specifies whether the property should be updated or unset.
     @param  unset         Specifies whether the property should be updated  
                           or unset.  
     @return Boolean       True if the property found and updated.     @return Boolean       True if the property found and updated.
  
     @exception NonDynamicConfigProperty  if property is not dynamic.     @exception NonDynamicConfigProperty  if property is not dynamic.
Line 279 
Line 263 
         const String& value,         const String& value,
         Boolean unset);         Boolean unset);
  
   
     /**     /**
     Validate the value of a property.     Validate the value of a property.
  
Line 301 
Line 284 
     */     */
     String getDefaultValue(const String& name) const;     String getDefaultValue(const String& name) const;
  
   
     /**     /**
     Get current value of the specified property.     Get current value of the specified property.
  
Line 312 
Line 294 
     */     */
     String getCurrentValue(const String& name) const;     String getCurrentValue(const String& name) const;
  
   
     /**     /**
     Get planned value of the specified property.     Get planned value of the specified property.
  
Line 323 
Line 304 
     */     */
     String getPlannedValue(const String& name) const;     String getPlannedValue(const String& name) const;
  
   
     /**     /**
     Get all the attributes of the specified property.     Get all the attributes of the specified property.
  
Line 334 
Line 314 
     */     */
     void getPropertyInfo(const String& name, Array<String>& propertyInfo) const;     void getPropertyInfo(const String& name, Array<String>& propertyInfo) const;
  
   
     /**     /**
     Get a list of all the property names.     Get a list of all the property names.
  
     @param propertyNames  List containing all the property names.     @param propertyNames  List containing all the property names.
     @param includeHiddenProperties  Boolean indicating whether hidden     @param includeHiddenProperties  Boolean indicating whether hidden
                                     properties should be included in the              properties should be included in the returned list.
                                     returned list.  
     */     */
     void getAllPropertyNames(     void getAllPropertyNames(
         Array<String>& propertyNames,         Array<String>& propertyNames,
Line 356 
Line 334 
     @exception NoSuchFile  if the specified config file does not exist.     @exception NoSuchFile  if the specified config file does not exist.
     @exception FileNotReadable  if the specified config file is not readable.     @exception FileNotReadable  if the specified config file is not readable.
     @exception CannotRenameFile  if failed to rename the config file.     @exception CannotRenameFile  if failed to rename the config file.
     @exception CannotOpenFile if failed to set permissions on the config file.          @exception CannotOpenFile if failed to set permissions on the config
     @exception ConfigFileSyntaxError  if there is synatx error              file.
           @exception ConfigFileSyntaxError if there is syntax error
                             while parsing the config files.                             while parsing the config files.
     @exception InvalidPropertyValue if validation fails for a config property          @exception InvalidPropertyValue if validation fails for a config
         in either file.              property in either file.
     @exception UnrecognizedConfigProperty if a config property specified in     @exception UnrecognizedConfigProperty if a config property specified in
         either file is not defined.         either file is not defined.
     */     */
     void mergeConfigFiles(const String& currentFile, const String& plannedFile);      void mergeConfigFiles(
           const String& currentFile,
           const String& plannedFile);
  
     /**     /**
     Merge the config properties from the default planned config file     Merge the config properties from the default planned config file
Line 373 
Line 354 
     @exception NoSuchFile  if the default config file does not exist.     @exception NoSuchFile  if the default config file does not exist.
     @exception FileNotReadable  if the default config file is not readable.     @exception FileNotReadable  if the default config file is not readable.
     @exception CannotRenameFile  if failed to rename the config file.     @exception CannotRenameFile  if failed to rename the config file.
     @exception CannotOpenFile if failed to set permissions on the config file.          @exception CannotOpenFile if failed to set permissions on the config
               file.
     @exception ConfigFileSyntaxError  if there are synatx error     @exception ConfigFileSyntaxError  if there are synatx error
                             while parsing the config files.                             while parsing the config files.
     @exception InvalidPropertyValue if validation fails for a config property          @exception InvalidPropertyValue if validation fails for a config
         in either file.              property in either file.
     @exception UnrecognizedConfigProperty if a config property specified in     @exception UnrecognizedConfigProperty if a config property specified in
         either file is not defined.         either file is not defined.
     */     */
     void mergeConfigFiles();     void mergeConfigFiles();
  
   
     /**     /**
     Merge option values from the command line.     Merge option values from the command line.
  
Line 395 
Line 376 
     */     */
     void mergeCommandLine(int& argc, char**& argv);     void mergeCommandLine(int& argc, char**& argv);
  
   
     /**     /**
     Get Pegasus Home     Get Pegasus Home
     */     */
Line 427 
Line 407 
 PEGASUS_NAMESPACE_END PEGASUS_NAMESPACE_END
  
 #endif /* Pegasus_ConfigManager_h */ #endif /* Pegasus_ConfigManager_h */
   


Legend:
Removed from v.1.33  
changed lines
  Added in v.1.34

No CVS admin address has been configured
Powered by
ViewCVS 0.9.2