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

  1 martin 1.18 //%LICENSE////////////////////////////////////////////////////////////////
  2 martin 1.19 //
  3 martin 1.18 // Licensed to The Open Group (TOG) under one or more contributor license
  4             // agreements.  Refer to the OpenPegasusNOTICE.txt file distributed with
  5             // this work for additional information regarding copyright ownership.
  6             // Each contributor licenses this file to you under the OpenPegasus Open
  7             // Source License; you may not use this file except in compliance with the
  8             // License.
  9 martin 1.19 //
 10 martin 1.18 // Permission is hereby granted, free of charge, to any person obtaining a
 11             // copy of this software and associated documentation files (the "Software"),
 12             // to deal in the Software without restriction, including without limitation
 13             // the rights to use, copy, modify, merge, publish, distribute, sublicense,
 14             // and/or sell copies of the Software, and to permit persons to whom the
 15             // Software is furnished to do so, subject to the following conditions:
 16 martin 1.19 //
 17 martin 1.18 // The above copyright notice and this permission notice shall be included
 18             // in all copies or substantial portions of the Software.
 19 martin 1.19 //
 20 martin 1.18 // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
 21 martin 1.19 // OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
 22 martin 1.18 // MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
 23             // IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
 24             // CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
 25             // TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
 26             // SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 27 martin 1.19 //
 28 martin 1.18 //////////////////////////////////////////////////////////////////////////
 29 mike   1.2  //
 30             //%/////////////////////////////////////////////////////////////////////////////
 31             
 32             
 33             //////////////////////////////////////////////////////////////////////////////
 34 david.dillard 1.12 //
 35 mike          1.2  // This file defines the log property owner class.
 36                    //
 37                    //////////////////////////////////////////////////////////////////////////////
 38                    
 39                    #ifndef Pegasus_LogPropertyOwner_h
 40                    #define Pegasus_LogPropertyOwner_h
 41                    
 42                    #include <Pegasus/Config/ConfigPropertyOwner.h>
 43 a.arora       1.8  #include <Pegasus/Common/AutoPtr.h>
 44 mike          1.2  
 45                    
 46                    PEGASUS_NAMESPACE_BEGIN
 47                    
 48                    ///////////////////////////////////////////////////////////////////
 49                    //  LogPropertyOwner Class
 50                    ///////////////////////////////////////////////////////////////////
 51                    
 52 david.dillard 1.12 /**
 53 mike          1.2      This is Log property owner class that extends ConfigPropertyOwner
 54                        class and provide implementation.
 55                    */
 56                    class PEGASUS_CONFIG_LINKAGE LogPropertyOwner : public ConfigPropertyOwner
 57                    {
 58                    public:
 59                    
 60                        /** Constructors  */
 61                        LogPropertyOwner();
 62                    
 63                        /**
 64                        Initialize the config properties.
 65                    
 66                        This method is expected to be called only once at the start of the
 67                        CIMOM. It initializes the properties with the default values.
 68                        */
 69                        void initialize();
 70                    
 71                    
 72 david.dillard 1.12     /**
 73 mike          1.2      Get information about the specified property.
 74                    
 75                        @param propertyName   The name of the property.
 76                        @param propertyInfo   List to store the property info.
 77                        @exception UnrecognizedConfigProperty  if the property is not defined.
 78                        */
 79 vijay.eli     1.13     void getPropertyInfo(const String& name, Array<String>& propertyInfo)const;
 80 mike          1.2  
 81                    
 82 david.dillard 1.12     /**
 83 mike          1.2      Get default value of the specified property.
 84                    
 85                        @param  name         The name of the property.
 86                        @return string containing the default value of the property specified.
 87                        @exception UnrecognizedConfigProperty  if the property is not defined.
 88                        */
 89 vijay.eli     1.13     String getDefaultValue(const String& name)const;
 90 mike          1.2  
 91                    
 92 david.dillard 1.12     /**
 93 mike          1.2      Get current value of the specified property.
 94                    
 95                        @param  name         The name of the property.
 96                        @return string containing the currnet value of the property specified.
 97                        @exception UnrecognizedConfigProperty  if the property is not defined.
 98                        */
 99 vijay.eli     1.13     String getCurrentValue(const String& name)const;
100 mike          1.2  
101                    
102 david.dillard 1.12     /**
103 mike          1.2      Get planned value of the specified property.
104                    
105                        @param  name         The name of the property.
106                        @return string containing the planned value of the property specified.
107                        @exception UnrecognizedConfigProperty  if the property is not defined.
108                        */
109 vijay.eli     1.13     String getPlannedValue(const String& name)const;
110 mike          1.2  
111                    
112 david.dillard 1.12     /**
113 mike          1.2      Init current value of the specified property to the specified value.
114                        This method is expected to be called only once at the start of the
115                        CIMOM. The property value will be initialized irrespective of whether
116                        the property is dynamic or not.
117                    
118                        @param  name         The name of the property.
119 david.dillard 1.12     @param  value        The current value of the property.
120 mike          1.2      @exception     UnrecognizedConfigProperty  if the property is not defined.
121                        @exception     InvalidPropertyValue  if the property value is not valid.
122                        */
123                        void initCurrentValue(const String& name, const String& value);
124                    
125                    
126 david.dillard 1.12     /**
127 mike          1.2      Init planned value of the specified property to the specified value.
128                        This method is expected to be called only once at the start of the
129                        CIMOM. The property value will be initialized irrespective of whether
130                        the property is dynamic or not.
131                    
132                        @param  name         The name of the property.
133 david.dillard 1.12     @param  value        The planned value of the property.
134 mike          1.2      @exception     UnrecognizedConfigProperty  if the property is not defined.
135                        @exception     InvalidPropertyValue  if the property value is not valid.
136                        */
137 david.dillard 1.12     void initPlannedValue(const String& name, const String& value);
138 mike          1.2  
139                    
140 david.dillard 1.12     /**
141 mike          1.2      Update current value of the specified property to the specified value.
142                        The property value will be updated only if the property is dynamically
143                        updatable.
144                    
145                        @param  name         The name of the property.
146 david.dillard 1.12     @param  value        The current value of the property.
147 venkat.puvvada 1.20     @param  userName     User requesting the update.
148 venkat.puvvada 1.21     @param timeoutSeconds Timeout in seconds to complete the update.
149 mike           1.2      @exception     NonDynamicConfigProperty  if the property is not dynamic.
150                         @exception     InvalidPropertyValue  if the property value is not valid.
151                         @exception     UnrecognizedConfigProperty  if the property is not defined.
152                         */
153 venkat.puvvada 1.20     void updateCurrentValue(
154                             const String& name,
155                             const String& value,
156 venkat.puvvada 1.21         const String& userName,
157                             Uint32 timeoutSeconds);
158 mike           1.2          //throw (NonDynamicConfigProperty, InvalidPropertyValue,
159                             //    UnrecognizedConfigProperty);
160                     
161                     
162 david.dillard  1.12     /**
163 mike           1.2      Update planned value of the specified property to the specified value.
164                     
165                         @param  name         The name of the property.
166 david.dillard  1.12     @param  value        The planned value of the property.
167 mike           1.2      @exception     InvalidPropertyValue  if the property value is not valid.
168                         @exception     UnrecognizedConfigProperty  if the property is not defined.
169                         */
170                         void updatePlannedValue(const String& name, const String& value);
171                     
172                     
173 david.dillard  1.12     /**
174 mike           1.2      Checks to see if the given value is valid or not.
175                     
176                         @param  name         The name of the property.
177 david.dillard  1.12     @param  value        The value of the property to be validated.
178 mike           1.2      @return Boolean      True if the specified value for the property is valid.
179                         @exception UnrecognizedConfigProperty  if the property is not defined.
180                         */
181 vijay.eli      1.13     Boolean isValid(const String& name, const String& value)const;
182 mike           1.2  
183                     
184 david.dillard  1.12     /**
185 mike           1.2      Checks to see if the specified property is dynamic or not.
186                     
187                         @param  name         The name of the property.
188                         @return Boolean      True if the specified property is dynamic.
189                         @exception UnrecognizedConfigProperty  if the property is not defined.
190                         */
191 vijay.eli      1.13     Boolean isDynamic(const String& name)const;
192 mike           1.2  
193                     
194                     private:
195                     
196 aruran.ms      1.14     struct ConfigProperty* _lookupConfigProperty(const String& name) const;
197 kumpf          1.3  
198 mike           1.2      /**
199                         The log properties owned by this class
200                         */
201 a.arora        1.8      AutoPtr<struct ConfigProperty>      _logdir; //PEP101
202                         AutoPtr<struct ConfigProperty>      _logLevel; //PEP101
203 mreddy         1.17     AutoPtr<struct ConfigProperty>      _maxLogFileSizeKBytes;
204 mike           1.2  };
205                     
206                     PEGASUS_NAMESPACE_END
207                     
208                     #endif /* Pegasus_LogPropertyOwner_h */

No CVS admin address has been configured
Powered by
ViewCVS 0.9.2