X-Git-Url: https://git.pterodactylus.net/?p=Sone.git;a=blobdiff_plain;f=src%2Fmain%2Fjava%2Fnet%2Fpterodactylus%2Fsone%2Fweb%2Fpage%2FFreenetTemplatePage.java;h=97ee53bc1276a493a4bcba1495d2d78a769223ca;hp=e7d6e2854495db8b58a737c98d1ca6ec8d775f63;hb=8fb7349579c0c82d7143601c2007cad6f4cfb000;hpb=7d5aff5d52afa5d9725ce252c846b1aca6f1a761 diff --git a/src/main/java/net/pterodactylus/sone/web/page/FreenetTemplatePage.java b/src/main/java/net/pterodactylus/sone/web/page/FreenetTemplatePage.java index e7d6e28..97ee53b 100644 --- a/src/main/java/net/pterodactylus/sone/web/page/FreenetTemplatePage.java +++ b/src/main/java/net/pterodactylus/sone/web/page/FreenetTemplatePage.java @@ -1,5 +1,5 @@ /* - * Sone - FreenetTemplatePage.java - Copyright © 2010 David Roden + * Sone - FreenetTemplatePage.java - Copyright © 2010–2012 David Roden * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -100,6 +100,7 @@ public class FreenetTemplatePage implements FreenetPage, LinkEnabledCallback { * The request to serve * @return The title of the page */ + @SuppressWarnings("static-method") protected String getPageTitle(FreenetRequest request) { return null; } @@ -155,7 +156,7 @@ public class FreenetTemplatePage implements FreenetPage, LinkEnabledCallback { long start = System.nanoTime(); processTemplate(request, templateContext); long finish = System.nanoTime(); - logger.log(Level.FINEST, "Template was rendered in " + ((finish - start) / 1000) / 1000.0 + "ms."); + logger.log(Level.FINEST, "Template was rendered in %dms.", ((finish - start) / 1000) / 1000.0); } catch (RedirectException re1) { return new RedirectResponse(re1.getTarget()); } @@ -175,6 +176,7 @@ public class FreenetTemplatePage implements FreenetPage, LinkEnabledCallback { * * @return Additional style sheets to load */ + @SuppressWarnings("static-method") protected Collection getStyleSheets() { return Collections.emptySet(); } @@ -184,6 +186,7 @@ public class FreenetTemplatePage implements FreenetPage, LinkEnabledCallback { * * @return The URL of the shortcut icon, or {@code null} for no icon */ + @SuppressWarnings("static-method") protected String getShortcutIcon() { return null; } @@ -227,6 +230,7 @@ public class FreenetTemplatePage implements FreenetPage, LinkEnabledCallback { * The request that is processed * @return The URL to redirect to, or {@code null} to not redirect */ + @SuppressWarnings("static-method") protected String getRedirectTarget(FreenetRequest request) { return null; } @@ -238,6 +242,7 @@ public class FreenetTemplatePage implements FreenetPage, LinkEnabledCallback { * The request for which to return the link nodes * @return All link nodes that should be added to the HTML head */ + @SuppressWarnings("static-method") protected List> getAdditionalLinkNodes(FreenetRequest request) { return Collections.emptyList(); } @@ -249,6 +254,7 @@ public class FreenetTemplatePage implements FreenetPage, LinkEnabledCallback { * @return {@code true} if this page should only be allowed for hosts with * full access, {@code false} to allow this page for any host */ + @SuppressWarnings("static-method") protected boolean isFullAccessOnly() { return false; }