<%@ page contentType="text/html; charset=UTF-8" %> <%@page import="eu.dnetlib.domain.functionality.NotificationSchedule" %> <%@page import="eu.dnetlib.functionality.notification.app.NotificationServiceContextUtils" %> <% String triggerThresholdString = request.getParameter("triggerThreshold"); final boolean percentileThreshold = triggerThresholdString.endsWith("%"); if (percentileThreshold) triggerThresholdString = triggerThresholdString.substring(0, triggerThresholdString.length() - 1); final Float triggerThreshold = triggerThresholdString.isEmpty() ? null : Float.parseFloat(triggerThresholdString); NotificationServiceContextUtils.getNotificationService(application).addSchedule(new NotificationSchedule(request.getParameter("queryId"), triggerThreshold, percentileThreshold, Long.parseLong(request.getParameter("executionPeriod")), true)); response.sendRedirect("../schedules.jsp"); %>