Package cool.scx.web
Class ScxWebHelper
java.lang.Object
cool.scx.web.ScxWebHelper
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic io.vertx.core.http.HttpServerResponsefillContentType(io.vertx.core.http.HttpServerResponse response, MediaType contentType) static io.vertx.core.http.HttpServerResponsefillHtmlContentType(io.vertx.core.http.HttpServerResponse response) static io.vertx.core.http.HttpServerResponsefillJsonContentType(io.vertx.core.http.HttpServerResponse response) static io.vertx.core.http.HttpServerResponsefillTextPlainContentType(io.vertx.core.http.HttpServerResponse response) static io.vertx.core.http.HttpServerResponsefillXmlContentType(io.vertx.core.http.HttpServerResponse response) static com.fasterxml.jackson.databind.JsonNodegetFromJsonNode(String name, com.fasterxml.jackson.databind.JsonNode jsonNode, boolean useAll) getFromJsonNode.static ObjectgetFromMap(String name, io.vertx.core.MultiMap map, boolean useAll, com.fasterxml.jackson.databind.JavaType javaType) getFromMap.static ObjectgetFromMap(String name, Map<String, String> map, boolean useAll) getFromMap.static <T> TreadValue(com.fasterxml.jackson.databind.JsonNode jsonNode, com.fasterxml.jackson.databind.JavaType type) astatic booleanresponseCanUse(io.vertx.ext.web.RoutingContext context) static io.vertx.core.http.HttpMethodtoVertxMethod(HttpMethod httpMethod)
-
Constructor Details
-
ScxWebHelper
public ScxWebHelper()
-
-
Method Details
-
getFromMap
public static Object getFromMap(String name, io.vertx.core.MultiMap map, boolean useAll, com.fasterxml.jackson.databind.JavaType javaType) getFromMap.
-
getFromMap
getFromMap.
-
readValue
public static <T> T readValue(com.fasterxml.jackson.databind.JsonNode jsonNode, com.fasterxml.jackson.databind.JavaType type) throws IOException a- Type Parameters:
T- a- Parameters:
jsonNode- atype- a- Returns:
- a
- Throws:
IOException- a
-
getFromJsonNode
public static com.fasterxml.jackson.databind.JsonNode getFromJsonNode(String name, com.fasterxml.jackson.databind.JsonNode jsonNode, boolean useAll) getFromJsonNode.
- Parameters:
name- aStringobjectjsonNode- aJsonNodeobjectuseAll- a boolean- Returns:
- a
JsonNodeobject
-
responseCanUse
public static boolean responseCanUse(io.vertx.ext.web.RoutingContext context) -
toVertxMethod
-
fillContentType
public static io.vertx.core.http.HttpServerResponse fillContentType(io.vertx.core.http.HttpServerResponse response, MediaType contentType) -
fillJsonContentType
public static io.vertx.core.http.HttpServerResponse fillJsonContentType(io.vertx.core.http.HttpServerResponse response) -
fillXmlContentType
public static io.vertx.core.http.HttpServerResponse fillXmlContentType(io.vertx.core.http.HttpServerResponse response) -
fillHtmlContentType
public static io.vertx.core.http.HttpServerResponse fillHtmlContentType(io.vertx.core.http.HttpServerResponse response) -
fillTextPlainContentType
public static io.vertx.core.http.HttpServerResponse fillTextPlainContentType(io.vertx.core.http.HttpServerResponse response)
-