Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Code Block
languagejava
titlepseudo code solution
linenumberstrue
anchorNamesFilter = null

if (hasModuleCondition) {
  anchorNamesFilter[] = ... // execute current query to get just cm handle names!
}

if (hasPropertyConditons) {
   cmHandleObjects[] = ... //execute current code to get cm handle objects based on property conditions
   if (anchorNamesFilter != null) {
      cmHandleObjects.removeAll(cmHandlObject.id not in anchorNameFilter)
   }
   return cmHandleObjects[]
}

if (justIds) {
  return convertAnchorNamesToEMptyCmHandleObjectconvertAnchorNamesToEmptyCmHandleObject(anchorNamesFilter[])   //similar to code you have in your latest patch
} else  {
  cmHandleObjects[] = new collection
  for each anchorName in anchorNameFilter[] {
     cmHandleObject = get /dmi-registry/cm-handle[@id=anchorName]   // use GET with absolute path NOT a query!!!!
     cmHandleObjects[].add(cmHandleObject)
  }
  return cmHandleObjects[]
}

...