version 1.77, 2008/12/16 18:57:00
|
version 1.78, 2008/12/18 18:57:46
|
|
|
| |
#include "Convert.h" | #include "Convert.h" |
| |
|
|
|
// |
|
// The following tests were added to allow the provider to supply a |
|
// CIMObjectPath in the response. Before this, the path was always |
|
// rebuild by the response functions from the instance. This resulted |
|
// in cases where the key properties were not in the returned instance |
|
// (ex. excluded by the property list) so that the path could not be built. |
|
// The preferred behavior is for the provider to build the path on response. |
|
// However, to cover existing providers the alternate of allowing the |
|
// ProviderManager has been kept if the path in the instance is not considered |
|
// to exist. |
|
// PLEASE: provider writers build/set a proper path into returned objects |
|
// See bug 8062 |
|
|
|
/* |
|
local function to implement the CIMObjectPath required for a response |
|
object. |
|
If there is a path defined in the instance, we simply return this path. |
|
If not, we use the class to build a path from the instance. |
|
Note that we are depending on some value in the keybindings to determine |
|
if we have a path. |
|
*/ |
|
|
|
void _fixCIMObjectPath(CIMInstance* instance, CIMClass& cls) |
|
{ |
|
CIMObjectPath op = instance->getPath(); |
|
const Array<CIMKeyBinding> kb = op.getKeyBindings(); |
|
if (kb.size() == 0) |
|
{ |
|
CIMObjectPath iop = instance->buildPath(cls); |
|
/* Fix for 4237*/ |
|
iop.setNameSpace(op.getNameSpace()); |
|
instance->setPath(iop); |
|
} |
|
} |
|
|
void JMPIProviderManager::debugPrintMethodPointers (JNIEnv *env, jclass jc) | void JMPIProviderManager::debugPrintMethodPointers (JNIEnv *env, jclass jc) |
{ | { |
PEG_METHOD_ENTER(TRC_PROVIDERMANAGER, | PEG_METHOD_ENTER(TRC_PROVIDERMANAGER, |
|
|
throw; | throw; |
} | } |
| |
const CIMObjectPath& op = ciRet->getPath(); |
|
CIMObjectPath iop = ciRet->buildPath(cls); |
|
|
|
JMPIjvm::checkException(env); | JMPIjvm::checkException(env); |
| |
handler.deliver(*ciRet); | handler.deliver(*ciRet); |
|
|
throw; | throw; |
} | } |
| |
const CIMObjectPath& op = ciRet->getPath(); |
|
CIMObjectPath iop = ciRet->buildPath(cls); |
|
|
|
JMPIjvm::checkException(env); | JMPIjvm::checkException(env); |
| |
handler.deliver(*ciRet); | handler.deliver(*ciRet); |
|
|
throw; | throw; |
} | } |
| |
const CIMObjectPath& op = ciRet->getPath(); |
_fixCIMObjectPath(ciRet, cls); |
CIMObjectPath iop = ciRet->buildPath(cls); |
|
| |
JMPIjvm::checkException(env); | JMPIjvm::checkException(env); |
| |
iop.setNameSpace(op.getNameSpace()); |
|
|
|
ciRet->setPath(iop); |
|
/* Fix for 4237*/ |
|
|
|
handler.deliver(*ciRet); | handler.deliver(*ciRet); |
} | } |
} | } |
|
|
PEG_METHOD_EXIT(); | PEG_METHOD_EXIT(); |
throw; | throw; |
} | } |
|
_fixCIMObjectPath(ciRet, cls); |
const CIMObjectPath& op = ciRet->getPath(); |
|
CIMObjectPath iop = ciRet->buildPath(cls); |
|
| |
JMPIjvm::checkException(env); | JMPIjvm::checkException(env); |
| |
iop.setNameSpace(op.getNameSpace()); |
|
|
|
ciRet->setPath(iop); |
|
/* Fix for 4237*/ |
|
|
|
handler.deliver(*ciRet); | handler.deliver(*ciRet); |
} | } |
} | } |
|
|
throw; | throw; |
} | } |
| |
const CIMObjectPath& op = ciRet->getPath(); |
_fixCIMObjectPath(ciRet, cls); |
CIMObjectPath iop = ciRet->buildPath(cls); |
|
| |
JMPIjvm::checkException(env); | JMPIjvm::checkException(env); |
| |
iop.setNameSpace(op.getNameSpace()); |
|
ciRet->setPath(iop); |
|
|
|
handler.deliver(*ciRet); | handler.deliver(*ciRet); |
} | } |
} | } |
|
|
throw; | throw; |
} | } |
| |
const CIMObjectPath& op = ciRet->getPath(); |
_fixCIMObjectPath(ciRet, cls); |
CIMObjectPath iop = ciRet->buildPath(cls); |
|
| |
JMPIjvm::checkException(env); | JMPIjvm::checkException(env); |
| |
iop.setNameSpace(op.getNameSpace()); |
|
ciRet->setPath(iop); |
|
|
|
handler.deliver(*ciRet); | handler.deliver(*ciRet); |
} | } |
} | } |
|
|
throw; | throw; |
} | } |
| |
const CIMObjectPath& op = ciRet->getPath(); |
_fixCIMObjectPath(ciRet, cls); |
CIMObjectPath iop = ciRet->buildPath(cls); |
|
| |
JMPIjvm::checkException(env); | JMPIjvm::checkException(env); |
| |
iop.setNameSpace(op.getNameSpace()); |
|
ciRet->setPath(iop); |
|
|
|
handler.deliver(*ciRet); | handler.deliver(*ciRet); |
} | } |
} | } |
|
|
throw; | throw; |
} | } |
| |
const CIMObjectPath& op = ciRet->getPath(); |
_fixCIMObjectPath(ciRet, cls); |
CIMObjectPath iop = ciRet->buildPath(cls); |
|
| |
JMPIjvm::checkException(env); | JMPIjvm::checkException(env); |
| |
iop.setNameSpace(op.getNameSpace()); |
|
ciRet->setPath(iop); |
|
|
|
handler.deliver(*ciRet); | handler.deliver(*ciRet); |
} | } |
} | } |
|
|
throw; | throw; |
} | } |
| |
const CIMObjectPath& op = ciRet->getPath(); |
_fixCIMObjectPath(ciRet, cls); |
CIMObjectPath iop = ciRet->buildPath(cls); |
|
| |
JMPIjvm::checkException(env); | JMPIjvm::checkException(env); |
| |
iop.setNameSpace(op.getNameSpace()); |
|
ciRet->setPath(iop); |
|
|
|
handler.deliver(*ciRet); | handler.deliver(*ciRet); |
} | } |
} | } |