1 karl 1.8 //%2004////////////////////////////////////////////////////////////////////////
|
2 mike 1.2 //
|
3 karl 1.8 // 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.6 // IBM Corp.; EMC Corporation, The Open Group.
|
7 karl 1.8 // 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.5 //
|
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 kumpf 1.5 //==============================================================================
|
27 mike 1.2 //
28 // Author: Jenny Yu, Hewlett-Packard Company (jenny_yu@hp.com)
29 //
30 // Modified By:
|
31 a.arora 1.7 // Amit K Arora (amita@in.ibm.com) for PEP101
|
32 mike 1.2 //
33 //%/////////////////////////////////////////////////////////////////////////////
34
35
36 //////////////////////////////////////////////////////////////////////////////
37 //
38 // This file defines the property owner class for the configurable properties
39 // used for shutdown.
40 //
41 //////////////////////////////////////////////////////////////////////////////
42
43 #ifndef Pegasus_ShutdownPropertyOwner_h
44 #define Pegasus_ShutdownPropertyOwner_h
45
46 #include <Pegasus/Config/ConfigPropertyOwner.h>
|
47 a.arora 1.7 #include <Pegasus/Common/AutoPtr.h>
|
48 mike 1.2
49 PEGASUS_NAMESPACE_BEGIN
50
51 ///////////////////////////////////////////////////////////////////
52 // ShutdownPropertyOwner Class
53 ///////////////////////////////////////////////////////////////////
54
55 /**
56 The Shutdown Property Owner class extends ConfigPropertyOwner
57 class and provide implementation.
58 */
59 class PEGASUS_CONFIG_LINKAGE ShutdownPropertyOwner : public ConfigPropertyOwner
60 {
61 public:
62
63 /** Constructors */
64 ShutdownPropertyOwner();
65
66 /**
67 Initialize the config properties.
68
69 mike 1.2 This method is expected to be called only once at the start of the
70 CIMOM. It initializes the properties with the default values.
71 */
72 void initialize();
73
74
75 /**
76 Get information about the specified property.
77
78 @param propertyName The name of the property.
79 @param propertyInfo List to store the property info.
80 @exception UnrecognizedConfigProperty if the property is not defined.
81 */
82 void getPropertyInfo(const String& name, Array<String>& propertyInfo);
83 //throw (UnrecognizedConfigProperty);
84
85 /**
86 Get default value of the specified property.
87
88 @param name The name of the property.
89 @return string containing the default value of the property specified.
90 mike 1.2 @exception UnrecognizedConfigProperty if the property is not defined.
91 */
92 const String getDefaultValue(const String& name);
93 //throw (UnrecognizedConfigProperty);
94
95 /**
96 Get current value of the specified property.
97
98 @param name The name of the property.
99 @return string containing the currnet value of the property specified.
100 @exception UnrecognizedConfigProperty if the property is not defined.
101 */
102 const String getCurrentValue(const String& name);
103 //throw (UnrecognizedConfigProperty);
104
105 /**
106 Get planned value of the specified property.
107
108 @param name The name of the property.
109 @return string containing the planned value of the property specified.
110 @exception UnrecognizedConfigProperty if the property is not defined.
111 mike 1.2 */
112 const String getPlannedValue(const String& name);
113 //throw (UnrecognizedConfigProperty);
114
115 /**
116 Init current value of the specified property to the specified value.
117 This method is expected to be called only once at the start of the
118 CIMOM. The property value will be initialized irrespective of whether
119 the property is dynamic or not.
120
121 @param name The name of the property.
122 @param value The current value of the property.
123 @exception UnrecognizedConfigProperty if the property is not defined.
124 @exception InvalidPropertyValue if the property value is not valid.
125 */
126 void initCurrentValue(const String& name, const String& value);
127 //throw (UnrecognizedConfigProperty, InvalidPropertyValue);
128
129
130 /**
131 Init planned value of the specified property to the specified value.
132 mike 1.2 This method is expected to be called only once at the start of the
133 CIMOM. The property value will be initialized irrespective of whether
134 the property is dynamic or not.
135
136 @param name The name of the property.
137 @param value The planned value of the property.
138 @exception UnrecognizedConfigProperty if the property is not defined.
139 @exception InvalidPropertyValue if the property value is not valid.
140 */
141 void initPlannedValue(const String& name, const String& value);
142 //throw (UnrecognizedConfigProperty, InvalidPropertyValue);
143
144 /**
145 Update current value of the specified property to the specified value.
146 The property value will be updated only if the property is dynamically
147 updatable.
148
149 @param name The name of the property.
150 @param value The current value of the property.
151 @exception NonDynamicConfigProperty if the property is not dynamic.
152 @exception InvalidPropertyValue if the property value is not valid.
153 mike 1.2 @exception UnrecognizedConfigProperty if the property is not defined.
154 */
155 void updateCurrentValue(const String& name, const String& value);
156 //throw (NonDynamicConfigProperty, InvalidPropertyValue,
157 // UnrecognizedConfigProperty);
158
159 /**
160 Update planned value of the specified property to the specified value.
161
162 @param name The name of the property.
163 @param value The planned value of the property.
164 @exception InvalidPropertyValue if the property value is not valid.
165 @exception UnrecognizedConfigProperty if the property is not defined.
166 */
167 void updatePlannedValue(const String& name, const String& value);
168 //throw (InvalidPropertyValue, UnrecognizedConfigProperty);
169
170 /**
171 Checks to see if the given value is valid or not.
172
173 @param name The name of the property.
174 mike 1.2 @param value The value of the property to be validated.
175 @return Boolean True if the specified value for the property is valid.
176 @exception UnrecognizedConfigProperty if the property is not defined.
177 */
178 Boolean isValid(const String& name, const String& value);
179 //throw (UnrecognizedConfigProperty);
180
181 /**
182 Checks to see if the specified property is dynamic or not.
183
184 @param name The name of the property.
185 @return Boolean True if the specified property is dynamic.
186 @exception UnrecognizedConfigProperty if the property is not defined.
187 */
188 Boolean isDynamic(const String& name);
189 //throw (UnrecognizedConfigProperty);
190
191 private:
|
192 kumpf 1.3 struct ConfigProperty* _lookupConfigProperty(const String& name);
193
|
194 mike 1.2 /**
195 The timeout property owned by this class
196 */
|
197 a.arora 1.7 AutoPtr<struct ConfigProperty> _shutdownTimeout; //PEP101
|
198 mike 1.2 };
199
200 PEGASUS_NAMESPACE_END
201
202 #endif /* Pegasus_ShutdownPropertyOwner_h */
|