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