Class HTTPRequestValidationHandler

  • All Implemented Interfaces:
    io.vertx.core.Handler<RoutingContext>, ValidationHandler, Consumer<RoutingContext>

    public class HTTPRequestValidationHandler
    extends Object
    implements ValidationHandler, io.vertx.core.Handler<RoutingContext>, Consumer<RoutingContext>
    An interface for add HTTP Request validation. This class can validate parameters inside query, path, headers an body (watch below)
    You can assign multiple body type at the same time(for example a JSON schema together with a XML schema). This interface support:
    • application/x-www-form-urlencoded
    • multipart/form-data
    • application/xml
    • application/json
    Also you can add a form parameter for validation without care about content type of your request. For form parameters this interface support both "multipart/form-data" and "application/x-www-form-urlencoded"
    This interface allow extra parameters in the request, so it doesn't care if in a request there's a parameter without a specified validation rule
    If a parameter is flagged as an array, it will be validated also if the size of array is 1 element

    NOTE: This class has been automatically generated from the original non Mutiny-ified interface using Vert.x codegen.

    • Constructor Detail

      • HTTPRequestValidationHandler

        public HTTPRequestValidationHandler​(io.vertx.ext.web.api.validation.HTTPRequestValidationHandler delegate)
      • HTTPRequestValidationHandler

        public HTTPRequestValidationHandler​(Object delegate)
    • Method Detail

      • getDelegate

        public io.vertx.ext.web.api.validation.HTTPRequestValidationHandler getDelegate()
        Specified by:
        getDelegate in interface ValidationHandler
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class Object
      • addPathParam

        @Deprecated
        public HTTPRequestValidationHandler addPathParam​(String parameterName,
                                                         io.vertx.ext.web.api.validation.ParameterType type)
        Deprecated.
        Parameters:
        parameterName - expected name of parameter inside the path
        type - expected type of parameter
        Returns:
        this handler
      • addPathParamWithPattern

        @Deprecated
        public HTTPRequestValidationHandler addPathParamWithPattern​(String parameterName,
                                                                    String pattern)
        Deprecated.
        Parameters:
        parameterName - expected name of parameter inside the path
        pattern - regular expression for validation
        Returns:
        this handler
      • addQueryParam

        @Deprecated
        public HTTPRequestValidationHandler addQueryParam​(String parameterName,
                                                          io.vertx.ext.web.api.validation.ParameterType type,
                                                          boolean required)
        Deprecated.
        Parameters:
        parameterName - expected name of parameter inside the query
        type - expected type of parameter
        required - true if parameter is required
        Returns:
        this handler
      • addQueryParamWithPattern

        @Deprecated
        public HTTPRequestValidationHandler addQueryParamWithPattern​(String parameterName,
                                                                     String pattern,
                                                                     boolean required)
        Deprecated.
        Parameters:
        parameterName - expected name of parameter inside the query
        pattern - regular expression for validation
        required - true if parameter is required
        Returns:
        this handler
      • addQueryParamsArray

        @Deprecated
        public HTTPRequestValidationHandler addQueryParamsArray​(String arrayName,
                                                                io.vertx.ext.web.api.validation.ParameterType type,
                                                                boolean required)
        Deprecated.
        Parameters:
        arrayName - expected name of array inside the query
        type - expected type of parameter
        required - true if parameter is required
        Returns:
        this handler
      • addQueryParamsArrayWithPattern

        @Deprecated
        public HTTPRequestValidationHandler addQueryParamsArrayWithPattern​(String arrayName,
                                                                           String pattern,
                                                                           boolean required)
        Deprecated.
        Parameters:
        arrayName - expected name of array inside the query
        pattern - regular expression for validation
        required - true if parameter is required
        Returns:
        this handler
      • addQueryParamWithCustomTypeValidator

        @Deprecated
        public HTTPRequestValidationHandler addQueryParamWithCustomTypeValidator​(String parameterName,
                                                                                 ParameterTypeValidator validator,
                                                                                 boolean required,
                                                                                 boolean allowEmptyValue)
        Deprecated.
        Parameters:
        parameterName - expected name of parameter inside the query
        validator - type validator
        required - true if parameter is required
        allowEmptyValue - true if parameter allowEmptyValue. For more informations about allowEmptyValue behaviour: ParameterValidationRule.allowEmptyValue()
        Returns:
        this handler
      • addHeaderParam

        @Deprecated
        public HTTPRequestValidationHandler addHeaderParam​(String headerName,
                                                           io.vertx.ext.web.api.validation.ParameterType type,
                                                           boolean required)
        Deprecated.
        Parameters:
        headerName - expected header name
        type - expected type of parameter
        required - true if parameter is required
        Returns:
        this handler
      • addHeaderParamWithPattern

        @Deprecated
        public HTTPRequestValidationHandler addHeaderParamWithPattern​(String headerName,
                                                                      String pattern,
                                                                      boolean required)
        Deprecated.
        Parameters:
        headerName - expected header name
        pattern - regular expression for validation
        required - true if parameter is required
        Returns:
        this handler
      • addFormParam

        @Deprecated
        public HTTPRequestValidationHandler addFormParam​(String parameterName,
                                                         io.vertx.ext.web.api.validation.ParameterType type,
                                                         boolean required)
        Deprecated.
        Parameters:
        parameterName - expected name of parameter inside the form
        type - expected type of parameter
        required - true if parameter is required
        Returns:
        this handler
      • addFormParamWithPattern

        @Deprecated
        public HTTPRequestValidationHandler addFormParamWithPattern​(String parameterName,
                                                                    String pattern,
                                                                    boolean required)
        Deprecated.
        Parameters:
        parameterName - expected name of parameter inside the form
        pattern - regular expression for validation
        required - true if parameter is required
        Returns:
        this handler
      • addFormParamsArray

        @Deprecated
        public HTTPRequestValidationHandler addFormParamsArray​(String parameterName,
                                                               io.vertx.ext.web.api.validation.ParameterType type,
                                                               boolean required)
        Deprecated.
        Parameters:
        parameterName - expected name of array of parameters inside the form
        type - expected type of array of parameters
        required - true if parameter is required
        Returns:
        this handler
      • addFormParamsArrayWithPattern

        @Deprecated
        public HTTPRequestValidationHandler addFormParamsArrayWithPattern​(String parameterName,
                                                                          String pattern,
                                                                          boolean required)
        Deprecated.
        Parameters:
        parameterName - expected name of array of parameters inside the form
        pattern - regular expression for validation
        required - true if parameter is required
        Returns:
        this handler
      • addFormParamWithCustomTypeValidator

        @Deprecated
        public HTTPRequestValidationHandler addFormParamWithCustomTypeValidator​(String parameterName,
                                                                                ParameterTypeValidator validator,
                                                                                boolean required,
                                                                                boolean allowEmptyValue)
        Deprecated.
        Parameters:
        parameterName - expected name of parameter inside the form
        validator - type validator
        required - true if parameter is required
        allowEmptyValue - true if parameter allowEmptyValue. For more informations about allowEmptyValue behaviour: ParameterValidationRule.allowEmptyValue()
        Returns:
        this handler
      • addMultipartRequiredFile

        @Deprecated
        public HTTPRequestValidationHandler addMultipartRequiredFile​(String filename,
                                                                     String contentType)
        Deprecated.
        Parameters:
        filename - name of the file inside the form
        contentType - expected content type of file
        Returns:
        this handler
      • newInstance

        public static HTTPRequestValidationHandler newInstance​(io.vertx.ext.web.api.validation.HTTPRequestValidationHandler arg)