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.6 // 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 repository property owner class.
38 //
39 //////////////////////////////////////////////////////////////////////////////
40
41 #ifndef Pegasus_RepositoryPropertyOwner_h
42 #define Pegasus_RepositoryPropertyOwner_h
43
44 #include <Pegasus/Config/ConfigPropertyOwner.h>
45
46
47 PEGASUS_NAMESPACE_BEGIN
48
49 ///////////////////////////////////////////////////////////////////
50 // RepositoryPropertyOwner Class
51 ///////////////////////////////////////////////////////////////////
52
|
53 david.dillard 1.12 /**
|
54 mike 1.2 This is Repository property owner class that extends ConfigPropertyOwner
55 class and provides an implementation for repository-related configuration
56 properties.
57 */
|
58 kumpf 1.16 class PEGASUS_CONFIG_LINKAGE RepositoryPropertyOwner :
59 public ConfigPropertyOwner
|
60 mike 1.2 {
61 public:
62
63 /** Constructors */
64 RepositoryPropertyOwner();
65
66 /** Destructor */
67 ~RepositoryPropertyOwner();
68
69 /**
|
70 kumpf 1.16 Initialize the config properties.
|
71 mike 1.2
|
72 kumpf 1.16 This method is expected to be called only once at the start of the
73 CIMOM. It initializes the properties with the default values.
|
74 mike 1.2 */
75 void initialize();
76
|
77 david.dillard 1.12 /**
|
78 kumpf 1.16 Get information about the specified property.
|
79 mike 1.2
|
80 kumpf 1.16 @param propertyName The name of the property.
81 @param propertyInfo List to store the property info.
82 @exception UnrecognizedConfigProperty if the property is not defined.
|
83 mike 1.2 */
|
84 kumpf 1.16 void getPropertyInfo(const String& name, Array<String>& propertyInfo) const;
|
85 mike 1.2
|
86 david.dillard 1.12 /**
|
87 kumpf 1.16 Get default value of the specified property.
|
88 mike 1.2
|
89 kumpf 1.16 @param name The name of the property.
90 @return string containing the default value of the property specified.
91 @exception UnrecognizedConfigProperty if the property is not defined.
|
92 mike 1.2 */
|
93 kumpf 1.16 String getDefaultValue(const String& name) const;
|
94 mike 1.2
|
95 david.dillard 1.12 /**
|
96 kumpf 1.16 Get current value of the specified property.
|
97 mike 1.2
|
98 kumpf 1.16 @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 mike 1.2 */
|
102 kumpf 1.16 String getCurrentValue(const String& name) const;
|
103 mike 1.2
|
104 david.dillard 1.12 /**
|
105 kumpf 1.16 Get planned value of the specified property.
|
106 mike 1.2
|
107 kumpf 1.16 @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 mike 1.2 */
|
111 kumpf 1.16 String getPlannedValue(const String& name) const;
|
112 mike 1.2
|
113 david.dillard 1.12 /**
|
114 kumpf 1.16 Init current value of the specified property to the specified value.
115 This method is expected to be called only once at the start of the
116 CIMOM. The property value will be initialized irrespective of whether
117 the property is dynamic or not.
|
118 mike 1.2
|
119 kumpf 1.16 @param name The name of the property.
120 @param value The current value of the property.
121 @exception UnrecognizedConfigProperty if the property is not defined.
122 @exception InvalidPropertyValue if the property value is not valid.
|
123 mike 1.2 */
124 void initCurrentValue(const String& name, const String& value);
125
|
126 david.dillard 1.12 /**
|
127 kumpf 1.16 Init planned value of the specified property to the specified value.
128 This method is expected to be called only once at the start of the
129 CIMOM. The property value will be initialized irrespective of whether
130 the property is dynamic or not.
131
132 @param name The name of the property.
133 @param value The planned value of the property.
134 @exception UnrecognizedConfigProperty if the property is not defined.
135 @exception InvalidPropertyValue if the property value is not valid.
|
136 mike 1.2 */
|
137 david.dillard 1.12 void initPlannedValue(const String& name, const String& value);
|
138 mike 1.2
|
139 david.dillard 1.12 /**
|
140 kumpf 1.16 Update current value of the specified property to the specified value.
141 The property value will be updated only if the property is dynamically
142 updatable.
143
144 @param name The name of the property.
145 @param value The current value of the property.
146 @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 mike 1.2 */
150 void updateCurrentValue(const String& name, const String& value);
151 //throw (NonDynamicConfigProperty, InvalidPropertyValue,
152 // UnrecognizedConfigProperty);
153
|
154 david.dillard 1.12 /**
|
155 kumpf 1.16 Update planned value of the specified property to the specified value.
|
156 mike 1.2
|
157 kumpf 1.16 @param name The name of the property.
158 @param value The planned value of the property.
159 @exception InvalidPropertyValue if the property value is not valid.
160 @exception UnrecognizedConfigProperty if the property is not defined.
|
161 mike 1.2 */
162 void updatePlannedValue(const String& name, const String& value);
163
|
164 david.dillard 1.12 /**
|
165 kumpf 1.16 Checks to see if the given value is valid or not.
|
166 mike 1.2
|
167 kumpf 1.16 @param name The name of the property.
168 @param value The value of the property to be validated.
169 @return Boolean True if the specified value for the property is valid.
170 @exception UnrecognizedConfigProperty if the property is not defined.
|
171 mike 1.2 */
|
172 kumpf 1.16 Boolean isValid(const String& name, const String& value) const;
|
173 mike 1.2
174
|
175 david.dillard 1.12 /**
|
176 kumpf 1.16 Checks to see if the specified property is dynamic or not.
|
177 mike 1.2
|
178 kumpf 1.16 @param name The name of the property.
179 @return Boolean True if the specified property is dynamic.
180 @exception UnrecognizedConfigProperty if the property is not defined.
|
181 mike 1.2 */
|
182 kumpf 1.16 Boolean isDynamic(const String& name) const;
|
183 mike 1.2
184
185 private:
186
|
187 aruran.ms 1.14 struct ConfigProperty* _lookupConfigProperty(const String& name) const;
|
188 kumpf 1.4
|
189 mike 1.2 /**
|
190 kumpf 1.16 The repository properties owned by this class
|
191 mike 1.2 */
|
192 kumpf 1.16 struct ConfigProperty* _repositoryIsDefaultInstanceProvider;
193 struct ConfigProperty* _enableBinaryRepository;
|
194 mike 1.2 };
195
196 PEGASUS_NAMESPACE_END
197
198 #endif /* Pegasus_RepositoryPropertyOwner_h */
|