1 karl 1.13 //%2006////////////////////////////////////////////////////////////////////////
|
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 karl 1.13 // 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.13 //
|
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.10 //
|
37 mike 1.2 // This file defines the trace property owner class.
38 //
39 //////////////////////////////////////////////////////////////////////////////
40
41 #ifndef Pegasus_TracePropertyOwner_h
42 #define Pegasus_TracePropertyOwner_h
43
44 #include <Pegasus/Config/ConfigPropertyOwner.h>
|
45 a.arora 1.6 #include <Pegasus/Common/AutoPtr.h>
|
46 mike 1.2
47
48 PEGASUS_NAMESPACE_BEGIN
49
50 ///////////////////////////////////////////////////////////////////
51 // TracePropertyOwner Class
52 ///////////////////////////////////////////////////////////////////
53
|
54 david.dillard 1.10 /**
|
55 mike 1.2 This is Trace property owner class that extends ConfigPropertyOwner
56 class and provide implementation.
57 */
58 class PEGASUS_CONFIG_LINKAGE TracePropertyOwner : public ConfigPropertyOwner
59 {
60 public:
61
62 /** Constructors */
63 TracePropertyOwner();
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.10 /**
|
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.11 void getPropertyInfo(const String& name, Array<String>& propertyInfo)const;
|
82 mike 1.2
|
83 david.dillard 1.10 /**
|
84 mike 1.2 Get default value of the specified property.
85
86 @param name The name of the property.
87 @return string containing the default value of the property specified.
88 @exception UnrecognizedConfigProperty if the property is not defined.
89 */
|
90 vijay.eli 1.11 String getDefaultValue(const String& name)const;
|
91 mike 1.2
|
92 david.dillard 1.10 /**
|
93 mike 1.2 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 @exception UnrecognizedConfigProperty if the property is not defined.
98 */
|
99 vijay.eli 1.11 String getCurrentValue(const String& name)const;
|
100 mike 1.2
|
101 david.dillard 1.10 /**
|
102 mike 1.2 Get planned value of the specified property.
103
104 @param name The name of the property.
105 @return string containing the planned value of the property specified.
106 @exception UnrecognizedConfigProperty if the property is not defined.
107 */
|
108 vijay.eli 1.11 String getPlannedValue(const String& name)const;
|
109 mike 1.2
|
110 david.dillard 1.10 /**
|
111 mike 1.2 Init current value of the specified property to the specified value.
112 This method is expected to be called only once at the start of the
113 CIMOM. The property value will be initialized irrespective of whether
114 the property is dynamic or not.
115
116 @param name The name of the property.
|
117 david.dillard 1.10 @param value The current value of the property.
|
118 mike 1.2 @exception UnrecognizedConfigProperty if the property is not defined.
119 @exception InvalidPropertyValue if the property value is not valid.
120 */
121 void initCurrentValue(const String& name, const String& value);
122
|
123 david.dillard 1.10 /**
|
124 mike 1.2 Init planned value of the specified property to the specified value.
125 This method is expected to be called only once at the start of the
126 CIMOM. The property value will be initialized irrespective of whether
127 the property is dynamic or not.
128
129 @param name The name of the property.
|
130 david.dillard 1.10 @param value The planned value of the property.
|
131 mike 1.2 @exception UnrecognizedConfigProperty if the property is not defined.
132 @exception InvalidPropertyValue if the property value is not valid.
133 */
|
134 david.dillard 1.10 void initPlannedValue(const String& name, const String& value);
|
135 mike 1.2
|
136 david.dillard 1.10 /**
|
137 mike 1.2 Update current value of the specified property to the specified value.
138 The property value will be updated only if the property is dynamically
139 updatable.
140
141 @param name The name of the property.
|
142 david.dillard 1.10 @param value The current value of the property.
|
143 mike 1.2 @exception NonDynamicConfigProperty if the property is not dynamic.
144 @exception InvalidPropertyValue if the property value is not valid.
145 @exception UnrecognizedConfigProperty if the property is not defined.
146 */
147 void updateCurrentValue(const String& name, const String& value);
148 //throw (NonDynamicConfigProperty, InvalidPropertyValue,
149 // UnrecognizedConfigProperty);
150
|
151 david.dillard 1.10 /**
|
152 mike 1.2 Update planned value of the specified property to the specified value.
153
154 @param name The name of the property.
|
155 david.dillard 1.10 @param value The planned value of the property.
156 @exception UnrecognizedConfigProperty if the property is not defined.
|
157 mike 1.2 @exception InvalidPropertyValue if the property value is not valid.
158 */
159 void updatePlannedValue(const String& name, const String& value);
160
|
161 david.dillard 1.10 /**
|
162 mike 1.2 Checks to see if the given value is valid or not.
163
164 @param name The name of the property.
|
165 david.dillard 1.10 @param value The value of the property to be validated.
|
166 mike 1.2 @return Boolean True if the specified value for the property is valid.
167 @exception UnrecognizedConfigProperty if the property is not defined.
168 */
|
169 vijay.eli 1.11 Boolean isValid(const String& name, const String& value)const;
|
170 mike 1.2
|
171 david.dillard 1.10 /**
|
172 mike 1.2 Checks to see if the specified property is dynamic or not.
173
174 @param name The name of the property.
175 @return Boolean True if the specified property is dynamic.
176 @exception UnrecognizedConfigProperty if the property is not defined.
177 */
|
178 vijay.eli 1.11 Boolean isDynamic(const String& name)const;
|
179 mike 1.2
180 private:
|
181 aruran.ms 1.12 struct ConfigProperty* _lookupConfigProperty(const String& name) const;
|
182 kumpf 1.3
|
183 mike 1.2 /**
184 The trace properties owned by this class
185 */
|
186 a.arora 1.6 AutoPtr<struct ConfigProperty> _traceLevel; //PEP101
|
187 mike 1.2
|
188 a.arora 1.6 AutoPtr<struct ConfigProperty> _traceComponents; //PEP101
|
189 mike 1.2
|
190 a.arora 1.6 AutoPtr<struct ConfigProperty> _traceFilePath; //PEP101
|
191 mike 1.2
192 };
193
194 PEGASUS_NAMESPACE_END
195
196 #endif /* Pegasus_TracePropertyOwner_h */
|