}
//TESTED (entire block)
// 3) run saved query:
QueryHandler queryHandler = new QueryHandler();
StringBuffer errorString = new StringBuffer();
StringBuffer communityIdStrList = new StringBuffer();
for (ObjectId commId: savedQuery.getQueryInfo().getQuery().communityIds) {
if (communityIdStrList.length() > 0) {
communityIdStrList.append(',');
}
communityIdStrList.append(commId.toString());
}//TESTED
try {
//DEBUG
//System.out.println("COMMS="+communityIdStrList.toString() + ": QUERY=" + query.toApi());
// (should have a version of this that just returns the IPs from the index engine)
// (for now this will do)
ResponsePojo rp = queryHandler.doQuery(savedQuery._parentShare.getOwner().get_id().toString(),
query, communityIdStrList.toString(), errorString);
if (null == rp) {
throw new RuntimeException(errorString.toString()); // (handled below)
}