AlertCriteria criteria = new AlertCriteria();
criteria.addFilterPriorities(AlertPriority.getByLegacyIndex(alertPrefs.priority));
criteria.addFilterStartTime(alertPrefs.timeRange);
criteria.addFilterResourceIds(("all".equals(alertPrefs.displayAll) ? null : ArrayUtils
.wrapInArray(alertPrefs.asArray())));
criteria.setPageControl(pageControl);
PageList<Alert> alerts = alertManager.findAlertsByCriteria(user.getSubject(), criteria);
disambiguatedAlerts = DisambiguatedResourceListUtil.disambiguate(resourceManager, alerts,