1 karl 1.15 //%2006////////////////////////////////////////////////////////////////////////
|
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 karl 1.10 // Copyright (c) 2005 Hewlett-Packard Development Company, L.P.; IBM Corp.;
10 // EMC Corporation; VERITAS Software Corporation; The Open Group.
|
11 karl 1.15 // Copyright (c) 2006 Hewlett-Packard Development Company, L.P.; IBM Corp.;
12 // EMC Corporation; Symantec Corporation; The Open Group.
|
13 mike 1.2 //
14 // Permission is hereby granted, free of charge, to any person obtaining a copy
15 // of this software and associated documentation files (the "Software"), to
16 // deal in the Software without restriction, including without limitation the
17 // rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
18 // sell copies of the Software, and to permit persons to whom the Software is
19 // furnished to do so, subject to the following conditions:
|
20 karl 1.15 //
|
21 mike 1.2 // THE ABOVE COPYRIGHT NOTICE AND THIS PERMISSION NOTICE SHALL BE INCLUDED IN
22 // ALL COPIES OR SUBSTANTIAL PORTIONS OF THE SOFTWARE. THE SOFTWARE IS PROVIDED
23 // "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT
24 // LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR
25 // PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
26 // HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
27 // ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
28 // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
29 //
30 //==============================================================================
31 //
32 //%/////////////////////////////////////////////////////////////////////////////
33
34
35 //////////////////////////////////////////////////////////////////////////////
|
36 david.dillard 1.12 //
|
37 mike 1.2 // 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 david.dillard 1.12 /**
|
55 mike 1.2 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
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 david.dillard 1.12 /**
|
75 mike 1.2 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 vijay.eli 1.13 void getPropertyInfo(const String& name, Array<String>& propertyInfo)const;
|
82 mike 1.2
83
|
84 david.dillard 1.12 /**
|
85 mike 1.2 Get default value of the specified property.
86
87 @param name The name of the property.
88 @return string containing the default value of the property specified.
89 @exception UnrecognizedConfigProperty if the property is not defined.
90 */
|
91 vijay.eli 1.13 String getDefaultValue(const String& name)const;
|
92 mike 1.2
93
|
94 david.dillard 1.12 /**
|
95 mike 1.2 Get current value of the specified property.
96
97 @param name The name of the property.
98 @return string containing the currnet value of the property specified.
99 @exception UnrecognizedConfigProperty if the property is not defined.
100 */
|
101 vijay.eli 1.13 String getCurrentValue(const String& name)const;
|
102 mike 1.2
103
|
104 david.dillard 1.12 /**
|
105 mike 1.2 Get planned value of the specified property.
106
107 @param name The name of the property.
108 @return string containing the planned value of the property specified.
109 @exception UnrecognizedConfigProperty if the property is not defined.
110 */
|
111 vijay.eli 1.13 String getPlannedValue(const String& name)const;
|
112 mike 1.2
113
|
114 david.dillard 1.12 /**
|
115 mike 1.2 Init current value of the specified property to the specified value.
116 This method is expected to be called only once at the start of the
117 CIMOM. The property value will be initialized irrespective of whether
118 the property is dynamic or not.
119
120 @param name The name of the property.
|
121 david.dillard 1.12 @param value The current value of the property.
|
122 mike 1.2 @exception UnrecognizedConfigProperty if the property is not defined.
123 @exception InvalidPropertyValue if the property value is not valid.
124 */
125 void initCurrentValue(const String& name, const String& value);
126
127
|
128 david.dillard 1.12 /**
|
129 mike 1.2 Init planned value of the specified property to the specified value.
130 This method is expected to be called only once at the start of the
131 CIMOM. The property value will be initialized irrespective of whether
132 the property is dynamic or not.
133
134 @param name The name of the property.
|
135 david.dillard 1.12 @param value The planned value of the property.
|
136 mike 1.2 @exception UnrecognizedConfigProperty if the property is not defined.
137 @exception InvalidPropertyValue if the property value is not valid.
138 */
|
139 david.dillard 1.12 void initPlannedValue(const String& name, const String& value);
|
140 mike 1.2
141
|
142 david.dillard 1.12 /**
|
143 mike 1.2 Update current value of the specified property to the specified value.
144 The property value will be updated only if the property is dynamically
145 updatable.
146
147 @param name The name of the property.
|
148 david.dillard 1.12 @param value The current value of the property.
|
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 void updateCurrentValue(const String& name, const String& value);
154 //throw (NonDynamicConfigProperty, InvalidPropertyValue,
155 // UnrecognizedConfigProperty);
156
157
|
158 david.dillard 1.12 /**
|
159 mike 1.2 Update planned value of the specified property to the specified value.
160
161 @param name The name of the property.
|
162 david.dillard 1.12 @param value The planned value of the property.
|
163 mike 1.2 @exception InvalidPropertyValue if the property value is not valid.
164 @exception UnrecognizedConfigProperty if the property is not defined.
165 */
166 void updatePlannedValue(const String& name, const String& value);
167
168
|
169 david.dillard 1.12 /**
|
170 mike 1.2 Checks to see if the given value is valid or not.
171
172 @param name The name of the property.
|
173 david.dillard 1.12 @param value The value of the property to be validated.
|
174 mike 1.2 @return Boolean True if the specified value for the property is valid.
175 @exception UnrecognizedConfigProperty if the property is not defined.
176 */
|
177 vijay.eli 1.13 Boolean isValid(const String& name, const String& value)const;
|
178 mike 1.2
179
|
180 david.dillard 1.12 /**
|
181 mike 1.2 Checks to see if the specified property is dynamic or not.
182
183 @param name The name of the property.
184 @return Boolean True if the specified property is dynamic.
185 @exception UnrecognizedConfigProperty if the property is not defined.
186 */
|
187 vijay.eli 1.13 Boolean isDynamic(const String& name)const;
|
188 mike 1.2
189
190 private:
191
|
192 aruran.ms 1.14 struct ConfigProperty* _lookupConfigProperty(const String& name) const;
|
193 kumpf 1.3
|
194 mike 1.2 /**
195 The log properties owned by this class
196 */
|
197 a.arora 1.8 AutoPtr<struct ConfigProperty> _logdir; //PEP101
198 AutoPtr<struct ConfigProperty> _logLevel; //PEP101
|
199 mike 1.2
200 };
201
202 PEGASUS_NAMESPACE_END
203
204 #endif /* Pegasus_LogPropertyOwner_h */
|