List<ApplicationModel> searchResults = new ArrayList<ApplicationModel>();
try {
searchResults = searchService.searchApplications(URLDecoder.decode(searchCriteria.toLowerCase(), "UTF-8"), user, userAgentInfo.getApplicationType());
for (ApplicationModel applicationModel : searchResults) {
ImageModel imageModel = applicationModel.getIcon();
if (imageModel != null) {
imageModel.setUrl(WebRequest.getInstance().generateURL(imageModel.getUrl()));
}
}
} catch (UnsupportedEncodingException e) {
log.error("UnsupportedEncodingException caught performing a search with the following criteria: " + searchCriteria);
}