1 martin 1.18 //%LICENSE////////////////////////////////////////////////////////////////
|
2 martin 1.19 //
|
3 martin 1.18 // Licensed to The Open Group (TOG) under one or more contributor license
4 // agreements. Refer to the OpenPegasusNOTICE.txt file distributed with
5 // this work for additional information regarding copyright ownership.
6 // Each contributor licenses this file to you under the OpenPegasus Open
7 // Source License; you may not use this file except in compliance with the
8 // License.
|
9 martin 1.19 //
|
10 martin 1.18 // Permission is hereby granted, free of charge, to any person obtaining a
11 // copy of this software and associated documentation files (the "Software"),
12 // to deal in the Software without restriction, including without limitation
13 // the rights to use, copy, modify, merge, publish, distribute, sublicense,
14 // and/or sell copies of the Software, and to permit persons to whom the
15 // Software is furnished to do so, subject to the following conditions:
|
16 martin 1.19 //
|
17 martin 1.18 // The above copyright notice and this permission notice shall be included
18 // in all copies or substantial portions of the Software.
|
19 martin 1.19 //
|
20 martin 1.18 // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
|
21 martin 1.19 // OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
22 martin 1.18 // MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
23 // IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
24 // CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
25 // TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
26 // SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
27 martin 1.19 //
|
28 martin 1.18 //////////////////////////////////////////////////////////////////////////
|
29 kumpf 1.1 //
30 //%/////////////////////////////////////////////////////////////////////////////
31
32
33 //////////////////////////////////////////////////////////////////////////////
|
34 david.dillard 1.12 //
|
35 kumpf 1.1 // This file defines the trace property owner class.
36 //
37 //////////////////////////////////////////////////////////////////////////////
38
39 #ifndef Pegasus_FileSystemPropertyOwner_h
40 #define Pegasus_FileSystemPropertyOwner_h
41
42 #include <Pegasus/Config/ConfigPropertyOwner.h>
|
43 a.arora 1.8 #include <Pegasus/Common/AutoPtr.h>
|
44 kumpf 1.1
45
46 PEGASUS_NAMESPACE_BEGIN
47
48 ///////////////////////////////////////////////////////////////////
49 // FileSystemPropertyOwner Class
50 ///////////////////////////////////////////////////////////////////
51
|
52 david.dillard 1.12 /**
|
53 kumpf 1.1 This is FileSystem property owner class that extends ConfigPropertyOwner
54 class and provide implementation.
55 */
|
56 kumpf 1.16 class PEGASUS_CONFIG_LINKAGE FileSystemPropertyOwner :
57 public ConfigPropertyOwner
|
58 kumpf 1.1 {
59 public:
60
61 /** Constructors */
62 FileSystemPropertyOwner();
63
64 /**
|
65 kumpf 1.16 Initialize the config properties.
|
66 kumpf 1.1
|
67 kumpf 1.16 This method is expected to be called only once at the start of the
68 CIMOM. It initializes the properties with the default values.
|
69 kumpf 1.1 */
70 void initialize();
71
72
|
73 david.dillard 1.12 /**
|
74 kumpf 1.16 Get information about the specified property.
|
75 kumpf 1.1
|
76 kumpf 1.16 @param propertyName The name of the property.
77 @param propertyInfo List to store the property info.
78 @exception UnrecognizedConfigProperty if the property is not defined.
|
79 kumpf 1.1 */
|
80 kumpf 1.16 void getPropertyInfo(
81 const String& name,
82 Array<String>& propertyInfo) const;
|
83 kumpf 1.1
|
84 david.dillard 1.12 /**
|
85 kumpf 1.16 Get default value of the specified property.
|
86 kumpf 1.1
|
87 kumpf 1.16 @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 kumpf 1.1 */
|
91 kumpf 1.16 String getDefaultValue(const String& name) const;
|
92 kumpf 1.1
|
93 david.dillard 1.12 /**
|
94 kumpf 1.16 Get current value of the specified property.
|
95 kumpf 1.1
|
96 kumpf 1.16 @param name The name of the property.
97 @return string containing the currnet value of the property specified.
98 @exception UnrecognizedConfigProperty if the property is not defined.
|
99 kumpf 1.1 */
|
100 kumpf 1.16 String getCurrentValue(const String& name) const;
|
101 kumpf 1.1
|
102 david.dillard 1.12 /**
|
103 kumpf 1.16 Get planned value of the specified property.
|
104 kumpf 1.1
|
105 kumpf 1.16 @param name The name of the property.
106 @return string containing the planned value of the property specified.
107 @exception UnrecognizedConfigProperty if the property is not defined.
|
108 kumpf 1.1 */
|
109 kumpf 1.16 String getPlannedValue(const String& name) const;
|
110 kumpf 1.1
|
111 david.dillard 1.12 /**
|
112 kumpf 1.16 Init current value of the specified property to the specified value.
113 This method is expected to be called only once at the start of the
114 CIMOM. The property value will be initialized irrespective of whether
115 the property is dynamic or not.
|
116 kumpf 1.1
|
117 kumpf 1.16 @param name The name of the property.
118 @param value The current value of the property.
119 @exception UnrecognizedConfigProperty if the property is not defined.
120 @exception InvalidPropertyValue if the property value is not valid.
|
121 kumpf 1.1 */
122 void initCurrentValue(const String& name, const String& value);
123
|
124 david.dillard 1.12 /**
|
125 kumpf 1.16 Init planned value of the specified property to the specified value.
126 This method is expected to be called only once at the start of the
127 CIMOM. The property value will be initialized irrespective of whether
128 the property is dynamic or not.
129
130 @param name The name of the property.
131 @param value The planned value of the property.
132 @exception UnrecognizedConfigProperty if the property is not defined.
133 @exception InvalidPropertyValue if the property value is not valid.
|
134 kumpf 1.1 */
|
135 david.dillard 1.12 void initPlannedValue(const String& name, const String& value);
|
136 kumpf 1.1
|
137 david.dillard 1.12 /**
|
138 kumpf 1.16 Update current value of the specified property to the specified value.
139 The property value will be updated only if the property is dynamically
140 updatable.
141
142 @param name The name of the property.
143 @param value The current value of the property.
|
144 venkat.puvvada 1.20 @param userName User requesting the update.
|
145 venkat.puvvada 1.21 @param timeoutSeconds Timeout in seconds to complete the update.
|
146 kumpf 1.16 @exception NonDynamicConfigProperty if the property is not dynamic.
147 @exception InvalidPropertyValue if the property value is not valid.
148 @exception UnrecognizedConfigProperty if the property is not defined.
|
149 kumpf 1.1 */
|
150 venkat.puvvada 1.20 void updateCurrentValue(
151 const String& name,
152 const String& value,
|
153 venkat.puvvada 1.21 const String& userName,
154 Uint32 timeoutSeconds);
|
155 kumpf 1.1 //throw (NonDynamicConfigProperty, InvalidPropertyValue,
156 // UnrecognizedConfigProperty);
157
|
158 david.dillard 1.12 /**
|
159 kumpf 1.16 Update planned value of the specified property to the specified value.
|
160 kumpf 1.1
|
161 kumpf 1.16 @param name The name of the property.
162 @param value The planned value of the property.
163 @exception InvalidPropertyValue if the property value is not valid.
164 @exception UnrecognizedConfigProperty if the property is not defined.
|
165 kumpf 1.1 */
166 void updatePlannedValue(const String& name, const String& value);
167
|
168 david.dillard 1.12 /**
|
169 kumpf 1.16 Checks to see if the given value is valid or not.
|
170 kumpf 1.1
|
171 kumpf 1.16 @param name The name of the property.
172 @param value The value of the property to be validated.
173 @return Boolean True if the specified value for the property is valid.
174 @exception UnrecognizedConfigProperty if the property is not defined.
|
175 kumpf 1.1 */
|
176 kumpf 1.16 Boolean isValid(const String& name, const String& value) const;
|
177 kumpf 1.1
|
178 david.dillard 1.12 /**
|
179 kumpf 1.16 Checks to see if the specified property is dynamic or not.
|
180 kumpf 1.1
|
181 kumpf 1.16 @param name The name of the property.
182 @return Boolean True if the specified property is dynamic.
183 @exception UnrecognizedConfigProperty if the property is not defined.
|
184 kumpf 1.1 */
|
185 kumpf 1.16 Boolean isDynamic(const String& name) const;
|
186 kumpf 1.1
187 private:
|
188 aruran.ms 1.14 struct ConfigProperty* _lookupConfigProperty(const String& name) const;
|
189 kumpf 1.2
|
190 kumpf 1.1 /**
|
191 kumpf 1.16 The file system properties owned by this class
|
192 kumpf 1.1 */
|
193 kumpf 1.16 AutoPtr<struct ConfigProperty> _repositoryDir;
|
194 david 1.7
|
195 kumpf 1.16 AutoPtr<struct ConfigProperty> _messageDir;
|
196 b.whiteley 1.17
197 AutoPtr<struct ConfigProperty> _providerManagerDir;
|
198 kumpf 1.1 };
199
200 PEGASUS_NAMESPACE_END
201
202 #endif /* Pegasus_FileSystemPropertyOwner_h */
|