1 martin 1.27 //%LICENSE////////////////////////////////////////////////////////////////
|
2 martin 1.28 //
|
3 martin 1.27 // 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.28 //
|
10 martin 1.27 // 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.28 //
|
17 martin 1.27 // The above copyright notice and this permission notice shall be included
18 // in all copies or substantial portions of the Software.
|
19 martin 1.28 //
|
20 martin 1.27 // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
|
21 martin 1.28 // OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
22 martin 1.27 // 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.28 //
|
28 martin 1.27 //////////////////////////////////////////////////////////////////////////
|
29 chip 1.1 //
30 //%/////////////////////////////////////////////////////////////////////////////
31
32 #ifndef Pegasus_CIMAssociationProvider_h
33 #define Pegasus_CIMAssociationProvider_h
34
35 #include <Pegasus/Common/Config.h>
|
36 kumpf 1.14 #include <Pegasus/Provider/CIMProvider.h>
|
37 chip 1.1
38 #include <Pegasus/Common/Array.h>
39 #include <Pegasus/Common/String.h>
|
40 kumpf 1.11 #include <Pegasus/Common/CIMName.h>
|
41 kumpf 1.5 #include <Pegasus/Common/CIMPropertyList.h>
|
42 kumpf 1.6 #include <Pegasus/Common/CIMObjectPath.h>
|
43 chip 1.1 #include <Pegasus/Common/CIMInstance.h>
|
44 kumpf 1.10 #include <Pegasus/Provider/Linkage.h>
|
45 chip 1.1
46 PEGASUS_NAMESPACE_BEGIN
47
48 /**
|
49 kumpf 1.23 This class defines the set of methods implemented by an association
50 provider. A providers that derives from this class must implement all of
|
51 kumpf 1.26 the methods. A minimal method implementation simply throws a
52 CIMNotSupportedException. The methods match the association operations
53 defined for the client:
|
54 kumpf 1.23 <UL>
55 <LI> referenceNames
56 <LI> references
57 <LI> associatorNames
58 <LI> associators
59 </UL>
|
60 kumpf 1.26 Provider instrumentation differs semantically from a client request in
61 that a provider implementation is specific to one association class while
62 a client request may span many association classes. Also, an assocation
63 provider deals only with instance data, while a client may also issue
64 class level association requests.
|
65 chip 1.1 */
|
66 kumpf 1.23 class PEGASUS_PROVIDER_LINKAGE CIMAssociationProvider :
67 public virtual CIMProvider
|
68 chip 1.1 {
69 public:
|
70 kumpf 1.26 /**
71 Constructs a default CIMAssociationProvider object.
72 */
|
73 kumpf 1.23 CIMAssociationProvider();
|
74 kumpf 1.26
75 /**
76 Destructs a CIMAssociationProvider object.
77 */
|
78 kumpf 1.23 virtual ~CIMAssociationProvider();
|
79 chip 1.1
|
80 kumpf 1.26 /**
81 Enumerates CIM instances that are associated to a specified instance
82 via a specified association class.
83
84 @param context An OperationContext object containing the context for
85 the processing of the operation. The context includes the name of
86 the requesting user, language information, and other data.
87
88 @param objectName A fully qualified CIMObjectPath specifying the
89 "source" instance for which to enumerate associated instances.
90
91 @param associationClass The name of the association class through
92 which the returned instances are associated with the source
93 instance. Instances associated through another class must not be
94 returned.
95
96 @param resultClass The name of the class to which the returned
97 instances must belong. Instances of this class and its subclasses
98 may be returned, but not instances of another class. If null,
99 the set of returned instances is not constrained by their class.
100
101 kumpf 1.26 @param role The role of the source instance in the association
102 instance. If the role is not an empty string, the returned
103 instances must be associated with the source instance such that
104 the name of the assocation property referring to the source
105 instance matches the role value.
106
107 @param resultRole The role of the returned instances in the association
108 instance. If the role is not an empty string, the returned
109 instances must be associated with the source instance such that
110 the name of the assocation property referring to the returned
111 instances matches the role value.
112
113 @param includeQualifiers A Boolean indicating whether the returned
114 instances must include the qualifiers for the instance and its
115 properties. Qualifiers may be included even if this flag is false.
116
117 @param includeClassOrigin A Boolean indicating whether the returned
118 instances must include the class origin for each of the instance
119 elements.
120
121 @param propertyList A CIMPropertyList specifying the minimum set of
122 kumpf 1.26 properties required in the returned instances. Support for this
123 parameter is optional, so the returned instance may contain
124 properties not specified in the list. A null propertyList
125 indicates that all properties must be included. A non-null,
126 but empty, propertyList indicates that no properites are required.
127
128 @param handler ResponseHandler object for delivery of results.
129 Note: The delivered instances are expected to contain the
130 instance path. If the host and namespace are not included in the
131 path, they are added by the CIM Server.
132
133 @exception CIMNotSupportedException
134 @exception CIMInvalidParameterException
135 @exception CIMAccessDeniedException
136 @exception CIMOperationFailedException
|
137 chip 1.4 */
138 virtual void associators(
|
139 kumpf 1.23 const OperationContext & context,
140 const CIMObjectPath & objectName,
141 const CIMName & associationClass,
142 const CIMName & resultClass,
143 const String & role,
144 const String & resultRole,
145 const Boolean includeQualifiers,
146 const Boolean includeClassOrigin,
147 const CIMPropertyList & propertyList,
148 ObjectResponseHandler & handler) = 0;
|
149 chip 1.4
|
150 kumpf 1.26 /**
151 Enumerates CIM instance names that are associated to a specified
152 instance via a specified association class.
153
154 @param context An OperationContext object containing the context for
155 the processing of the operation. The context includes the name of
156 the requesting user, language information, and other data.
157
158 @param objectName A fully qualified CIMObjectPath specifying the
159 "source" instance for which to enumerate associated instance names.
160
161 @param associationClass The name of the association class through
162 which the returned instance names are associated with the source
163 instance. Names of instances associated through another class
164 must not be returned.
165
166 @param resultClass The name of the class to which the returned
167 instance names must belong. Names of instances of this class and
168 its subclasses may be returned, but not instances of another class.
169 If null, the set of returned instance names is not constrained by
170 their class.
171 kumpf 1.26
172 @param role The role of the source instance in the association
173 instance. If the role is not an empty string, the returned
174 instance names must be associated with the source instance such
175 that the name of the assocation property referring to the source
176 instance matches the role value.
177
178 @param resultRole The role of the returned instance names in the
179 association instance. If the role is not an empty string, the
180 returned instance names must be associated with the source
181 instance such that the name of the assocation property referring
182 to the returned instance names matches the role value.
183
184 @param handler ResponseHandler object for delivery of results.
185 Note: The delivered instance names are expected to contain host
186 and namespace information. If not included, they are added by
187 the CIM Server.
188
189 @exception CIMNotSupportedException
190 @exception CIMInvalidParameterException
191 @exception CIMAccessDeniedException
192 kumpf 1.26 @exception CIMOperationFailedException
|
193 chip 1.4 */
194 virtual void associatorNames(
|
195 kumpf 1.23 const OperationContext & context,
196 const CIMObjectPath & objectName,
197 const CIMName & associationClass,
198 const CIMName & resultClass,
199 const String & role,
200 const String & resultRole,
201 ObjectPathResponseHandler & handler) = 0;
|
202 chip 1.4
|
203 kumpf 1.26 /**
204 Enumerates CIM association instances that refer to a specified
205 instance.
206
207 @param context An OperationContext object containing the context for
208 the processing of the operation. The context includes the name of
209 the requesting user, language information, and other data.
210
211 @param objectName A fully qualified CIMObjectPath specifying the
212 "source" instance for which to enumerate referring instances.
213
214 @param resultClass The class name of the association instances to be
215 returned. Instances of other classes must not be returned.
216
217 @param role The role of the source instance in the association
218 instance. If the role is not an empty string, the returned
219 association instances must refer to the source instance via a
220 property whose name matches the role value.
221
222 @param includeQualifiers A Boolean indicating whether the returned
223 instances must include the qualifiers for the instance and its
224 kumpf 1.26 properties. Qualifiers may be included even if this flag is false.
225
226 @param includeClassOrigin A Boolean indicating whether the returned
227 instances must include the class origin for each of the instance
228 elements.
229
230 @param propertyList A CIMPropertyList specifying the minimum set of
231 properties required in the returned instances. Support for this
232 parameter is optional, so the returned instance may contain
233 properties not specified in the list. A null propertyList
234 indicates that all properties must be included. A non-null,
235 but empty, propertyList indicates that no properites are required.
236
237 @param handler ResponseHandler object for delivery of results.
238 Note: The delivered instances are expected to contain the
239 instance path. If the host and namespace are not included in the
240 path, they are added by the CIM Server.
241
242 @exception CIMNotSupportedException
243 @exception CIMInvalidParameterException
244 @exception CIMAccessDeniedException
245 kumpf 1.26 @exception CIMOperationFailedException
|
246 chip 1.4 */
247 virtual void references(
|
248 kumpf 1.23 const OperationContext & context,
249 const CIMObjectPath & objectName,
250 const CIMName & resultClass,
251 const String & role,
252 const Boolean includeQualifiers,
253 const Boolean includeClassOrigin,
254 const CIMPropertyList & propertyList,
255 ObjectResponseHandler & handler) = 0;
256
|
257 kumpf 1.26 /**
258 Enumerates the names of CIM association instances that refer to a
259 specified instance.
260
261 @param context An OperationContext object containing the context for
262 the processing of the operation. The context includes the name of
263 the requesting user, language information, and other data.
264
265 @param objectName A fully qualified CIMObjectPath specifying the
266 "source" instance for which to enumerate referring instance names.
267
268 @param resultClass The class name of the association instance names to
269 be returned. Names of instances of other classes must not be
270 returned.
271
272 @param role The role of the source instance in the association
273 instance. If the role is not an empty string, the returned
274 association instance names must refer to the source instance via a
275 property whose name matches the role value.
276
277 @param handler ResponseHandler object for delivery of results.
278 kumpf 1.26 Note: The delivered instance names are expected to contain host
279 and namespace information. If not included, they are added by
280 the CIM Server.
281
282 @exception CIMNotSupportedException
283 @exception CIMInvalidParameterException
284 @exception CIMAccessDeniedException
285 @exception CIMOperationFailedException
|
286 chip 1.4 */
287 virtual void referenceNames(
|
288 kumpf 1.23 const OperationContext & context,
289 const CIMObjectPath & objectName,
290 const CIMName & resultClass,
291 const String & role,
292 ObjectPathResponseHandler & handler) = 0;
|
293 chip 1.1 };
294
295 PEGASUS_NAMESPACE_END
296
297 #endif
|