import net.pterodactylus.util.notify.Notification;
import net.pterodactylus.util.template.Template;
+import net.pterodactylus.util.template.TemplateContext;
/**
* Page that lets the user dismiss a notification.
* {@inheritDoc}
*/
@Override
- protected void processTemplate(Request request, Template template) throws RedirectException {
- super.processTemplate(request, template);
+ protected void processTemplate(Request request, TemplateContext templateContext) throws RedirectException {
+ super.processTemplate(request, templateContext);
String notificationId = request.getHttpRequest().getPartAsStringFailsafe("notification", 36);
- Notification notification = webInterface.getCore().getNotifications().getNotification(notificationId);
+ Notification notification = webInterface.getNotifications().getNotification(notificationId);
if ((notification != null) && notification.isDismissable()) {
- webInterface.getCore().getNotifications().removeNotification(notification);
+ notification.dismiss();
}
- String returnPage = request.getHttpRequest().getPartAsStringFailsafe("returnPage", 64);
+ String returnPage = request.getHttpRequest().getPartAsStringFailsafe("returnPage", 256);
throw new RedirectException(returnPage);
}