Package org.openrefine.commands
Class HttpUtilities
- java.lang.Object
-
- org.openrefine.commands.HttpUtilities
-
public abstract class HttpUtilities extends Object
-
-
Field Summary
Fields Modifier and Type Field Description protected static org.slf4j.Logger
logger
-
Constructor Summary
Constructors Constructor Description HttpUtilities()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static int
getIntegerParameter(javax.servlet.http.HttpServletRequest request, String name, int def)
static void
redirect(javax.servlet.http.HttpServletResponse response, String url)
static void
respond(javax.servlet.http.HttpServletResponse response, String content)
static void
respond(javax.servlet.http.HttpServletResponse response, String status, String message)
static void
respondException(javax.servlet.http.HttpServletResponse response, Exception e)
static void
respondJSON(javax.servlet.http.HttpServletResponse response, Object o)
static void
respondJSON(javax.servlet.http.HttpServletResponse response, Object o, Properties options)
static void
respondWithErrorPage(RefineServlet servlet, javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response, String message, int status, Throwable e)
static void
respondWithErrorPage(RefineServlet servlet, javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response, String message, Throwable e)
-
-
-
Method Detail
-
respond
public static void respond(javax.servlet.http.HttpServletResponse response, String content) throws IOException, javax.servlet.ServletException
- Throws:
IOException
javax.servlet.ServletException
-
respond
public static void respond(javax.servlet.http.HttpServletResponse response, String status, String message) throws IOException
- Throws:
IOException
-
respondJSON
public static void respondJSON(javax.servlet.http.HttpServletResponse response, Object o) throws IOException
- Throws:
IOException
-
respondJSON
public static void respondJSON(javax.servlet.http.HttpServletResponse response, Object o, Properties options) throws IOException
- Throws:
IOException
-
respondException
public static void respondException(javax.servlet.http.HttpServletResponse response, Exception e) throws IOException, javax.servlet.ServletException
- Throws:
IOException
javax.servlet.ServletException
-
redirect
public static void redirect(javax.servlet.http.HttpServletResponse response, String url) throws IOException
- Throws:
IOException
-
getIntegerParameter
public static int getIntegerParameter(javax.servlet.http.HttpServletRequest request, String name, int def)
-
respondWithErrorPage
public static void respondWithErrorPage(RefineServlet servlet, javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response, String message, Throwable e)
-
respondWithErrorPage
public static void respondWithErrorPage(RefineServlet servlet, javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response, String message, int status, Throwable e)
-
-