Return local Sones from core and web interface.
[Sone.git] / src / main / java / net / pterodactylus / sone / web / ajax / JsonPage.java
index bb32362..e181a4e 100644 (file)
@@ -27,7 +27,7 @@ import java.net.URI;
 import java.util.logging.Level;
 import java.util.logging.Logger;
 
-import net.pterodactylus.sone.data.Sone;
+import net.pterodactylus.sone.data.LocalSone;
 import net.pterodactylus.sone.web.WebInterface;
 import net.pterodactylus.sone.web.page.FreenetPage;
 import net.pterodactylus.sone.web.page.FreenetRequest;
@@ -77,31 +77,12 @@ public abstract class JsonPage implements FreenetPage {
        // ACCESSORS
        //
 
-       /**
-        * Returns the currently logged in Sone.
-        *
-        * @param toadletContext
-        *            The toadlet context
-        * @return The currently logged in Sone, or {@code null} if no Sone is
-        *         currently logged in
-        */
-       protected Optional<Sone> getCurrentSone(ToadletContext toadletContext) {
+       protected Optional<LocalSone> getCurrentSone(ToadletContext toadletContext) {
                return webInterface.getCurrentSone(toadletContext);
        }
 
-       /**
-        * Returns the currently logged in Sone.
-        *
-        * @param toadletContext
-        *            The toadlet context
-        * @param create
-        *            {@code true} to create a new session if no session exists,
-        *            {@code false} to not create a new session
-        * @return The currently logged in Sone, or {@code null} if no Sone is
-        *         currently logged in
-        */
-       protected Optional<Sone> getCurrentSone(ToadletContext toadletContext, boolean create) {
-               return webInterface.getCurrentSone(toadletContext, create);
+       protected Optional<LocalSone> getCurrentSone(ToadletContext toadletContext, boolean createSession) {
+               return webInterface.getCurrentSone(toadletContext, createSession);
        }
 
        //