import net.pterodactylus.sone.web.page.FreenetRequest;
import net.pterodactylus.sone.web.page.FreenetTemplatePage;
import net.pterodactylus.util.notify.Notification;
-import net.pterodactylus.util.object.HashCode;
import net.pterodactylus.util.template.Template;
import net.pterodactylus.util.template.TemplateContext;
return requireLogin;
}
+ protected void processSonePage(FreenetRequest request, TemplateContext templateContext) throws RedirectException {
+ }
+
/**
* {@inheritDoc}
*/
@Override
- protected void processTemplate(FreenetRequest request, TemplateContext templateContext) throws RedirectException {
- super.processTemplate(request, templateContext);
+ protected final void processTemplate(FreenetRequest request, TemplateContext templateContext) throws RedirectException {
Sone currentSone = getCurrentSone(request.getToadletContext(), false);
templateContext.set("core", webInterface.getCore());
templateContext.set("currentSone", currentSone);
List<Notification> notifications = ListNotificationFilters.filterNotifications(webInterface.getNotifications().getNotifications(), currentSone);
Collections.sort(notifications, Notification.CREATED_TIME_SORTER);
templateContext.set("notifications", notifications);
- templateContext.set("notificationHash", HashCode.hashCode(notifications));
+ templateContext.set("notificationHash", notifications.hashCode());
+ processSonePage(request, templateContext);
}
/**