public class ServletHelpers extends Object
Modifier and Type | Field and Description |
---|---|
protected static String |
HEADER_HAWTIO_FORBIDDEN_REASON |
Constructor and Description |
---|
ServletHelpers() |
Modifier and Type | Method and Description |
---|---|
static void |
doAuthPrompt(String realm,
javax.servlet.http.HttpServletResponse response) |
static void |
doForbidden(javax.servlet.http.HttpServletResponse response) |
static void |
doForbidden(javax.servlet.http.HttpServletResponse response,
ForbiddenReason reason) |
static List |
flatten(List list) |
static Set |
flatten(Set set) |
static String |
generateCsvString(Map xlData) |
static InputStream |
loadFile(String path) |
static Map |
populateErrorTableMapForXl(List listEntry) |
static Map |
populateTableMapForXl(List listEntry) |
static org.json.simple.JSONObject |
readObject(BufferedReader reader) |
static String |
removeNoisyString(Object value) |
static void |
sendJSONResponse(javax.servlet.http.HttpServletResponse response,
boolean value) |
static void |
sendJSONResponse(javax.servlet.http.HttpServletResponse response,
String json) |
protected static final String HEADER_HAWTIO_FORBIDDEN_REASON
public static void doForbidden(javax.servlet.http.HttpServletResponse response)
public static void doForbidden(javax.servlet.http.HttpServletResponse response, ForbiddenReason reason)
public static void doAuthPrompt(String realm, javax.servlet.http.HttpServletResponse response)
public static void sendJSONResponse(javax.servlet.http.HttpServletResponse response, boolean value) throws IOException
IOException
public static void sendJSONResponse(javax.servlet.http.HttpServletResponse response, String json) throws IOException
IOException
public static org.json.simple.JSONObject readObject(BufferedReader reader) throws IOException
IOException
public static InputStream loadFile(String path)
Copyright © 2020 JBoss by Red Hat. All rights reserved.