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

  1 karl  1.8 //%2005////////////////////////////////////////////////////////////////////////
  2 mike  1.2 //
  3 karl  1.7 // Copyright (c) 2000, 2001, 2002 BMC Software; Hewlett-Packard Development
  4           // Company, L.P.; IBM Corp.; The Open Group; Tivoli Systems.
  5           // Copyright (c) 2003 BMC Software; Hewlett-Packard Development Company, L.P.;
  6 karl  1.5 // IBM Corp.; EMC Corporation, The Open Group.
  7 karl  1.7 // Copyright (c) 2004 BMC Software; Hewlett-Packard Development Company, L.P.;
  8           // IBM Corp.; EMC Corporation; VERITAS Software Corporation; The Open Group.
  9 karl  1.8 // Copyright (c) 2005 Hewlett-Packard Development Company, L.P.; IBM Corp.;
 10           // EMC Corporation; VERITAS Software Corporation; The Open Group.
 11 mike  1.2 //
 12           // Permission is hereby granted, free of charge, to any person obtaining a copy
 13           // of this software and associated documentation files (the "Software"), to
 14           // deal in the Software without restriction, including without limitation the
 15           // rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
 16           // sell copies of the Software, and to permit persons to whom the Software is
 17           // furnished to do so, subject to the following conditions:
 18 kumpf 1.4 // 
 19 mike  1.2 // THE ABOVE COPYRIGHT NOTICE AND THIS PERMISSION NOTICE SHALL BE INCLUDED IN
 20           // ALL COPIES OR SUBSTANTIAL PORTIONS OF THE SOFTWARE. THE SOFTWARE IS PROVIDED
 21           // "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT
 22           // LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR
 23           // PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
 24           // HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
 25           // ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
 26           // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 27           //
 28           //==============================================================================
 29           //
 30           // Author: Nag Boranna (nagaraja_boranna@hp.com)
 31           //
 32           // Modified By:
 33           //
 34           //%/////////////////////////////////////////////////////////////////////////////
 35           
 36           
 37           //////////////////////////////////////////////////////////////////////////////
 38           // 
 39           // This file defines the trace property owner class.
 40 mike  1.2 //
 41           //////////////////////////////////////////////////////////////////////////////
 42           
 43           #ifndef Pegasus_TracePropertyOwner_h
 44           #define Pegasus_TracePropertyOwner_h
 45           
 46           #include <Pegasus/Config/ConfigPropertyOwner.h>
 47 a.arora 1.6 #include <Pegasus/Common/AutoPtr.h>
 48 mike    1.2 
 49             
 50             PEGASUS_NAMESPACE_BEGIN
 51             
 52             ///////////////////////////////////////////////////////////////////
 53             //  TracePropertyOwner Class
 54             ///////////////////////////////////////////////////////////////////
 55             
 56             /** 
 57                 This is Trace property owner class that extends ConfigPropertyOwner
 58                 class and provide implementation.
 59             */
 60             class PEGASUS_CONFIG_LINKAGE TracePropertyOwner : public ConfigPropertyOwner
 61             {
 62             public:
 63             
 64                 /** Constructors  */
 65                 TracePropertyOwner();
 66             
 67                 /**
 68                 Initialize the config properties.
 69 mike    1.2 
 70                 This method is expected to be called only once at the start of the
 71                 CIMOM. It initializes the properties with the default values.
 72                 */
 73                 void initialize();
 74             
 75             
 76                 /** 
 77                 Get information about the specified property.
 78             
 79                 @param propertyName   The name of the property.
 80                 @param propertyInfo   List to store the property info.
 81                 @exception UnrecognizedConfigProperty  if the property is not defined.
 82                 */
 83                 void getPropertyInfo(const String& name, Array<String>& propertyInfo);
 84                     //throw (UnrecognizedConfigProperty);
 85             
 86                 /** 
 87                 Get default value of the specified property.
 88             
 89                 @param  name         The name of the property.
 90 mike    1.2     @return string containing the default value of the property specified.
 91                 @exception UnrecognizedConfigProperty  if the property is not defined.
 92                 */
 93                 const String getDefaultValue(const String& name);
 94                     //throw (UnrecognizedConfigProperty);
 95             
 96                 /** 
 97                 Get current value of the specified property.
 98             
 99                 @param  name         The name of the property.
100                 @return string containing the currnet value of the property specified.
101                 @exception UnrecognizedConfigProperty  if the property is not defined.
102                 */
103                 const String getCurrentValue(const String& name);
104                     //throw (UnrecognizedConfigProperty);
105             
106                 /** 
107                 Get planned value of the specified property.
108             
109                 @param  name         The name of the property.
110                 @return string containing the planned value of the property specified.
111 mike    1.2     @exception UnrecognizedConfigProperty  if the property is not defined.
112                 */
113                 const String getPlannedValue(const String& name);
114                     //throw (UnrecognizedConfigProperty);
115             
116                 /** 
117                 Init current value of the specified property to the specified value.
118                 This method is expected to be called only once at the start of the
119                 CIMOM. The property value will be initialized irrespective of whether
120                 the property is dynamic or not.
121             
122                 @param  name         The name of the property.
123                 @param  value        The current value of the property. 
124                 @exception     UnrecognizedConfigProperty  if the property is not defined.
125                 @exception     InvalidPropertyValue  if the property value is not valid.
126                 */
127                 void initCurrentValue(const String& name, const String& value);
128                     //throw (UnrecognizedConfigProperty, InvalidPropertyValue);
129             
130             
131                 /** 
132 mike    1.2     Init planned value of the specified property to the specified value.
133                 This method is expected to be called only once at the start of the
134                 CIMOM. The property value will be initialized irrespective of whether
135                 the property is dynamic or not.
136             
137                 @param  name         The name of the property.
138                 @param  value        The planned value of the property. 
139                 @exception     UnrecognizedConfigProperty  if the property is not defined.
140                 @exception     InvalidPropertyValue  if the property value is not valid.
141                 */
142                 void initPlannedValue(const String& name, const String& value); 
143                     //throw (UnrecognizedConfigProperty, InvalidPropertyValue);
144             
145                 /** 
146                 Update current value of the specified property to the specified value.
147                 The property value will be updated only if the property is dynamically
148                 updatable.
149             
150                 @param  name         The name of the property.
151                 @param  value        The current value of the property. 
152                 @exception     NonDynamicConfigProperty  if the property is not dynamic.
153 mike    1.2     @exception     InvalidPropertyValue  if the property value is not valid.
154                 @exception     UnrecognizedConfigProperty  if the property is not defined.
155                 */
156                 void updateCurrentValue(const String& name, const String& value);
157                     //throw (NonDynamicConfigProperty, InvalidPropertyValue,
158                     //    UnrecognizedConfigProperty);
159             
160                 /** 
161                 Update planned value of the specified property to the specified value.
162             
163                 @param  name         The name of the property.
164                 @param  value        The planned value of the property. 
165                 @exception     InvalidPropertyValue  if the property value is not valid.
166                 @exception     UnrecognizedConfigProperty  if the property is not defined.
167                 */
168                 void updatePlannedValue(const String& name, const String& value);
169                     //throw (InvalidPropertyValue, UnrecognizedConfigProperty);
170             
171                 /** 
172                 Checks to see if the given value is valid or not.
173             
174 mike    1.2     @param  name         The name of the property.
175                 @param  value        The value of the property to be validated. 
176                 @return Boolean      True if the specified value for the property is valid.
177                 @exception UnrecognizedConfigProperty  if the property is not defined.
178                 */
179                 Boolean isValid(const String& name, const String& value);
180                     //throw (UnrecognizedConfigProperty);
181             
182                 /** 
183                 Checks to see if the specified property is dynamic or not.
184             
185                 @param  name         The name of the property.
186                 @return Boolean      True if the specified property is dynamic.
187                 @exception UnrecognizedConfigProperty  if the property is not defined.
188                 */
189                 Boolean isDynamic(const String& name);
190                     //throw (UnrecognizedConfigProperty);
191             
192             private:
193 kumpf   1.3     struct ConfigProperty* _lookupConfigProperty(const String& name);
194             
195 mike    1.2     /**
196                 The trace properties owned by this class
197                 */
198 a.arora 1.6     AutoPtr<struct ConfigProperty>      _traceLevel; //PEP101
199 mike    1.2 
200 a.arora 1.6     AutoPtr<struct ConfigProperty>      _traceComponents; //PEP101
201 mike    1.2 
202 a.arora 1.6     AutoPtr<struct ConfigProperty>      _traceFilePath; //PEP101
203 mike    1.2 
204             };
205             
206             PEGASUS_NAMESPACE_END
207             
208             #endif /* Pegasus_TracePropertyOwner_h */

No CVS admin address has been configured
Powered by
ViewCVS 0.9.2