return fields;
}
@Override
protected AlertDefinitionCriteria getFetchCriteria(DSRequest request) {
AlertDefinitionCriteria criteria = new AlertDefinitionCriteria();
criteria.fetchGroupAlertDefinition(true);
criteria.fetchConditions(true);
criteria.fetchAlertNotifications(true);
Criteria requestCriteria = request.getCriteria();
if (requestCriteria != null) {
Map values = requestCriteria.getValues();
for (Object key : values.keySet()) {
String fieldName = (String) key;
if (fieldName.equals(ResourceAlertDefinitionsView.CRITERIA_RESOURCE_ID)) {
Integer resourceId = (Integer) values.get(fieldName);
criteria.addFilterResourceIds(resourceId);
}
}
}
return criteria;