Package com.google.refine.commands
Class HttpUtilities
java.lang.Object
com.google.refine.commands.HttpUtilities
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic intgetIntegerParameter(javax.servlet.http.HttpServletRequest request, String name, int def) static voidstatic voidstatic voidstatic voidrespondException(javax.servlet.http.HttpServletResponse response, Exception e) static voidrespondJSON(javax.servlet.http.HttpServletResponse response, Object o) static voidrespondJSON(javax.servlet.http.HttpServletResponse response, Object o, Properties options) static voidrespondWithErrorPage(RefineServlet servlet, javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response, String message, int status, Throwable e) static voidrespondWithErrorPage(RefineServlet servlet, javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response, String message, Throwable e)
-
Field Details
-
logger
protected static final org.slf4j.Logger logger
-
-
Constructor Details
-
HttpUtilities
public HttpUtilities()
-
-
Method Details
-
respond
public static void respond(javax.servlet.http.HttpServletResponse response, String content) throws IOException, javax.servlet.ServletException - Throws:
IOExceptionjavax.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:
IOExceptionjavax.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)
-