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 david.dillard 1.10 //
|
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 aruran.ms 1.9 // Modified By: Aruran, IBM (ashanmug@in.ibm.com) for Bug# 3614
|
33 david.dillard 1.10 // David Dillard, VERITAS Software Corp.
34 // (david.dillard@veritas.com)
|
35 vijay.eli 1.11 // Vijay Eli, IBM, (vijayeli@in.ibm.com) for Bug# 3613
|
36 aruran.ms 1.12 // Aruran, IBM (ashanmug@in.ibm.com) for Bug# 3613
|
37 mike 1.2 //
38 //%/////////////////////////////////////////////////////////////////////////////
39
40
41 //////////////////////////////////////////////////////////////////////////////
|
42 david.dillard 1.10 //
|
43 mike 1.2 // This file defines the trace property owner class.
44 //
45 //////////////////////////////////////////////////////////////////////////////
46
47 #ifndef Pegasus_TracePropertyOwner_h
48 #define Pegasus_TracePropertyOwner_h
49
50 #include <Pegasus/Config/ConfigPropertyOwner.h>
|
51 a.arora 1.6 #include <Pegasus/Common/AutoPtr.h>
|
52 mike 1.2
53
54 PEGASUS_NAMESPACE_BEGIN
55
56 ///////////////////////////////////////////////////////////////////
57 // TracePropertyOwner Class
58 ///////////////////////////////////////////////////////////////////
59
|
60 david.dillard 1.10 /**
|
61 mike 1.2 This is Trace property owner class that extends ConfigPropertyOwner
62 class and provide implementation.
63 */
64 class PEGASUS_CONFIG_LINKAGE TracePropertyOwner : public ConfigPropertyOwner
65 {
66 public:
67
68 /** Constructors */
69 TracePropertyOwner();
70
71 /**
72 Initialize the config properties.
73
74 This method is expected to be called only once at the start of the
75 CIMOM. It initializes the properties with the default values.
76 */
77 void initialize();
78
79
|
80 david.dillard 1.10 /**
|
81 mike 1.2 Get information about the specified property.
82
83 @param propertyName The name of the property.
84 @param propertyInfo List to store the property info.
85 @exception UnrecognizedConfigProperty if the property is not defined.
86 */
|
87 vijay.eli 1.11 void getPropertyInfo(const String& name, Array<String>& propertyInfo)const;
|
88 mike 1.2
|
89 david.dillard 1.10 /**
|
90 mike 1.2 Get default value of the specified property.
91
92 @param name The name of the property.
93 @return string containing the default value of the property specified.
94 @exception UnrecognizedConfigProperty if the property is not defined.
95 */
|
96 vijay.eli 1.11 String getDefaultValue(const String& name)const;
|
97 mike 1.2
|
98 david.dillard 1.10 /**
|
99 mike 1.2 Get current value of the specified property.
100
101 @param name The name of the property.
102 @return string containing the currnet value of the property specified.
103 @exception UnrecognizedConfigProperty if the property is not defined.
104 */
|
105 vijay.eli 1.11 String getCurrentValue(const String& name)const;
|
106 mike 1.2
|
107 david.dillard 1.10 /**
|
108 mike 1.2 Get planned value of the specified property.
109
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 vijay.eli 1.11 String getPlannedValue(const String& name)const;
|
115 mike 1.2
|
116 david.dillard 1.10 /**
|
117 mike 1.2 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 david.dillard 1.10 @param value The current value of the property.
|
124 mike 1.2 @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
|
129 david.dillard 1.10 /**
|
130 mike 1.2 Init planned value of the specified property to the specified value.
131 This method is expected to be called only once at the start of the
132 CIMOM. The property value will be initialized irrespective of whether
133 the property is dynamic or not.
134
135 @param name The name of the property.
|
136 david.dillard 1.10 @param value The planned value of the property.
|
137 mike 1.2 @exception UnrecognizedConfigProperty if the property is not defined.
138 @exception InvalidPropertyValue if the property value is not valid.
139 */
|
140 david.dillard 1.10 void initPlannedValue(const String& name, const String& value);
|
141 mike 1.2
|
142 david.dillard 1.10 /**
|
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.10 @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 david.dillard 1.10 /**
|
158 mike 1.2 Update planned value of the specified property to the specified value.
159
160 @param name The name of the property.
|
161 david.dillard 1.10 @param value The planned value of the property.
162 @exception UnrecognizedConfigProperty if the property is not defined.
|
163 mike 1.2 @exception InvalidPropertyValue if the property value is not valid.
164 */
165 void updatePlannedValue(const String& name, const String& value);
166
|
167 david.dillard 1.10 /**
|
168 mike 1.2 Checks to see if the given value is valid or not.
169
170 @param name The name of the property.
|
171 david.dillard 1.10 @param value The value of the property to be validated.
|
172 mike 1.2 @return Boolean True if the specified value for the property is valid.
173 @exception UnrecognizedConfigProperty if the property is not defined.
174 */
|
175 vijay.eli 1.11 Boolean isValid(const String& name, const String& value)const;
|
176 mike 1.2
|
177 david.dillard 1.10 /**
|
178 mike 1.2 Checks to see if the specified property is dynamic or not.
179
180 @param name The name of the property.
181 @return Boolean True if the specified property is dynamic.
182 @exception UnrecognizedConfigProperty if the property is not defined.
183 */
|
184 vijay.eli 1.11 Boolean isDynamic(const String& name)const;
|
185 mike 1.2
186 private:
|
187 aruran.ms 1.12 struct ConfigProperty* _lookupConfigProperty(const String& name) const;
|
188 kumpf 1.3
|
189 mike 1.2 /**
190 The trace properties owned by this class
191 */
|
192 a.arora 1.6 AutoPtr<struct ConfigProperty> _traceLevel; //PEP101
|
193 mike 1.2
|
194 a.arora 1.6 AutoPtr<struct ConfigProperty> _traceComponents; //PEP101
|
195 mike 1.2
|
196 a.arora 1.6 AutoPtr<struct ConfigProperty> _traceFilePath; //PEP101
|
197 mike 1.2
198 };
199
200 PEGASUS_NAMESPACE_END
201
202 #endif /* Pegasus_TracePropertyOwner_h */
|