Enhance JSON page to optionally require a form password.
[Sone.git] / src / main / java / net / pterodactylus / sone / web / ajax / GetTranslationPage.java
index 21ec083..68f1777 100644 (file)
@@ -27,9 +27,6 @@ import net.pterodactylus.util.json.JsonObject;
  */
 public class GetTranslationPage extends JsonPage {
 
-       /** The Sone web interface. */
-       private WebInterface webInterface;
-
        /**
         * Creates a new translation page.
         *
@@ -37,10 +34,13 @@ public class GetTranslationPage extends JsonPage {
         *            The Sone web interface
         */
        public GetTranslationPage(WebInterface webInterface) {
-               super("ajax/getTranslation.ajax");
-               this.webInterface = webInterface;
+               super("ajax/getTranslation.ajax", webInterface);
        }
 
+       //
+       // JSONPAGE METHODS
+       //
+
        /**
         * {@inheritDoc}
         */
@@ -51,4 +51,12 @@ public class GetTranslationPage extends JsonPage {
                return new JsonObject().put("value", translation);
        }
 
+       /**
+        * {@inheritDoc}
+        */
+       @Override
+       protected boolean needsFormPassword() {
+               return false;
+       }
+
 }