version 1.13, 2008/12/01 17:50:33
|
version 1.14.4.1, 2009/11/18 14:00:33
|
|
|
#include "InteropProvider.h" | #include "InteropProvider.h" |
#include "InteropProviderUtils.h" | #include "InteropProviderUtils.h" |
#include "InteropConstants.h" | #include "InteropConstants.h" |
|
#include <Pegasus/Common/ArrayIterator.h> |
| |
PEGASUS_USING_STD; | PEGASUS_USING_STD; |
PEGASUS_NAMESPACE_BEGIN | PEGASUS_NAMESPACE_BEGIN |
|
|
return instance; | return instance; |
} | } |
| |
|
CIMInstance InteropProvider::getNameSpaceInstance( |
|
const CIMObjectPath & ref) |
|
{ |
|
PEG_METHOD_ENTER(TRC_CONTROLPROVIDER, |
|
"getNameSpaceInstance()"); |
|
Array<CIMKeyBinding> keyBindings = ref.getKeyBindings(); |
|
ConstArrayIterator<CIMKeyBinding> keyIter(keyBindings); |
|
String name; |
|
|
|
for (Uint32 i = 0; i < keyIter.size(); i++) |
|
{ |
|
if (keyIter[i].getName().equal(CIM_NAMESPACE_PROPERTY_NAME)) |
|
{ |
|
name = keyIter[i].getValue(); |
|
break; |
|
} |
|
} |
|
|
|
if(repository->nameSpaceExists(name)) |
|
{ |
|
CIMInstance newInst = buildNamespaceInstance(name); |
|
if( newInst.getPath() != ref ) |
|
{ |
|
throw CIMObjectNotFoundException(ref.toString()); |
|
} |
|
PEG_METHOD_EXIT(); |
|
return newInst; |
|
} |
|
|
|
PEG_METHOD_EXIT(); |
|
throw CIMObjectNotFoundException(ref.toString()); |
|
} |
|
|
// | // |
// Function that takes an instance of the CIM_Namespace class, checks whether | // Function that takes an instance of the CIM_Namespace class, checks whether |
// the key properties are present, | // the key properties are present, |