From: David ‘Bombe’ Roden Date: Tue, 24 Jan 2017 17:54:07 +0000 (+0100) Subject: Remove unused session-related methods from public interface X-Git-Tag: 0.9.7^2~317 X-Git-Url: https://git.pterodactylus.net/?p=Sone.git;a=commitdiff_plain;h=5eb126755d66eea1b6350f48954810d3029e9f8a Remove unused session-related methods from public interface --- diff --git a/src/main/java/net/pterodactylus/sone/web/SoneTemplatePage.java b/src/main/java/net/pterodactylus/sone/web/SoneTemplatePage.java index 6278321..27d4bf7 100644 --- a/src/main/java/net/pterodactylus/sone/web/SoneTemplatePage.java +++ b/src/main/java/net/pterodactylus/sone/web/SoneTemplatePage.java @@ -118,35 +118,6 @@ public class SoneTemplatePage extends FreenetTemplatePage { // /** - * Returns the current session, creating a new session if there is no - * current session. - * - * @param toadletContenxt - * The toadlet context - * @return The current session, or {@code null} if there is no current - * session - */ - protected Session getCurrentSession(ToadletContext toadletContenxt) { - return webInterface.getCurrentSession(toadletContenxt); - } - - /** - * Returns the current session, creating a new session if there is no - * current session and {@code create} is {@code true}. - * - * @param toadletContenxt - * The toadlet context - * @param create - * {@code true} to create a new session if there is no current - * session, {@code false} otherwise - * @return The current session, or {@code null} if there is no current - * session - */ - protected Session getCurrentSession(ToadletContext toadletContenxt, boolean create) { - return webInterface.getCurrentSession(toadletContenxt, create); - } - - /** * Returns the currently logged in Sone. * * @param toadletContext diff --git a/src/main/java/net/pterodactylus/sone/web/WebInterface.java b/src/main/java/net/pterodactylus/sone/web/WebInterface.java index a1352b9..766098f 100644 --- a/src/main/java/net/pterodactylus/sone/web/WebInterface.java +++ b/src/main/java/net/pterodactylus/sone/web/WebInterface.java @@ -381,7 +381,7 @@ public class WebInterface { * @return The current session, or {@code null} if there is no current * session */ - public Session getCurrentSession(ToadletContext toadletContenxt) { + private Session getCurrentSession(ToadletContext toadletContenxt) { return getCurrentSession(toadletContenxt, true); } @@ -397,7 +397,7 @@ public class WebInterface { * @return The current session, or {@code null} if there is no current * session */ - public Session getCurrentSession(ToadletContext toadletContenxt, boolean create) { + private Session getCurrentSession(ToadletContext toadletContenxt, boolean create) { Session session = getSessionManager().useSession(toadletContenxt); if (create && (session == null)) { session = getSessionManager().createSession(UUID.randomUUID().toString(), toadletContenxt); diff --git a/src/main/java/net/pterodactylus/sone/web/ajax/JsonPage.java b/src/main/java/net/pterodactylus/sone/web/ajax/JsonPage.java index 289b5a4..1050eee 100644 --- a/src/main/java/net/pterodactylus/sone/web/ajax/JsonPage.java +++ b/src/main/java/net/pterodactylus/sone/web/ajax/JsonPage.java @@ -77,35 +77,6 @@ public abstract class JsonPage implements FreenetPage { // /** - * Returns the current session, creating a new session if there is no - * current session. - * - * @param toadletContenxt - * The toadlet context - * @return The current session, or {@code null} if there is no current - * session - */ - protected Session getCurrentSession(ToadletContext toadletContenxt) { - return webInterface.getCurrentSession(toadletContenxt); - } - - /** - * Returns the current session, creating a new session if there is no - * current session and {@code create} is {@code true}. - * - * @param toadletContenxt - * The toadlet context - * @param create - * {@code true} to create a new session if there is no current - * session, {@code false} otherwise - * @return The current session, or {@code null} if there is no current - * session - */ - protected Session getCurrentSession(ToadletContext toadletContenxt, boolean create) { - return webInterface.getCurrentSession(toadletContenxt, create); - } - - /** * Returns the currently logged in Sone. * * @param toadletContext