SimpleDateFormat sdf = new SimpleDateFormat(DATE_FORMAT);
Date startDate = sdf.parse(startDateParameter);
String endDateParameter = getOptionalParameter(request, END_DATE_PARAMETER_NAME);
Date endDate = endDateParameter != null ? sdf.parse(endDateParameter) : null;
SystemNotification notification = systemNotificationRepository.createNotification(severity, title, message, startDate, endDate);
if (notification.isActive()) {
workQueueRepository.pushSystemNotification(notification);
}
respondWithSuccessJson(response);
}