Package cool.scx.web

Class ScxWebHelper

java.lang.Object
cool.scx.web.ScxWebHelper

public class ScxWebHelper extends Object
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    static io.vertx.core.http.HttpServerResponse
    fillContentType(io.vertx.core.http.HttpServerResponse response, MediaType contentType)
     
    static io.vertx.core.http.HttpServerResponse
    fillHtmlContentType(io.vertx.core.http.HttpServerResponse response)
     
    static io.vertx.core.http.HttpServerResponse
    fillJsonContentType(io.vertx.core.http.HttpServerResponse response)
     
    static io.vertx.core.http.HttpServerResponse
    fillTextPlainContentType(io.vertx.core.http.HttpServerResponse response)
     
    static io.vertx.core.http.HttpServerResponse
    fillXmlContentType(io.vertx.core.http.HttpServerResponse response)
     
    static com.fasterxml.jackson.databind.JsonNode
    getFromJsonNode(String name, com.fasterxml.jackson.databind.JsonNode jsonNode, boolean useAll)
    getFromJsonNode.
    static Object
    getFromMap(String name, io.vertx.core.MultiMap map, boolean useAll, com.fasterxml.jackson.databind.JavaType javaType)
    getFromMap.
    static Object
    getFromMap(String name, Map<String,String> map, boolean useAll)
    getFromMap.
    static <T> T
    readValue(com.fasterxml.jackson.databind.JsonNode jsonNode, com.fasterxml.jackson.databind.JavaType type)
    a
    static boolean
    responseCanUse(io.vertx.ext.web.RoutingContext context)
     
    static io.vertx.core.http.HttpMethod
     

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • 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.

      Parameters:
      name - a String object
      map - a MultiMap object
      useAll - a boolean
      javaType - a JavaType object
      Returns:
      a Object object
    • getFromMap

      public static Object getFromMap(String name, Map<String,String> map, boolean useAll)

      getFromMap.

      Parameters:
      name - a String object
      map - a Map object
      useAll - a boolean
      Returns:
      a Object object
    • 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 - a
      type - 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 - a String object
      jsonNode - a JsonNode object
      useAll - a boolean
      Returns:
      a JsonNode object
    • responseCanUse

      public static boolean responseCanUse(io.vertx.ext.web.RoutingContext context)
    • toVertxMethod

      public static io.vertx.core.http.HttpMethod toVertxMethod(HttpMethod httpMethod)
    • 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)