}
}//TESTED (3)
// Perform search
DashboardProxySearchResultPojo reply = new DashboardProxySearchResultPojo();
reply.hits = new DashboardProxySearchResultPojo.Hits();
reply.hits.hits = new LinkedList<DashboardProxySearchResultPojo.Hits.HitElement>();
int hits = 0;
for (SharePojo result: results) {
if ((null == titleFilter) || ((null != result.getTitle()) && (result.getTitle().toLowerCase().contains(titleFilter)))) {
DashboardProxySearchResultPojo.Hits.HitElement hitEl = new DashboardProxySearchResultPojo.Hits.HitElement();
hitEl._id = result.getTitle();
hitEl._source.title = result.getTitle();
hitEl._source.dashboard= result.getShare();
reply.hits.hits.add(hitEl);
hits++;
}
}//TESTED (2, 3)
reply.hits.total = hits;
return new StringRepresentation(reply.toApi(), MediaType.APPLICATION_JSON);
}//TESTED (2, 3)
else if (null == _postData) { // GET
DashboardProxyResultPojo getResult = new DashboardProxyResultPojo();
getResult._id = command;
for (SharePojo result: results) {