(file) Return to JMPIProviderManager.cpp CVS log (file) (dir) Up to [Pegasus] / pegasus / src / Pegasus / ProviderManager2 / JMPI

Diff for /pegasus/src/Pegasus/ProviderManager2/JMPI/JMPIProviderManager.cpp between version 1.76 and 1.79

version 1.76, 2008/12/16 15:41:49 version 1.79, 2009/05/27 05:56:31
Line 62 
Line 62 
  
 #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,
Line 617 
Line 653 
         response = handleSubscriptionInitCompleteRequest (request);         response = handleSubscriptionInitCompleteRequest (request);
         break;         break;
  
       case CIM_INDICATION_SERVICE_DISABLED_REQUEST_MESSAGE:
           response = handleIndicationServiceDisabledRequest (request);
           break;
   
     default:     default:
         PEG_TRACE((TRC_PROVIDERMANAGER, Tracer::LEVEL1,         PEG_TRACE((TRC_PROVIDERMANAGER, Tracer::LEVEL1,
                    "Unsupported Request %d",                    "Unsupported Request %d",
Line 1542 
Line 1582 
                        throw;                        throw;
                     }                     }
  
                     const CIMObjectPath& op  = ciRet->getPath();  
                     CIMObjectPath        iop = ciRet->buildPath(cls);  
   
                     JMPIjvm::checkException(env);                     JMPIjvm::checkException(env);
  
                     handler.deliver(*ciRet);                     handler.deliver(*ciRet);
Line 1712 
Line 1749 
                        throw;                        throw;
                     }                     }
  
                     const CIMObjectPath& op  = ciRet->getPath();  
                     CIMObjectPath        iop = ciRet->buildPath(cls);  
   
                     JMPIjvm::checkException(env);                     JMPIjvm::checkException(env);
  
                     handler.deliver(*ciRet);                     handler.deliver(*ciRet);
Line 1890 
Line 1924 
                        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);
                 }                 }
             }             }
Line 2052 
Line 2080 
                        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);
                 }                 }
             }             }
Line 4609 
Line 4630 
                        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);
                 }                 }
             }             }
Line 4778 
Line 4795 
                        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);
                 }                 }
             }             }
Line 4956 
Line 4969 
                        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);
                 }                 }
             }             }
Line 5111 
Line 5120 
                        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);
                 }                 }
             }             }
Line 6076 
Line 6081 
                        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);
                 }                 }
             }             }
Line 9111 
Line 9112 
     return(response);     return(response);
 } }
  
   Message* JMPIProviderManager::handleIndicationServiceDisabledRequest(
       Message* message)
   {
       PEG_METHOD_ENTER(TRC_PROVIDERMANAGER,
           "JMPIProviderManager::_handleIndicationServiceDisabledRequest");
   
       CIMIndicationServiceDisabledRequestMessage* request =
           dynamic_cast<CIMIndicationServiceDisabledRequestMessage*>(message);
       PEGASUS_ASSERT(request != 0);
   
       CIMIndicationServiceDisabledResponseMessage* response =
           dynamic_cast<CIMIndicationServiceDisabledResponseMessage*>(
               request->buildResponse());
       PEGASUS_ASSERT(response != 0);
   
       _subscriptionInitComplete = false;
   
       PEG_METHOD_EXIT ();
       return response;
   }
   
 Message * JMPIProviderManager::handleSubscriptionInitCompleteRequest( Message * JMPIProviderManager::handleSubscriptionInitCompleteRequest(
     const Message * message)     const Message * message)
 { {


Legend:
Removed from v.1.76  
changed lines
  Added in v.1.79

No CVS admin address has been configured
Powered by
ViewCVS 0.9.2