private void _deletePaths(Ice.ObjectFactory delFactory, RMap map, List<Request> commands) { if (map != null && map.getValue() != null) { // Each of the entries for (RType value : map.getValue().values()) { // We know that the value for any key at the // "top" level is going to be a RMap RMap val = (RMap) value; if (val != null && val.getValue() != null) { if (val.getValue().containsKey("files")) { // then we need to recurse. files points to the next // "top" level. RMap files = (RMap) val.getValue().get("files"); _deletePaths(delFactory, files, commands); } // Now after we've recursed, do the actual delete. RLong id = (RLong) val.getValue().get("id"); Delete del = (Delete) delFactory.create(null); del.type = "/OriginalFile"; del.id = id.getValue(); commands.add(del); } } } }