version 1.24, 2004/05/05 17:44:47
|
version 1.29, 2005/01/30 07:43:25
|
|
|
//%2003//////////////////////////////////////////////////////////////////////// |
//%2004//////////////////////////////////////////////////////////////////////// |
// | // |
// Copyright (c) 2000, 2001, 2002 BMC Software, Hewlett-Packard Development |
// Copyright (c) 2000, 2001, 2002 BMC Software; Hewlett-Packard Development |
// Company, L. P., IBM Corp., The Open Group, Tivoli Systems. |
// Company, L.P.; IBM Corp.; The Open Group; Tivoli Systems. |
// Copyright (c) 2003 BMC Software; Hewlett-Packard Development Company, L. P.; | // Copyright (c) 2003 BMC Software; Hewlett-Packard Development Company, L. P.; |
// IBM Corp.; EMC Corporation, The Open Group. | // IBM Corp.; EMC Corporation, The Open Group. |
|
// Copyright (c) 2004 BMC Software; Hewlett-Packard Development Company, L.P.; |
|
// IBM Corp.; EMC Corporation; VERITAS Software Corporation; The Open Group. |
// | // |
// Permission is hereby granted, free of charge, to any person obtaining a copy | // Permission is hereby granted, free of charge, to any person obtaining a copy |
// of this software and associated documentation files (the "Software"), to | // of this software and associated documentation files (the "Software"), to |
|
|
//throw Exception("object not found"); | //throw Exception("object not found"); |
} | } |
| |
#ifdef PEGASUS_USE_DEPRECATED_INTERFACES |
|
const OperationContext::Container & OperationContext::get(const Uint32 key) const |
|
{ |
|
for(Uint32 i = 0, n = _rep->containers.size(); i < n; i++) |
|
{ |
|
if(key == _rep->containers[i]->getKey()) |
|
{ |
|
Container * p = _rep->containers[i]; |
|
|
|
return(*p); |
|
} |
|
} |
|
|
|
//l10n |
|
MessageLoaderParms parms("Common.OperationContext.OBJECT_NOT_FOUND", |
|
"object not found"); |
|
throw Exception(parms); |
|
//throw Exception("object not found"); |
|
} |
|
#endif |
|
|
|
void OperationContext::set(const OperationContext::Container & container) | void OperationContext::set(const OperationContext::Container & container) |
{ | { |
for(Uint32 i = 0, n = _rep->containers.size(); i < n; i++) | for(Uint32 i = 0, n = _rep->containers.size(); i < n; i++) |
|
|
//throw Exception("object not found"); | //throw Exception("object not found"); |
} | } |
| |
#ifdef PEGASUS_USE_DEPRECATED_INTERFACES |
|
void OperationContext::remove(const Uint32 key) |
|
{ |
|
for(Uint32 i = 0, n = _rep->containers.size(); i < n; i++) |
|
{ |
|
if(key == _rep->containers[i]->getKey()) |
|
{ |
|
delete _rep->containers[i]; |
|
_rep->containers.remove(i); |
|
|
|
return; |
|
} |
|
} |
|
|
|
//l10n |
|
MessageLoaderParms parms("Common.OperationContext.OBJECT_NOT_FOUND", |
|
"object not found"); |
|
throw Exception(parms); |
|
//throw Exception("object not found"); |
|
} |
|
#endif |
|
| |
// | // |
// OperationContext::Container | // OperationContext::Container |
// | // |
| |
#ifdef PEGASUS_USE_DEPRECATED_INTERFACES |
|
OperationContext::Container::Container(const Uint32 key) : _key(key) |
|
{ |
|
} |
|
#endif |
|
|
|
OperationContext::Container::~Container(void) | OperationContext::Container::~Container(void) |
{ | { |
} | } |
| |
#ifdef PEGASUS_USE_DEPRECATED_INTERFACES |
|
const Uint32 & OperationContext::Container::getKey(void) const |
|
{ |
|
return(_key); |
|
} |
|
#endif |
|
| |
// | // |
// IdentityContainer | // IdentityContainer |
|
|
const String IdentityContainer::NAME = "IdentityContainer"; | const String IdentityContainer::NAME = "IdentityContainer"; |
| |
IdentityContainer::IdentityContainer(const OperationContext::Container & container) | IdentityContainer::IdentityContainer(const OperationContext::Container & container) |
#ifdef PEGASUS_USE_DEPRECATED_INTERFACES |
|
: OperationContext::Container(container.getKey()) |
|
#endif |
|
{ | { |
const IdentityContainer * p = dynamic_cast<const IdentityContainer *>(&container); | const IdentityContainer * p = dynamic_cast<const IdentityContainer *>(&container); |
| |
|
|
} | } |
| |
IdentityContainer::IdentityContainer(const String & userName) | IdentityContainer::IdentityContainer(const String & userName) |
#ifdef PEGASUS_USE_DEPRECATED_INTERFACES |
|
: OperationContext::Container(CONTEXT_IDENTITY) |
|
#endif |
|
{ | { |
_rep = new IdentityContainerRep(); | _rep = new IdentityContainerRep(); |
_rep->userName = userName; | _rep->userName = userName; |
|
|
} | } |
| |
// | // |
|
// SubscriptionFilterQueryContainer |
|
// |
|
|
|
class SubscriptionFilterQueryContainerRep |
|
{ |
|
public: |
|
String filterQuery; |
|
String queryLanguage; |
|
CIMNamespaceName sourceNameSpace; |
|
}; |
|
|
|
const String SubscriptionFilterQueryContainer::NAME = |
|
"SubscriptionFilterQueryContainer"; |
|
|
|
SubscriptionFilterQueryContainer::SubscriptionFilterQueryContainer |
|
(const OperationContext::Container & container) |
|
{ |
|
const SubscriptionFilterQueryContainer * p = |
|
dynamic_cast<const SubscriptionFilterQueryContainer *>(&container); |
|
|
|
if(p == 0) |
|
{ |
|
throw DynamicCastFailedException(); |
|
} |
|
|
|
_rep = new SubscriptionFilterQueryContainerRep(); |
|
_rep->filterQuery = p->_rep->filterQuery; |
|
_rep->queryLanguage = p->_rep->queryLanguage; |
|
_rep->sourceNameSpace = p->_rep->sourceNameSpace; |
|
} |
|
|
|
SubscriptionFilterQueryContainer::SubscriptionFilterQueryContainer |
|
(const SubscriptionFilterQueryContainer & container) |
|
{ |
|
_rep = new SubscriptionFilterQueryContainerRep(); |
|
_rep->filterQuery = container._rep->filterQuery; |
|
_rep->queryLanguage = container._rep->queryLanguage; |
|
_rep->sourceNameSpace = container._rep->sourceNameSpace; |
|
} |
|
|
|
SubscriptionFilterQueryContainer::SubscriptionFilterQueryContainer( |
|
const String & filterQuery, |
|
const String & queryLanguage, |
|
const CIMNamespaceName & sourceNameSpace) |
|
{ |
|
_rep = new SubscriptionFilterQueryContainerRep(); |
|
_rep->filterQuery = filterQuery; |
|
_rep->queryLanguage = queryLanguage; |
|
_rep->sourceNameSpace = sourceNameSpace; |
|
} |
|
|
|
SubscriptionFilterQueryContainer::~SubscriptionFilterQueryContainer |
|
(void) |
|
{ |
|
delete _rep; |
|
} |
|
SubscriptionFilterQueryContainer & |
|
SubscriptionFilterQueryContainer::operator=( |
|
const SubscriptionFilterQueryContainer & container) |
|
{ |
|
if (this == &container) |
|
{ |
|
return (*this); |
|
} |
|
|
|
_rep->filterQuery = container._rep->filterQuery; |
|
_rep->queryLanguage = container._rep->queryLanguage; |
|
_rep->sourceNameSpace = container._rep->sourceNameSpace; |
|
|
|
return (*this); |
|
} |
|
|
|
String SubscriptionFilterQueryContainer::getName(void) const |
|
{ |
|
return(NAME); |
|
} |
|
|
|
OperationContext::Container * SubscriptionFilterQueryContainer::clone(void) const |
|
{ |
|
return(new SubscriptionFilterQueryContainer(_rep->filterQuery, |
|
_rep->queryLanguage, |
|
_rep->sourceNameSpace)); |
|
} |
|
|
|
void SubscriptionFilterQueryContainer::destroy(void) |
|
{ |
|
delete this; |
|
} |
|
|
|
String SubscriptionFilterQueryContainer::getFilterQuery(void) const |
|
{ |
|
return(_rep->filterQuery); |
|
} |
|
|
|
String SubscriptionFilterQueryContainer::getQueryLanguage(void) const |
|
{ |
|
return(_rep->queryLanguage); |
|
} |
|
|
|
CIMNamespaceName SubscriptionFilterQueryContainer::getSourceNameSpace(void) const |
|
{ |
|
return(_rep->sourceNameSpace); |
|
} |
|
|
|
// Unimplemented, hidden constructor not intended for actual use |
|
SubscriptionFilterQueryContainer::SubscriptionFilterQueryContainer() |
|
{ |
|
} |
|
|
|
// |
// TimeoutContainer | // TimeoutContainer |
// | // |
| |