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

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

No CVS admin address has been configured
Powered by
ViewCVS 0.9.2