version 1.7, 2005/03/23 17:58:02
|
version 1.11.8.1, 2005/12/30 22:01:03
|
|
|
CIMResponseMessage *response) | CIMResponseMessage *response) |
: _request(request), | : _request(request), |
_response(response), | _response(response), |
_responseMessageTotal(0), |
|
_responseObjectTotal(0), | _responseObjectTotal(0), |
|
_responseMessageTotal(0), |
_responseObjectThreshold(0) | _responseObjectThreshold(0) |
{ | { |
#ifndef PEGASUS_RESPONSE_OBJECT_COUNT_THRESHOLD | #ifndef PEGASUS_RESPONSE_OBJECT_COUNT_THRESHOLD |
|
|
// operation. | // operation. |
CIMClass cimClass; | CIMClass cimClass; |
| |
|
CIMRepository * repository = 0; |
|
|
try | try |
{ | { |
CachedClassDefinitionContainer container = | CachedClassDefinitionContainer container = |
request->operationContext.get(CachedClassDefinitionContainer::NAME); | request->operationContext.get(CachedClassDefinitionContainer::NAME); |
| |
cimClass = container.getClass(); | cimClass = container.getClass(); |
|
#ifdef PEGASUS_EMBEDDED_INSTANCE_SUPPORT |
|
RepositoryContainer repContainer = |
|
request->operationContext.get(RepositoryContainer::NAME); |
|
repository = repContainer.getRepository(); |
|
#endif //PEGASUS_EMBEDDED_INSTANCE_SUPPORT |
} | } |
catch(Exception &) | catch(Exception &) |
{ | { |
|
|
ObjectNormalizer( | ObjectNormalizer( |
cimClass, | cimClass, |
request->includeQualifiers, | request->includeQualifiers, |
request->includeClassOrigin); |
request->includeClassOrigin, |
|
request->nameSpace, |
|
repository); |
#endif | #endif |
} | } |
| |
|
|
throw CIMException(CIM_ERR_FAILED, message); | throw CIMException(CIM_ERR_FAILED, message); |
} | } |
| |
|
if(SimpleInstanceResponseHandler::size() != 0) |
|
{ |
|
MessageLoaderParms message( |
|
"Server.OperationResponseHandler.TOO_MANY_OBJECTS_DELIVERED", |
|
"Too many objects delivered."); |
|
|
|
throw CIMException(CIM_ERR_FAILED, message); |
|
} |
|
|
#ifdef PEGASUS_ENABLE_OBJECT_NORMALIZATION | #ifdef PEGASUS_ENABLE_OBJECT_NORMALIZATION |
// The normalizer expects an object path embedded in instances even | // The normalizer expects an object path embedded in instances even |
// though it is not required by this operation. Use the requested | // though it is not required by this operation. Use the requested |
|
|
#endif | #endif |
} | } |
| |
|
void GetInstanceResponseHandler::complete(void) |
|
{ |
|
if(SimpleInstanceResponseHandler::size() == 0) |
|
{ |
|
MessageLoaderParms message( |
|
"Server.OperationResponseHandler.TOO_FEW_OBJECTS_DELIVERED", |
|
"Too few objects delivered."); |
|
|
|
throw CIMException(CIM_ERR_FAILED, message); |
|
} |
|
|
|
SimpleInstanceResponseHandler::complete(); |
|
} |
|
|
String GetInstanceResponseHandler::getClass(void) const | String GetInstanceResponseHandler::getClass(void) const |
{ | { |
return(String("GetInstanceResponseHandler")); | return(String("GetInstanceResponseHandler")); |
|
|
// operation. If it does not exist, then this feature is disabled for this | // operation. If it does not exist, then this feature is disabled for this |
// operation. | // operation. |
CIMClass cimClass; | CIMClass cimClass; |
|
CIMRepository * repository = 0; |
| |
try | try |
{ | { |
|
|
request->operationContext.get(CachedClassDefinitionContainer::NAME); | request->operationContext.get(CachedClassDefinitionContainer::NAME); |
| |
cimClass = container.getClass(); | cimClass = container.getClass(); |
|
#ifdef PEGASUS_EMBEDDED_INSTANCE_SUPPORT |
|
RepositoryContainer repContainer = |
|
request->operationContext.get(RepositoryContainer::NAME); |
|
repository = repContainer.getRepository(); |
|
#endif // PEGASUS_EMBEDDED_INSTANCE_SUPPORT |
} | } |
catch(Exception &) | catch(Exception &) |
{ | { |
|
|
ObjectNormalizer( | ObjectNormalizer( |
cimClass, | cimClass, |
request->includeQualifiers, | request->includeQualifiers, |
request->includeClassOrigin); |
request->includeClassOrigin, |
|
request->nameSpace, |
|
repository); |
#endif | #endif |
} | } |
| |
|
|
// operation. If it does not exist, then this feature is disabled for this | // operation. If it does not exist, then this feature is disabled for this |
// operation. | // operation. |
CIMClass cimClass; | CIMClass cimClass; |
|
CIMRepository * repository = 0; |
| |
try | try |
{ | { |
|
|
request->operationContext.get(CachedClassDefinitionContainer::NAME); | request->operationContext.get(CachedClassDefinitionContainer::NAME); |
| |
cimClass = container.getClass(); | cimClass = container.getClass(); |
|
#ifdef PEGASUS_EMBEDDED_INSTANCE_SUPPORT |
|
RepositoryContainer repContainer = |
|
request->operationContext.get(RepositoryContainer::NAME); |
|
repository = repContainer.getRepository(); |
|
#endif // PEGASUS_EMBEDDED_INSTANCE_SUPPORT |
} | } |
catch(Exception &) | catch(Exception &) |
{ | { |
|
|
ObjectNormalizer( | ObjectNormalizer( |
cimClass, | cimClass, |
false, | false, |
false); |
false, |
|
request->nameSpace, |
|
repository); |
#endif | #endif |
} | } |
| |
|
|
throw CIMException(CIM_ERR_FAILED, message); | throw CIMException(CIM_ERR_FAILED, message); |
} | } |
| |
|
if(SimpleObjectPathResponseHandler::size() != 0) |
|
{ |
|
MessageLoaderParms message( |
|
"Server.OperationResponseHandler.TOO_MANY_OBJECTS_DELIVERED", |
|
"Too many objects delivered."); |
|
|
|
throw CIMException(CIM_ERR_FAILED, message); |
|
} |
|
|
SimpleObjectPathResponseHandler::deliver(cimObjectPath); | SimpleObjectPathResponseHandler::deliver(cimObjectPath); |
} | } |
| |
|
void CreateInstanceResponseHandler::complete(void) |
|
{ |
|
if(SimpleObjectPathResponseHandler::size() == 0) |
|
{ |
|
MessageLoaderParms message( |
|
"Server.OperationResponseHandler.TOO_FEW_OBJECTS_DELIVERED", |
|
"Too few objects delivered."); |
|
|
|
throw CIMException(CIM_ERR_FAILED, message); |
|
} |
|
|
|
SimpleObjectPathResponseHandler::complete(); |
|
} |
|
|
String CreateInstanceResponseHandler::getClass(void) const | String CreateInstanceResponseHandler::getClass(void) const |
{ | { |
return(String("CreateInstanceResponseHandler")); | return(String("CreateInstanceResponseHandler")); |