(file) Return to ObjectNormalizer.cpp CVS log (file) (dir) Up to [Pegasus] / pegasus / src / Pegasus / Common

Diff for /pegasus/src/Pegasus/Common/ObjectNormalizer.cpp between version 1.12 and 1.13

version 1.12, 2004/08/18 18:28:05 version 1.13, 2004/08/19 04:17:04
Line 469 
Line 469 
     */     */
  
     // ATTN: this section of code replaces the section above so that only properties specified by the provider are     // ATTN: this section of code replaces the section above so that only properties specified by the provider are
     // returned. properties not in the reference instance are implicitly dropped.      // returned. properties in the reference instance and not in the specified instance are implicitly dropped
  
     // apply ONLY specified instance properties     // apply ONLY specified instance properties
     for(Uint32 i = 0, n = cimInstance.getPropertyCount(); i < n; i++)     for(Uint32 i = 0, n = cimInstance.getPropertyCount(); i < n; i++)
Line 481 
Line 481 
  
         if(pos == PEG_NOT_FOUND)         if(pos == PEG_NOT_FOUND)
         {         {
             // throw invalid property              Tracer::trace(
                   TRC_OBJECTRESOLUTION, Tracer::LEVEL4,
                   "invalid property %s",
                   (const char *)cimProperty.getName().getString().getCString());
   
               throw CIMException(CIM_ERR_NO_SUCH_PROPERTY);
         }         }
  
         // ATTN: convert const property to non const         // ATTN: convert const property to non const
Line 495 
Line 500 
         newInstance.addProperty(_resolveProperty(referenceProperty, cimProperty, includeQualifiers, includeClassOrigin));         newInstance.addProperty(_resolveProperty(referenceProperty, cimProperty, includeQualifiers, includeClassOrigin));
     }     }
  
     // simple propgate the object's path      // use the object path in the instance, if it exists
     newInstance.setPath(cimInstance.getPath());      if(cimInstance.getPath().getKeyBindings().size() != 0)
       {
           // udpate object path
           CIMObjectPath path = newInstance.getPath();
   
           // assume the specified instance has the correct keys
           path.setKeyBindings(cimInstance.getPath().getKeyBindings());
   
           newInstance.setPath(path);
       }
       else
       {
           // ATTN: this is just an ATTEMPT to update the object path. depending on the request parameters,
           // all the key properties may not be present. only present keys are updated, missing keys assume
           // the default value for the property type (e.g., String(), Uint32(0), etc.)
  
     /*  
     // update keys     // update keys
     Array<CIMKeyBinding> keys = referenceInstance.getPath().getKeyBindings();     Array<CIMKeyBinding> keys = referenceInstance.getPath().getKeyBindings();
  
Line 506 
Line 524 
     {     {
         Uint32 pos = newInstance.findProperty(keys[i].getName());         Uint32 pos = newInstance.findProperty(keys[i].getName());
  
         if(pos == PEG_NOT_FOUND)              if(pos != PEG_NOT_FOUND)
         {         {
             // throw missing key. it must be present to create a valid object path  
         }  
   
         CIMValue value = newInstance.getProperty(pos).getValue();         CIMValue value = newInstance.getProperty(pos).getValue();
   
         // ATTN: check type         // ATTN: check type
  
         keys[i].setValue(value.toString());         keys[i].setValue(value.toString());
     }     }
           }
  
     // udpate object path     // udpate object path
     CIMObjectPath path = newInstance.getPath();     CIMObjectPath path = newInstance.getPath();
Line 524 
Line 539 
     path.setKeyBindings(keys);     path.setKeyBindings(keys);
  
     newInstance.setPath(path);     newInstance.setPath(path);
     */      }
  
     return(newInstance);     return(newInstance);
 } }
Line 696 
Line 711 
  
         Tracer::trace(         Tracer::trace(
             TRC_OBJECTRESOLUTION, Tracer::LEVEL4,             TRC_OBJECTRESOLUTION, Tracer::LEVEL4,
             "adding qualifier %s",              "adding reference qualifier %s",
             (const char *)referenceQualifier.getName().getString().getCString());             (const char *)referenceQualifier.getName().getString().getCString());
  
         referenceInstance.addQualifier(referenceQualifier);         referenceInstance.addQualifier(referenceQualifier);
Line 708 
Line 723 
     {     {
         CIMProperty referenceProperty = referenceClass.getProperty(i).clone();         CIMProperty referenceProperty = referenceClass.getProperty(i).clone();
  
           Tracer::trace(
               TRC_OBJECTRESOLUTION, Tracer::LEVEL4,
               "adding reference property %s",
               (const char *)referenceProperty.getName().getString().getCString());
   
         // the propagated value only applies to class properties, not instances. set it to false.         // the propagated value only applies to class properties, not instances. set it to false.
         referenceProperty.setPropagated(false);         referenceProperty.setPropagated(false);
  


Legend:
Removed from v.1.12  
changed lines
  Added in v.1.13

No CVS admin address has been configured
Powered by
ViewCVS 0.9.2