1 karl 1.34 //%2006////////////////////////////////////////////////////////////////////////
|
2 mike 1.2 //
|
3 karl 1.26 // 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.22 // IBM Corp.; EMC Corporation, The Open Group.
|
7 karl 1.26 // 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.30 // Copyright (c) 2005 Hewlett-Packard Development Company, L.P.; IBM Corp.;
10 // EMC Corporation; VERITAS Software Corporation; The Open Group.
|
11 karl 1.34 // 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 kumpf 1.8 //
|
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 #include "OperationContext.h"
|
35 kumpf 1.10 #include "ArrayInternal.h"
|
36 kumpf 1.39 #include <Pegasus/Common/MessageLoader.h>
|
37 mike 1.2
|
38 kumpf 1.42 #if defined(PEGASUS_PLATFORM_LINUX_GENERIC_GNU) || \
39 defined(PEGASUS_PLATFORM_DARWIN_PPC_GNU) || \
40 defined(PEGASUS_PLATFORM_DARWIN_IX86_GNU)
41 # define PEGASUS_INCLUDE_SUPERCLASS_INITIALIZER
42 #endif
43
|
44 mike 1.2 PEGASUS_NAMESPACE_BEGIN
45
|
46 chip 1.5 //
47 // OperationContext
48 //
|
49 kumpf 1.11
|
50 kumpf 1.7 class OperationContextRep
51 {
52 public:
|
53 kumpf 1.39 Array<OperationContext::Container*> containers;
|
54 kumpf 1.7 };
55
|
56 kumpf 1.39 OperationContext::OperationContext()
|
57 mike 1.2 {
|
58 kumpf 1.7 _rep = new OperationContextRep;
|
59 mike 1.2 }
60
|
61 kumpf 1.39 OperationContext::OperationContext(const OperationContext& context)
|
62 chip 1.4 {
|
63 kumpf 1.7 _rep = new OperationContextRep;
|
64 chip 1.6 *this = context;
|
65 chip 1.4 }
66
|
67 kumpf 1.39 OperationContext::~OperationContext()
|
68 chip 1.3 {
|
69 chip 1.5 clear();
|
70 kumpf 1.7 delete _rep;
|
71 chip 1.5 }
72
|
73 kumpf 1.39 OperationContext& OperationContext::operator=(const OperationContext& context)
|
74 chip 1.5 {
|
75 kumpf 1.39 if (this == &context)
|
76 chip 1.5 {
|
77 kumpf 1.39 return *this;
|
78 chip 1.5 }
79
80 clear();
81
|
82 kumpf 1.39 for (Uint32 i = 0, n = context._rep->containers.size(); i < n; i++)
|
83 chip 1.5 {
|
84 kumpf 1.7 _rep->containers.append(context._rep->containers[i]->clone());
|
85 chip 1.5 }
86
|
87 kumpf 1.39 return *this;
|
88 chip 1.3 }
89
|
90 kumpf 1.39 void OperationContext::clear()
|
91 chip 1.3 {
|
92 kumpf 1.39 for (Uint32 i = 0, n = _rep->containers.size(); i < n; i++)
|
93 chip 1.5 {
|
94 kumpf 1.11 _rep->containers[i]->destroy();
|
95 chip 1.5 }
96
|
97 kumpf 1.7 _rep->containers.clear();
|
98 chip 1.3 }
99
|
100 kumpf 1.39 const OperationContext::Container& OperationContext::get(
|
101 kumpf 1.11 const String& containerName) const
102 {
|
103 mike 1.32 Uint32 size = _rep->containers.size();
104 Container** data = (Container**)_rep->containers.getData();
105
106 for (; size--; data++)
|
107 kumpf 1.39 if (data[0]->getName() == containerName)
108 return *(data[0]);
|
109 kumpf 1.11
|
110 mike 1.32 static Exception _exception(MessageLoaderParms(
|
111 kumpf 1.39 "Common.OperationContext.OBJECT_NOT_FOUND", "object not found"));
|
112 kumpf 1.11
|
113 mike 1.32 throw Exception(_exception);
|
114 kumpf 1.11 }
115
|
116 a.dunfey 1.38 Boolean OperationContext::contains(
117 const String& containerName) const
118 {
119 Uint32 size = _rep->containers.size();
120 Container** data = (Container**)_rep->containers.getData();
121
122 for (; size--; data++)
123 {
124 if (data[0]->getName() == containerName)
125 return true;
126 }
127
128 return false;
129 }
130
|
131 kumpf 1.39 void OperationContext::set(const OperationContext::Container& container)
|
132 chip 1.3 {
|
133 kumpf 1.39 for (Uint32 i = 0, n = _rep->containers.size(); i < n; i++)
|
134 chip 1.3 {
|
135 kumpf 1.39 if (container.getName() == _rep->containers[i]->getName())
|
136 chip 1.3 {
137 // delete previous container
|
138 kumpf 1.11 _rep->containers[i]->destroy();
|
139 kumpf 1.7 _rep->containers.remove(i);
|
140 chip 1.3
141 // append current container
|
142 kumpf 1.7 _rep->containers.append(container.clone());
|
143 chip 1.3
144 return;
145 }
146 }
147
|
148 kumpf 1.39 MessageLoaderParms parms(
149 "Common.OperationContext.OBJECT_NOT_FOUND",
150 "object not found");
|
151 humberto 1.19 throw Exception(parms);
|
152 chip 1.3 }
153
|
154 kumpf 1.39 void OperationContext::insert(const OperationContext::Container& container)
|
155 chip 1.3 {
|
156 kumpf 1.39 for (Uint32 i = 0, n = _rep->containers.size(); i < n; i++)
|
157 chip 1.3 {
|
158 kumpf 1.39 if (container.getName() == _rep->containers[i]->getName())
|
159 chip 1.3 {
|
160 kumpf 1.39 MessageLoaderParms parms(
161 "Common.OperationContext.OBJECT_ALREADY_EXISTS",
162 "object already exists.");
163 throw Exception(parms);
|
164 chip 1.3 }
165 }
166
|
167 kumpf 1.7 _rep->containers.append(container.clone());
|
168 chip 1.3 }
169
|
170 kumpf 1.11 void OperationContext::remove(const String& containerName)
171 {
|
172 kumpf 1.39 for (Uint32 i = 0, n = _rep->containers.size(); i < n; i++)
|
173 kumpf 1.11 {
|
174 kumpf 1.39 if (containerName == _rep->containers[i]->getName())
|
175 kumpf 1.11 {
176 _rep->containers[i]->destroy();
177 _rep->containers.remove(i);
178
179 return;
180 }
181 }
182
|
183 kumpf 1.39 MessageLoaderParms parms(
184 "Common.OperationContext.OBJECT_NOT_FOUND",
185 "object not found");
|
186 humberto 1.19 throw Exception(parms);
|
187 kumpf 1.11 }
|
188 kumpf 1.39
|
189 chip 1.3
|
190 chip 1.5 //
191 // OperationContext::Container
192 //
|
193 kumpf 1.11
|
194 kumpf 1.39 OperationContext::Container::~Container()
|
195 chip 1.3 {
196 }
197
|
198 chip 1.5
199 //
|
200 kumpf 1.7 // IdentityContainer
|
201 chip 1.5 //
202
|
203 kumpf 1.11 class IdentityContainerRep
|
204 chip 1.3 {
|
205 kumpf 1.11 public:
206 String userName;
207 };
|
208 chip 1.3
|
209 kumpf 1.11 const String IdentityContainer::NAME = "IdentityContainer";
|
210 chip 1.5
|
211 kumpf 1.39 IdentityContainer::IdentityContainer(
212 const OperationContext::Container& container)
|
213 chip 1.5 {
|
214 kumpf 1.39 const IdentityContainer* p =
215 dynamic_cast<const IdentityContainer*>(&container);
|
216 chip 1.5
|
217 kumpf 1.39 if (p == 0)
|
218 chip 1.5 {
|
219 kumpf 1.9 throw DynamicCastFailedException();
|
220 chip 1.5 }
221
|
222 kumpf 1.11 _rep = new IdentityContainerRep();
223 _rep->userName = p->_rep->userName;
|
224 mike 1.2 }
225
|
226 kumpf 1.39 IdentityContainer::IdentityContainer(const IdentityContainer& container)
|
227 kumpf 1.42 #ifdef PEGASUS_INCLUDE_SUPERCLASS_INITIALIZER
|
228 kumpf 1.39 : OperationContext::Container()
|
229 w.otsuka 1.31 #endif
|
230 kumpf 1.16 {
231 _rep = new IdentityContainerRep();
232 _rep->userName = container._rep->userName;
233 }
234
|
235 kumpf 1.39 IdentityContainer::IdentityContainer(const String& userName)
|
236 chip 1.3 {
|
237 kumpf 1.11 _rep = new IdentityContainerRep();
238 _rep->userName = userName;
|
239 chip 1.3 }
240
|
241 kumpf 1.39 IdentityContainer::~IdentityContainer()
|
242 chip 1.5 {
|
243 kumpf 1.11 delete _rep;
|
244 kumpf 1.16 }
245
|
246 kumpf 1.39 IdentityContainer& IdentityContainer::operator=(
247 const IdentityContainer& container)
|
248 kumpf 1.16 {
249 if (this == &container)
250 {
|
251 kumpf 1.39 return *this;
|
252 kumpf 1.16 }
253
254 _rep->userName = container._rep->userName;
255
|
256 kumpf 1.39 return *this;
|
257 chip 1.5 }
258
|
259 kumpf 1.39 String IdentityContainer::getName() const
|
260 chip 1.5 {
|
261 kumpf 1.39 return NAME;
|
262 chip 1.5 }
263
|
264 kumpf 1.39 OperationContext::Container* IdentityContainer::clone() const
|
265 chip 1.5 {
|
266 kumpf 1.39 return new IdentityContainer(_rep->userName);
|
267 chip 1.5 }
268
|
269 kumpf 1.39 void IdentityContainer::destroy()
|
270 chip 1.5 {
|
271 kumpf 1.11 delete this;
|
272 chip 1.5 }
273
|
274 kumpf 1.39 String IdentityContainer::getUserName() const
|
275 chip 1.3 {
|
276 kumpf 1.39 return _rep->userName;
|
277 kumpf 1.15 }
278
|
279 kumpf 1.24
|
280 kumpf 1.15 //
281 // SubscriptionInstanceContainer
282 //
283
284 class SubscriptionInstanceContainerRep
285 {
286 public:
287 CIMInstance subscriptionInstance;
288 };
289
290 const String SubscriptionInstanceContainer::NAME =
291 "SubscriptionInstanceContainer";
292
|
293 kumpf 1.39 SubscriptionInstanceContainer::SubscriptionInstanceContainer(
294 const OperationContext::Container& container)
|
295 kumpf 1.15 {
|
296 kumpf 1.39 const SubscriptionInstanceContainer* p =
297 dynamic_cast<const SubscriptionInstanceContainer*>(&container);
|
298 kumpf 1.15
|
299 kumpf 1.39 if (p == 0)
|
300 kumpf 1.15 {
301 throw DynamicCastFailedException();
302 }
303
304 _rep = new SubscriptionInstanceContainerRep();
305 _rep->subscriptionInstance = p->_rep->subscriptionInstance;
306 }
307
|
308 kumpf 1.39 SubscriptionInstanceContainer::SubscriptionInstanceContainer(
309 const SubscriptionInstanceContainer& container)
|
310 kumpf 1.42 #ifdef PEGASUS_INCLUDE_SUPERCLASS_INITIALIZER
|
311 kumpf 1.39 : OperationContext::Container()
|
312 w.otsuka 1.31 #endif
|
313 kumpf 1.15 {
314 _rep = new SubscriptionInstanceContainerRep();
315 _rep->subscriptionInstance = container._rep->subscriptionInstance;
316 }
317
|
318 kumpf 1.39 SubscriptionInstanceContainer::SubscriptionInstanceContainer(
319 const CIMInstance& subscriptionInstance)
|
320 kumpf 1.15 {
321 _rep = new SubscriptionInstanceContainerRep();
322 _rep->subscriptionInstance = subscriptionInstance;
323 }
324
|
325 kumpf 1.39 SubscriptionInstanceContainer::~SubscriptionInstanceContainer()
|
326 kumpf 1.15 {
327 delete _rep;
328 }
329
|
330 kumpf 1.39 SubscriptionInstanceContainer& SubscriptionInstanceContainer::operator=(
331 const SubscriptionInstanceContainer& container)
|
332 kumpf 1.15 {
333 if (this == &container)
334 {
|
335 kumpf 1.39 return *this;
|
336 kumpf 1.15 }
337
338 _rep->subscriptionInstance = container._rep->subscriptionInstance;
339
|
340 kumpf 1.39 return *this;
|
341 kumpf 1.15 }
342
|
343 kumpf 1.39 String SubscriptionInstanceContainer::getName() const
|
344 kumpf 1.15 {
|
345 kumpf 1.39 return NAME;
|
346 kumpf 1.15 }
347
|
348 kumpf 1.39 OperationContext::Container* SubscriptionInstanceContainer::clone() const
|
349 kumpf 1.15 {
|
350 kumpf 1.39 return new SubscriptionInstanceContainer(_rep->subscriptionInstance);
|
351 kumpf 1.15 }
352
|
353 kumpf 1.39 void SubscriptionInstanceContainer::destroy()
|
354 kumpf 1.15 {
355 delete this;
356 }
357
|
358 kumpf 1.39 CIMInstance SubscriptionInstanceContainer::getInstance() const
|
359 kumpf 1.15 {
|
360 kumpf 1.39 return _rep->subscriptionInstance;
|
361 kumpf 1.15 }
362
363
364 //
365 // SubscriptionInstanceNamesContainer
366 //
367
368 class SubscriptionInstanceNamesContainerRep
369 {
370 public:
371 Array<CIMObjectPath> subscriptionInstanceNames;
372 };
373
|
374 kumpf 1.39 const String SubscriptionInstanceNamesContainer::NAME =
|
375 kumpf 1.15 "SubscriptionInstanceNamesContainer";
376
|
377 kumpf 1.39 SubscriptionInstanceNamesContainer::SubscriptionInstanceNamesContainer(
378 const OperationContext::Container& container)
|
379 kumpf 1.15 {
|
380 kumpf 1.39 const SubscriptionInstanceNamesContainer* p =
381 dynamic_cast<const SubscriptionInstanceNamesContainer*>(&container);
|
382 kumpf 1.15
|
383 kumpf 1.39 if (p == 0)
|
384 kumpf 1.15 {
385 throw DynamicCastFailedException();
386 }
387
388 _rep = new SubscriptionInstanceNamesContainerRep();
389 _rep->subscriptionInstanceNames = p->_rep->subscriptionInstanceNames;
390 }
391
|
392 kumpf 1.39 SubscriptionInstanceNamesContainer::SubscriptionInstanceNamesContainer(
393 const SubscriptionInstanceNamesContainer& container)
|
394 kumpf 1.42 #ifdef PEGASUS_INCLUDE_SUPERCLASS_INITIALIZER
|
395 kumpf 1.39 : OperationContext::Container()
|
396 w.otsuka 1.31 #endif
|
397 kumpf 1.15 {
398 _rep = new SubscriptionInstanceNamesContainerRep();
399 _rep->subscriptionInstanceNames = container._rep->subscriptionInstanceNames;
400 }
401
|
402 kumpf 1.39 SubscriptionInstanceNamesContainer::SubscriptionInstanceNamesContainer(
403 const Array<CIMObjectPath>& subscriptionInstanceNames)
|
404 kumpf 1.15 {
405 _rep = new SubscriptionInstanceNamesContainerRep();
406 _rep->subscriptionInstanceNames = subscriptionInstanceNames;
407 }
408
|
409 kumpf 1.39 SubscriptionInstanceNamesContainer::~SubscriptionInstanceNamesContainer()
|
410 kumpf 1.15 {
411 delete _rep;
412 }
413
|
414 kumpf 1.39 SubscriptionInstanceNamesContainer&
|
415 kumpf 1.15 SubscriptionInstanceNamesContainer::operator=(
|
416 kumpf 1.39 const SubscriptionInstanceNamesContainer& container)
|
417 kumpf 1.15 {
418 if (this == &container)
419 {
|
420 kumpf 1.39 return *this;
|
421 kumpf 1.15 }
422
423 _rep->subscriptionInstanceNames = container._rep->subscriptionInstanceNames;
424
|
425 kumpf 1.39 return *this;
|
426 kumpf 1.15 }
427
|
428 kumpf 1.39 String SubscriptionInstanceNamesContainer::getName() const
|
429 kumpf 1.15 {
|
430 kumpf 1.39 return NAME;
|
431 kumpf 1.15 }
432
|
433 kumpf 1.39 OperationContext::Container*
434 SubscriptionInstanceNamesContainer::clone() const
|
435 kumpf 1.15 {
|
436 kumpf 1.39 return new SubscriptionInstanceNamesContainer(
437 _rep->subscriptionInstanceNames);
|
438 kumpf 1.15 }
439
|
440 kumpf 1.39 void SubscriptionInstanceNamesContainer::destroy()
|
441 kumpf 1.15 {
442 delete this;
443 }
444
|
445 kumpf 1.39 Array<CIMObjectPath>
446 SubscriptionInstanceNamesContainer::getInstanceNames() const
|
447 kumpf 1.15 {
|
448 kumpf 1.39 return _rep->subscriptionInstanceNames;
|
449 kumpf 1.15 }
450
|
451 kumpf 1.24
|
452 kumpf 1.15 //
453 // SubscriptionFilterConditionContainer
454 //
455
456 class SubscriptionFilterConditionContainerRep
457 {
458 public:
459 String filterCondition;
460 String queryLanguage;
461 };
462
|
463 kumpf 1.39 const String SubscriptionFilterConditionContainer::NAME =
|
464 kumpf 1.15 "SubscriptionFilterConditionContainer";
465
|
466 kumpf 1.39 SubscriptionFilterConditionContainer::SubscriptionFilterConditionContainer(
467 const OperationContext::Container& container)
|
468 kumpf 1.15 {
|
469 kumpf 1.39 const SubscriptionFilterConditionContainer* p =
470 dynamic_cast<const SubscriptionFilterConditionContainer*>(&container);
|
471 kumpf 1.15
|
472 kumpf 1.39 if (p == 0)
|
473 kumpf 1.15 {
474 throw DynamicCastFailedException();
475 }
476
477 _rep = new SubscriptionFilterConditionContainerRep();
478 _rep->filterCondition = p->_rep->filterCondition;
479 _rep->queryLanguage = p->_rep->queryLanguage;
480 }
481
|
482 kumpf 1.39 SubscriptionFilterConditionContainer::SubscriptionFilterConditionContainer(
483 const SubscriptionFilterConditionContainer& container)
|
484 kumpf 1.42 #ifdef PEGASUS_INCLUDE_SUPERCLASS_INITIALIZER
|
485 kumpf 1.39 : OperationContext::Container()
|
486 w.otsuka 1.31 #endif
|
487 kumpf 1.15 {
488 _rep = new SubscriptionFilterConditionContainerRep();
489 _rep->filterCondition = container._rep->filterCondition;
490 _rep->queryLanguage = container._rep->queryLanguage;
491 }
492
493 SubscriptionFilterConditionContainer::SubscriptionFilterConditionContainer(
|
494 kumpf 1.39 const String& filterCondition,
495 const String& queryLanguage)
|
496 kumpf 1.15 {
497 _rep = new SubscriptionFilterConditionContainerRep();
498 _rep->filterCondition = filterCondition;
499 _rep->queryLanguage = queryLanguage;
500 }
501
|
502 kumpf 1.39 SubscriptionFilterConditionContainer::~SubscriptionFilterConditionContainer()
|
503 kumpf 1.15 {
504 delete _rep;
505 }
506
|
507 kumpf 1.39 SubscriptionFilterConditionContainer&
|
508 kumpf 1.15 SubscriptionFilterConditionContainer::operator=(
|
509 kumpf 1.39 const SubscriptionFilterConditionContainer& container)
|
510 kumpf 1.15 {
511 if (this == &container)
512 {
|
513 kumpf 1.39 return *this;
|
514 kumpf 1.15 }
515
516 _rep->filterCondition = container._rep->filterCondition;
517 _rep->queryLanguage = container._rep->queryLanguage;
518
|
519 kumpf 1.39 return *this;
|
520 kumpf 1.15 }
521
|
522 kumpf 1.39 String SubscriptionFilterConditionContainer::getName() const
|
523 kumpf 1.15 {
|
524 kumpf 1.39 return NAME;
|
525 kumpf 1.15 }
526
|
527 kumpf 1.39 OperationContext::Container* SubscriptionFilterConditionContainer::clone() const
|
528 kumpf 1.15 {
|
529 kumpf 1.39 return new SubscriptionFilterConditionContainer(
530 _rep->filterCondition, _rep->queryLanguage);
|
531 kumpf 1.15 }
532
|
533 kumpf 1.39 void SubscriptionFilterConditionContainer::destroy()
|
534 kumpf 1.15 {
535 delete this;
536 }
537
|
538 kumpf 1.39 String SubscriptionFilterConditionContainer::getFilterCondition() const
|
539 kumpf 1.15 {
|
540 kumpf 1.39 return _rep->filterCondition;
|
541 kumpf 1.15 }
542
|
543 kumpf 1.39 String SubscriptionFilterConditionContainer::getQueryLanguage() const
|
544 kumpf 1.15 {
|
545 kumpf 1.39 return _rep->queryLanguage;
|
546 chip 1.3 }
|
547 mike 1.2
|
548 kumpf 1.24
549 //
|
550 chuck 1.27 // SubscriptionFilterQueryContainer
551 //
552
553 class SubscriptionFilterQueryContainerRep
554 {
555 public:
556 String filterQuery;
557 String queryLanguage;
558 CIMNamespaceName sourceNameSpace;
559 };
560
561 const String SubscriptionFilterQueryContainer::NAME =
562 "SubscriptionFilterQueryContainer";
|
563 kumpf 1.39
564 SubscriptionFilterQueryContainer::SubscriptionFilterQueryContainer(
565 const OperationContext::Container& container)
566 {
567 const SubscriptionFilterQueryContainer* p =
568 dynamic_cast<const SubscriptionFilterQueryContainer*>(&container);
569
570 if (p == 0)
|
571 chuck 1.27 {
572 throw DynamicCastFailedException();
573 }
|
574 kumpf 1.39
|
575 chuck 1.27 _rep = new SubscriptionFilterQueryContainerRep();
576 _rep->filterQuery = p->_rep->filterQuery;
577 _rep->queryLanguage = p->_rep->queryLanguage;
578 _rep->sourceNameSpace = p->_rep->sourceNameSpace;
|
579 kumpf 1.39 }
|
580 chuck 1.27
|
581 kumpf 1.39 SubscriptionFilterQueryContainer::SubscriptionFilterQueryContainer(
582 const SubscriptionFilterQueryContainer& container)
|
583 kumpf 1.42 #ifdef PEGASUS_INCLUDE_SUPERCLASS_INITIALIZER
|
584 kumpf 1.39 : OperationContext::Container()
|
585 w.otsuka 1.31 #endif
|
586 chuck 1.27 {
587 _rep = new SubscriptionFilterQueryContainerRep();
588 _rep->filterQuery = container._rep->filterQuery;
589 _rep->queryLanguage = container._rep->queryLanguage;
590 _rep->sourceNameSpace = container._rep->sourceNameSpace;
591 }
592
593 SubscriptionFilterQueryContainer::SubscriptionFilterQueryContainer(
|
594 kumpf 1.39 const String& filterQuery,
595 const String& queryLanguage,
596 const CIMNamespaceName& sourceNameSpace)
597 {
|
598 chuck 1.27 _rep = new SubscriptionFilterQueryContainerRep();
599 _rep->filterQuery = filterQuery;
600 _rep->queryLanguage = queryLanguage;
601 _rep->sourceNameSpace = sourceNameSpace;
602 }
603
|
604 kumpf 1.39 SubscriptionFilterQueryContainer::~SubscriptionFilterQueryContainer()
|
605 chuck 1.27 {
606 delete _rep;
607 }
|
608 kumpf 1.39
609 SubscriptionFilterQueryContainer&
|
610 chuck 1.27 SubscriptionFilterQueryContainer::operator=(
|
611 kumpf 1.39 const SubscriptionFilterQueryContainer& container)
|
612 chuck 1.27 {
613 if (this == &container)
614 {
|
615 kumpf 1.39 return *this;
|
616 chuck 1.27 }
617
618 _rep->filterQuery = container._rep->filterQuery;
619 _rep->queryLanguage = container._rep->queryLanguage;
620 _rep->sourceNameSpace = container._rep->sourceNameSpace;
621
|
622 kumpf 1.39 return *this;
|
623 chuck 1.27 }
624
|
625 kumpf 1.39 String SubscriptionFilterQueryContainer::getName() const
626 {
627 return NAME;
|
628 chuck 1.27 }
629
|
630 kumpf 1.39 OperationContext::Container* SubscriptionFilterQueryContainer::clone() const
631 {
632 return new SubscriptionFilterQueryContainer(
633 _rep->filterQuery,
634 _rep->queryLanguage,
635 _rep->sourceNameSpace);
|
636 chuck 1.27 }
637
|
638 kumpf 1.39 void SubscriptionFilterQueryContainer::destroy()
639 {
|
640 chuck 1.27 delete this;
641 }
642
|
643 kumpf 1.39 String SubscriptionFilterQueryContainer::getFilterQuery() const
|
644 chuck 1.27 {
|
645 kumpf 1.39 return _rep->filterQuery;
|
646 chuck 1.27 }
647
|
648 kumpf 1.39 String SubscriptionFilterQueryContainer::getQueryLanguage() const
|
649 chuck 1.27 {
|
650 kumpf 1.39 return _rep->queryLanguage;
|
651 chuck 1.27 }
652
|
653 kumpf 1.39 CIMNamespaceName SubscriptionFilterQueryContainer::getSourceNameSpace() const
|
654 chuck 1.27 {
|
655 kumpf 1.39 return _rep->sourceNameSpace;
|
656 chuck 1.27 }
657
658
659 //
|
660 kumpf 1.24 // TimeoutContainer
661 //
|
662 mday 1.17
663 const String TimeoutContainer::NAME = "TimeoutContainer";
664
|
665 kumpf 1.39 TimeoutContainer::TimeoutContainer(const OperationContext::Container& container)
|
666 mday 1.17 {
|
667 kumpf 1.39 const TimeoutContainer* p =
668 dynamic_cast<const TimeoutContainer*>(&container);
669 if (p == 0)
670 {
671 throw DynamicCastFailedException();
672 }
673 _value = p->_value;
|
674 mday 1.17 }
675
676 TimeoutContainer::TimeoutContainer(Uint32 timeout)
677 {
|
678 kumpf 1.39 _value = timeout;
|
679 mday 1.17 }
680
|
681 kumpf 1.39 String TimeoutContainer::getName() const
|
682 mday 1.17 {
|
683 kumpf 1.39 return NAME;
|
684 mday 1.17 }
685
|
686 kumpf 1.39 OperationContext::Container* TimeoutContainer::clone() const
|
687 mday 1.17 {
|
688 kumpf 1.39 return new TimeoutContainer(_value);
|
689 mday 1.17 }
690
|
691 kumpf 1.39 void TimeoutContainer::destroy()
|
692 mday 1.17 {
|
693 kumpf 1.39 delete this;
|
694 mday 1.17 }
695
|
696 kumpf 1.39 Uint32 TimeoutContainer::getTimeOut() const
|
697 mday 1.17 {
|
698 kumpf 1.39 return _value;
|
699 mday 1.17 }
700
701
|
702 chuck 1.18 //
703 // AcceptLanguageListContainer
704 //
|
705 mday 1.17
|
706 chuck 1.18 class AcceptLanguageListContainerRep
707 {
708 public:
|
709 kumpf 1.33 AcceptLanguageList languages;
|
710 chuck 1.18 };
711
712 const String AcceptLanguageListContainer::NAME =
713 "AcceptLanguageListContainer";
714
|
715 kumpf 1.39 AcceptLanguageListContainer::AcceptLanguageListContainer(
716 const OperationContext::Container& container)
|
717 chuck 1.18 {
|
718 kumpf 1.39 const AcceptLanguageListContainer* p =
719 dynamic_cast<const AcceptLanguageListContainer*>(&container);
|
720 chuck 1.18
|
721 kumpf 1.39 if (p == 0)
|
722 chuck 1.18 {
723 throw DynamicCastFailedException();
724 }
725
726 _rep = new AcceptLanguageListContainerRep();
727 _rep->languages = p->_rep->languages;
728 }
729
|
730 kumpf 1.39 AcceptLanguageListContainer::AcceptLanguageListContainer(
731 const AcceptLanguageListContainer& container)
|
732 kumpf 1.42 #ifdef PEGASUS_INCLUDE_SUPERCLASS_INITIALIZER
|
733 kumpf 1.39 : OperationContext::Container()
|
734 w.otsuka 1.31 #endif
|
735 chuck 1.18 {
736 _rep = new AcceptLanguageListContainerRep();
737 _rep->languages = container._rep->languages;
738 }
739
|
740 kumpf 1.39 AcceptLanguageListContainer::AcceptLanguageListContainer(
741 const AcceptLanguageList& languages)
|
742 chuck 1.18 {
743 _rep = new AcceptLanguageListContainerRep();
744 _rep->languages = languages;
745 }
746
|
747 kumpf 1.39 AcceptLanguageListContainer::~AcceptLanguageListContainer()
|
748 chuck 1.18 {
749 delete _rep;
750 }
751
|
752 kumpf 1.39 AcceptLanguageListContainer& AcceptLanguageListContainer::operator=(
753 const AcceptLanguageListContainer& container)
|
754 chuck 1.18 {
755 if (this == &container)
756 {
|
757 kumpf 1.39 return *this;
|
758 chuck 1.18 }
759
760 _rep->languages = container._rep->languages;
761
|
762 kumpf 1.39 return *this;
|
763 chuck 1.18 }
764
|
765 kumpf 1.39 String AcceptLanguageListContainer::getName() const
|
766 chuck 1.18 {
|
767 kumpf 1.39 return NAME;
|
768 chuck 1.18 }
769
|
770 kumpf 1.39 OperationContext::Container* AcceptLanguageListContainer::clone() const
|
771 chuck 1.18 {
|
772 kumpf 1.39 return new AcceptLanguageListContainer(_rep->languages);
|
773 chuck 1.18 }
774
|
775 kumpf 1.39 void AcceptLanguageListContainer::destroy()
|
776 chuck 1.18 {
777 delete this;
778 }
779
|
780 kumpf 1.39 AcceptLanguageList AcceptLanguageListContainer::getLanguages() const
|
781 chuck 1.18 {
|
782 kumpf 1.39 return _rep->languages;
|
783 chuck 1.18 }
784
|
785 kumpf 1.24
|
786 chuck 1.18 //
787 // ContentLanguageListContainer
788 //
789
790 class ContentLanguageListContainerRep
791 {
792 public:
|
793 kumpf 1.33 ContentLanguageList languages;
|
794 chuck 1.18 };
795
796 const String ContentLanguageListContainer::NAME =
797 "ContentLanguageListContainer";
798
|
799 kumpf 1.39 ContentLanguageListContainer::ContentLanguageListContainer(
800 const OperationContext::Container& container)
|
801 chuck 1.18 {
|
802 kumpf 1.39 const ContentLanguageListContainer* p =
803 dynamic_cast<const ContentLanguageListContainer*>(&container);
|
804 chuck 1.18
|
805 kumpf 1.39 if (p == 0)
|
806 chuck 1.18 {
807 throw DynamicCastFailedException();
808 }
809
810 _rep = new ContentLanguageListContainerRep();
811 _rep->languages = p->_rep->languages;
812 }
813
|
814 kumpf 1.39 ContentLanguageListContainer::ContentLanguageListContainer(
815 const ContentLanguageListContainer& container)
|
816 kumpf 1.42 #ifdef PEGASUS_INCLUDE_SUPERCLASS_INITIALIZER
|
817 kumpf 1.39 : OperationContext::Container()
|
818 w.otsuka 1.31 #endif
|
819 chuck 1.18 {
820 _rep = new ContentLanguageListContainerRep();
821 _rep->languages = container._rep->languages;
822 }
823
|
824 kumpf 1.39 ContentLanguageListContainer::ContentLanguageListContainer(
825 const ContentLanguageList& languages)
|
826 chuck 1.18 {
827 _rep = new ContentLanguageListContainerRep();
828 _rep->languages = languages;
829 }
830
|
831 kumpf 1.39 ContentLanguageListContainer::~ContentLanguageListContainer()
|
832 chuck 1.18 {
833 delete _rep;
834 }
835
|
836 kumpf 1.39 ContentLanguageListContainer& ContentLanguageListContainer::operator=(
837 const ContentLanguageListContainer& container)
|
838 chuck 1.18 {
839 if (this == &container)
840 {
|
841 kumpf 1.39 return *this;
|
842 chuck 1.18 }
843
844 _rep->languages = container._rep->languages;
845
|
846 kumpf 1.39 return *this;
|
847 chuck 1.18 }
848
|
849 kumpf 1.39 String ContentLanguageListContainer::getName() const
|
850 chuck 1.18 {
|
851 kumpf 1.39 return NAME;
|
852 chuck 1.18 }
853
|
854 kumpf 1.39 OperationContext::Container* ContentLanguageListContainer::clone() const
|
855 chuck 1.18 {
|
856 kumpf 1.39 return new ContentLanguageListContainer(_rep->languages);
|
857 chuck 1.18 }
858
|
859 kumpf 1.39 void ContentLanguageListContainer::destroy()
|
860 chuck 1.18 {
861 delete this;
862 }
863
|
864 kumpf 1.39 ContentLanguageList ContentLanguageListContainer::getLanguages() const
|
865 chuck 1.18 {
|
866 kumpf 1.39 return _rep->languages;
|
867 chuck 1.18 }
868
869
|
870 kumpf 1.20 //
871 // SnmpTrapOidContainer
872 //
873
874 class SnmpTrapOidContainerRep
875 {
876 public:
877 String snmpTrapOid;
878 };
879
880 const String SnmpTrapOidContainer::NAME =
881 "SnmpTrapOidContainer";
882
|
883 kumpf 1.39 SnmpTrapOidContainer::SnmpTrapOidContainer(
884 const OperationContext::Container& container)
|
885 kumpf 1.20 {
|
886 kumpf 1.39 const SnmpTrapOidContainer* p =
887 dynamic_cast<const SnmpTrapOidContainer*>(&container);
|
888 kumpf 1.20
|
889 kumpf 1.39 if (p == 0)
|
890 kumpf 1.20 {
891 throw DynamicCastFailedException();
892 }
893
894 _rep = new SnmpTrapOidContainerRep();
895 _rep->snmpTrapOid = p->_rep->snmpTrapOid;
896 }
897
|
898 kumpf 1.39 SnmpTrapOidContainer::SnmpTrapOidContainer(
899 const SnmpTrapOidContainer& container)
|
900 kumpf 1.42 #ifdef PEGASUS_INCLUDE_SUPERCLASS_INITIALIZER
|
901 kumpf 1.39 : OperationContext::Container()
|
902 w.otsuka 1.31 #endif
|
903 kumpf 1.20 {
904 _rep = new SnmpTrapOidContainerRep();
905 _rep->snmpTrapOid = container._rep->snmpTrapOid;
906 }
907
|
908 kumpf 1.39 SnmpTrapOidContainer::SnmpTrapOidContainer(const String& snmpTrapOid)
|
909 kumpf 1.20 {
910 _rep = new SnmpTrapOidContainerRep();
911 _rep->snmpTrapOid = snmpTrapOid;
912 }
913
|
914 kumpf 1.39 SnmpTrapOidContainer::~SnmpTrapOidContainer()
|
915 kumpf 1.20 {
916 delete _rep;
917 }
918
|
919 kumpf 1.39 SnmpTrapOidContainer& SnmpTrapOidContainer::operator=(
920 const SnmpTrapOidContainer& container)
|
921 kumpf 1.20 {
922 if (this == &container)
923 {
|
924 kumpf 1.39 return *this;
|
925 kumpf 1.20 }
926
927 _rep->snmpTrapOid = container._rep->snmpTrapOid;
928
|
929 kumpf 1.39 return *this;
|
930 kumpf 1.20 }
931
|
932 kumpf 1.39 String SnmpTrapOidContainer::getName() const
|
933 kumpf 1.20 {
|
934 kumpf 1.39 return NAME;
|
935 kumpf 1.20 }
936
|
937 kumpf 1.39 OperationContext::Container* SnmpTrapOidContainer::clone() const
|
938 kumpf 1.20 {
|
939 kumpf 1.39 return new SnmpTrapOidContainer(_rep->snmpTrapOid);
|
940 kumpf 1.20 }
941
|
942 kumpf 1.39 void SnmpTrapOidContainer::destroy()
|
943 kumpf 1.20 {
944 delete this;
945 }
946
|
947 kumpf 1.39 String SnmpTrapOidContainer::getSnmpTrapOid() const
|
948 kumpf 1.20 {
|
949 kumpf 1.39 return _rep->snmpTrapOid;
|
950 kumpf 1.20 }
|
951 kumpf 1.24
|
952 mike 1.2 PEGASUS_NAMESPACE_END
|