version 1.141, 2004/08/13 15:11:53
|
version 1.142, 2004/08/13 15:20:02
|
|
|
// If so, set to null | // If so, set to null |
// | // |
Array <CIMName> propertyNames; | Array <CIMName> propertyNames; |
|
Array <CIMName> indicationClassProperties; |
CIMPropertyList propertyList; | CIMPropertyList propertyList; |
for (Uint32 i = 0; i < indication.getPropertyCount(); i++) | for (Uint32 i = 0; i < indication.getPropertyCount(); i++) |
|
{ |
propertyNames.append(indication.getProperty(i).getName()); | propertyNames.append(indication.getProperty(i).getName()); |
|
} |
propertyList = _checkPropertyList (propertyNames, | propertyList = _checkPropertyList (propertyNames, |
request->nameSpace, indication.getClassName ()); |
request->nameSpace, indication.getClassName (), |
|
indicationClassProperties); |
| |
Array <CIMNamespaceName> nameSpaces; | Array <CIMNamespaceName> nameSpaces; |
nameSpaces.append (request->nameSpace); | nameSpaces.append (request->nameSpace); |
|
|
// Format indication | // Format indication |
// Remove properties not listed in SELECT clause from | // Remove properties not listed in SELECT clause from |
// indication as they are not required to be passed to consumer | // indication as they are not required to be passed to consumer |
// If SELECT includes all properties ("*"), pass all properties |
// If SELECT includes all properties ("*"), it's still necessary |
// to the consumer |
// to check, in case provider added properties not in the |
|
// indication class |
// | // |
|
Array <CIMName> selectPropertyNames; |
if (!selectStatement.getAllProperties ()) | if (!selectStatement.getAllProperties ()) |
{ | { |
CIMPropertyList selectPropertyList; | CIMPropertyList selectPropertyList; |
Array <CIMName> selectPropertyNames; |
|
| |
// | // |
// Get properties listed in SELECT clause | // Get properties listed in SELECT clause |
|
|
selectStatement.getSelectPropertyList (); | selectStatement.getSelectPropertyList (); |
selectPropertyNames = | selectPropertyNames = |
selectPropertyList.getPropertyNameArray (); | selectPropertyList.getPropertyNameArray (); |
|
} |
|
else |
|
{ |
|
selectPropertyNames = indicationClassProperties; |
|
} |
| |
// | // |
// Remove properties not listed in SELECT clause | // Remove properties not listed in SELECT clause |
|
// or properties not in the indication class |
// from indication | // from indication |
// | // |
for (Uint32 j = 0; j < propertyNames.size(); j++) | for (Uint32 j = 0; j < propertyNames.size(); j++) |
|
|
(propertyNames[j])); | (propertyNames[j])); |
} | } |
} | } |
} |
|
| |
handlerNamedInstance = _subscriptionRepository->getHandler | handlerNamedInstance = _subscriptionRepository->getHandler |
(matchedSubscriptions[i]); | (matchedSubscriptions[i]); |
|
|
} | } |
} | } |
| |
|
Array <CIMName> indicationClassProperties; |
return _checkPropertyList (propertyArray, nameSpaceName, | return _checkPropertyList (propertyArray, nameSpaceName, |
indicationClassName); |
indicationClassName, indicationClassProperties); |
} | } |
} | } |
| |
CIMPropertyList IndicationService::_checkPropertyList | CIMPropertyList IndicationService::_checkPropertyList |
(const Array <CIMName> & propertyList, | (const Array <CIMName> & propertyList, |
const CIMNamespaceName & nameSpaceName, | const CIMNamespaceName & nameSpaceName, |
const CIMName & indicationClassName) const |
const CIMName & indicationClassName, |
|
Array <CIMName> & indicationClassProperties) const |
{ | { |
PEG_METHOD_ENTER (TRC_INDICATION_SERVICE, | PEG_METHOD_ENTER (TRC_INDICATION_SERVICE, |
"IndicationService::_checkPropertyList"); | "IndicationService::_checkPropertyList"); |
|
|
CIMPropertyList ()); | CIMPropertyList ()); |
| |
Boolean allProperties = true; | Boolean allProperties = true; |
for (Uint32 i = 0; |
for (Uint32 i = 0; i < indicationClass.getPropertyCount (); i++) |
i < indicationClass.getPropertyCount () && allProperties; i++) |
|
{ | { |
|
indicationClassProperties.append |
|
(indicationClass.getProperty (i).getName ()); |
if (!ContainsCIMName (propertyList, | if (!ContainsCIMName (propertyList, |
indicationClass.getProperty (i).getName ())) | indicationClass.getProperty (i).getName ())) |
{ | { |