diff src/nabble/view/web/tools/NamlEditor.java @ 0:7ecd1a4ef557

add content
author Franklin Schmidt <fschmidt@gmail.com>
date Thu, 21 Mar 2019 19:15:52 -0600
parents
children
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/nabble/view/web/tools/NamlEditor.java	Thu Mar 21 19:15:52 2019 -0600
@@ -0,0 +1,48 @@
+package nabble.view.web.tools;
+
+import javax.servlet.ServletException;
+import javax.servlet.http.HttpServlet;
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+import java.io.IOException;
+
+/**
+ * Similar to the NamlEditor in the template package, but this one
+ * doesn't required login. This is used only by Nabble admins.
+ */
+public class NamlEditor extends HttpServlet {
+
+	protected void service(HttpServletRequest request, HttpServletResponse response)
+		throws ServletException, IOException
+	{
+		nabble.view.web.template.NamlEditor.buildPage(request, response);
+	}
+
+	public static class Save extends HttpServlet {
+
+		protected void service(HttpServletRequest request, HttpServletResponse response)
+			throws ServletException, IOException
+		{
+			nabble.view.web.template.NamlEditor.save(request, response);
+		}
+	}
+
+	public static class UploadForm extends HttpServlet {
+
+		protected void service(HttpServletRequest request, HttpServletResponse response)
+			throws ServletException, IOException
+		{
+			nabble.view.web.template.NamlEditor.uploadForm(request, response);
+		}
+	}
+
+	public static class Upload extends HttpServlet {
+
+		protected void service(HttpServletRequest request, HttpServletResponse response)
+			throws ServletException, IOException
+		{
+			nabble.view.web.template.NamlEditor.upload(request, response);
+		}
+	}
+
+}