Class ValidationHandler


  • public class ValidationHandler
    extends java.lang.Object
    Validates incoming and outgoing JSON and issues warnings in logs.
    Author:
    https://github.com/lbovet [Laurent Bovet], https://github.com/mcweba [Marc-Andre Weber]
    • Constructor Summary

      Constructors 
      Constructor Description
      ValidationHandler​(ValidationResourceManager validationResourceManager, org.swisspush.gateleen.core.storage.ResourceStorage storage, io.vertx.core.http.HttpClient httpClient, java.lang.String schemaRoot)  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void handle​(io.vertx.core.http.HttpServerRequest request)  
      boolean isFailOnError()  
      boolean isToValidate​(io.vertx.core.http.HttpServerRequest request)
      Returns true when the ValidationHandler must be applied to this request.
      void setFailOnError​(boolean failOnError)  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • ValidationHandler

        public ValidationHandler​(ValidationResourceManager validationResourceManager,
                                 org.swisspush.gateleen.core.storage.ResourceStorage storage,
                                 io.vertx.core.http.HttpClient httpClient,
                                 java.lang.String schemaRoot)
    • Method Detail

      • isToValidate

        public boolean isToValidate​(io.vertx.core.http.HttpServerRequest request)
        Returns true when the ValidationHandler must be applied to this request.
        Parameters:
        request - request
        Returns:
        boolean
      • handle

        public void handle​(io.vertx.core.http.HttpServerRequest request)
      • isFailOnError

        public boolean isFailOnError()
      • setFailOnError

        public void setFailOnError​(boolean failOnError)