io.vertx.reactivex.ext.web.api.validation

## Class ParameterTypeValidator

- java.lang.Object
- - io.vertx.reactivex.ext.web.api.validation.ParameterTypeValidator

-     public class ParameterTypeValidator
      extends Object

  Interface for declaration of method for validate a specific parameter type.
  If you want to implement your own type validator, you need only to implement `isValid(java.lang.String)`:
  - If parameter is valid, call to put value (maybe modified) inside RequestParameters. The validation flow will care about set parameter name
  - If parameter is invalid, throw a new ValidationException with message (`ValidationException`) and/or with `ValidationException.ErrorType` (). As for value, the validation flow will care about setting all other ValidationException fields

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

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `static io.vertx.lang.rx.TypeArg<ParameterTypeValidator>` | `__TYPE_ARG`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `ParameterTypeValidator(ParameterTypeValidator delegate)`

  - ### Method Summary

    All Methods Static Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `static ParameterTypeValidator` | `createArrayTypeValidator(ParameterTypeValidator arrayMembersValidator)` Create an array type validator
    `static ParameterTypeValidator` | `createArrayTypeValidator(ParameterTypeValidator arrayMembersValidator, String collectionFormat, Integer maxItems, Integer minItems)` Create an array type validator
    `static ParameterTypeValidator` | `createBooleanTypeValidator(Object defaultValue)` Create a boolean type validator
    `static ParameterTypeValidator` | `createDoubleTypeValidator(Boolean exclusiveMaximum, Double maximum, Boolean exclusiveMinimum, Double minimum, Double multipleOf, Object defaultValue)` Create a new type validator for double values
    `static ParameterTypeValidator` | `createDoubleTypeValidator(Double defaultValue)` Create a new type validator for double values
    `static ParameterTypeValidator` | `createDoubleTypeValidator(Double maximum, Double minimum, Double multipleOf, Double defaultValue)` Create a new type validator for double values
    `static ParameterTypeValidator` | `createEnumTypeValidatorWithInnerValidator(List<String> allowedValues, ParameterTypeValidator innerValidator)` Create an enum type validator
    `static ParameterTypeValidator` | `createFloatTypeValidator(Boolean exclusiveMaximum, Double maximum, Boolean exclusiveMinimum, Double minimum, Double multipleOf, Object defaultValue)` Create a new type validator for float values
    `static ParameterTypeValidator` | `createFloatTypeValidator(Double maximum, Double minimum, Double multipleOf, Float defaultValue)` Create a new type validator for float values
    `static ParameterTypeValidator` | `createFloatTypeValidator(Float defaultValue)` Create a new type validator for float values
    `static ParameterTypeValidator` | `createIntegerTypeValidator(Boolean exclusiveMaximum, Double maximum, Boolean exclusiveMinimum, Double minimum, Double multipleOf, Object defaultValue)` Create a new type validator for integer values
    `static ParameterTypeValidator` | `createIntegerTypeValidator(Double maximum, Double minimum, Double multipleOf, Integer defaultValue)` Create a new type validator for integer values
    `static ParameterTypeValidator` | `createIntegerTypeValidator(Integer defaultValue)` Create a new type validator for integer values
    `static ParameterTypeValidator` | `createLongTypeValidator(Boolean exclusiveMaximum, Double maximum, Boolean exclusiveMinimum, Double minimum, Double multipleOf, Object defaultValue)` Create a new type validator for long integer values
    `static ParameterTypeValidator` | `createLongTypeValidator(Double maximum, Double minimum, Double multipleOf, Long defaultValue)` Create a new type validator for long integer values
    `static ParameterTypeValidator` | `createLongTypeValidator(Long defaultValue)` Create a new type validator for long integer values
    `static ParameterTypeValidator` | `createStringEnumTypeValidator(List<String> allowedValues)` Create an enum type validator
    `static ParameterTypeValidator` | `createStringTypeValidator(Object defaultValue)` Create a new string type validator
    `static ParameterTypeValidator` | `createStringTypeValidator(String pattern, Integer minLength, Integer maxLength, Object defaultValue)` Create a new string type validator
    `static ParameterTypeValidator` | `createStringTypeValidator(String pattern, Object defaultValue)` Create a new string type validator
    `boolean` | `equals(Object o)`
    `Object` | `getDefault()` Returns default value of parameter
    `ParameterTypeValidator` | `getDelegate()`
    `boolean` | `hasDefault()` Returns true if this type validator has default value
    `int` | `hashCode()`
    `RequestParameter` | `isValid(String value)` Function that checks if parameter is valid.
    `RequestParameter` | `isValidCollection(List<String> value)` Function that checks if array of values of a specific parameter.
    `static ParameterTypeValidator` | `newInstance(ParameterTypeValidator arg)`
    `String` | `toString()`

    - ### Methods inherited from class java.lang.Object

      `clone, finalize, getClass, notify, notifyAll, wait, wait, wait`

- - ### Field Detail

    - #### __TYPE_ARG

          public static final io.vertx.lang.rx.TypeArg<ParameterTypeValidator> __TYPE_ARG

  - ### Constructor Detail

    - #### ParameterTypeValidator

          public ParameterTypeValidator(ParameterTypeValidator delegate)

  - ### Method Detail

    - #### toString

          public String toString()

      Overrides:
        `toString` in class `Object`

    - #### equals

          public boolean equals(Object o)

      Overrides:
        `equals` in class `Object`

    - #### hashCode

          public int hashCode()

      Overrides:
        `hashCode` in class `Object`

    - #### getDelegate

          public ParameterTypeValidator getDelegate()

    - #### isValid

          public RequestParameter isValid(String value)

      Function that checks if parameter is valid. It returns a RequestParameter object that will be linked inside . For more info, check .
      Parameters:
        `value` - value of parameter to test
      Returns:
        request parameter value

    - #### isValidCollection

          public RequestParameter isValidCollection(List<String> value)

      Function that checks if array of values of a specific parameter. It returns a RequestParameter object that will be linked inside . For more info, check .
      Parameters:
        `value` - list of values of parameter to test
      Returns:
        request parameter value

    - #### getDefault

          public Object getDefault()

      Returns default value of parameter
      Returns:

    - #### hasDefault

          public boolean hasDefault()

      Returns true if this type validator has default value
      Returns:

    - #### createIntegerTypeValidator

          public static ParameterTypeValidator createIntegerTypeValidator(Integer defaultValue)

      Create a new type validator for integer values
      Parameters:
        `defaultValue` - Default value that will be set if parameter is empty or not found. To apply default value you have to set `ParameterValidationRule.allowEmptyValue()` true. It can be null
      Returns:

    - #### createIntegerTypeValidator

          public static ParameterTypeValidator createIntegerTypeValidator(Double maximum,
                                                                          Double minimum,
                                                                          Double multipleOf,
                                                                          Integer defaultValue)

      Create a new type validator for integer values
      Parameters:
        `maximum` - Maximum value. It can be null
        `minimum` - Minimum value. It can be null
        `multipleOf` - Multiple of value. It can be null
        `defaultValue` - Default value that will be set if parameter is empty or not found. To apply default value you have to set `ParameterValidationRule.allowEmptyValue()` true. It can be null
      Returns:

    - #### createIntegerTypeValidator

          public static ParameterTypeValidator createIntegerTypeValidator(Boolean exclusiveMaximum,
                                                                          Double maximum,
                                                                          Boolean exclusiveMinimum,
                                                                          Double minimum,
                                                                          Double multipleOf,
                                                                          Object defaultValue)

      Create a new type validator for integer values
      Parameters:
        `exclusiveMaximum` - If true, value will be mark as valid if value < maximum. If false, value will be mark as valid if value <= maximum. The default value is false. It can be null
        `maximum` - Maximum value. It can be null
        `exclusiveMinimum` - If true, value will be mark as valid if value > minimum. If false, value will be mark as valid if value >= minimum. The default value is false. It can be null
        `minimum` - Minimum value. It can be null
        `multipleOf` - Multiple of value. It can be null
        `defaultValue` - Default value that will be set if parameter is empty or not found. To apply default value you have to set `ParameterValidationRule.allowEmptyValue()` true. It can be null
      Returns:

    - #### createLongTypeValidator

          public static ParameterTypeValidator createLongTypeValidator(Long defaultValue)

      Create a new type validator for long integer values
      Parameters:
        `defaultValue` - Default value that will be set if parameter is empty or not found. To apply default value you have to set `ParameterValidationRule.allowEmptyValue()` true. It can be null
      Returns:

    - #### createLongTypeValidator

          public static ParameterTypeValidator createLongTypeValidator(Double maximum,
                                                                       Double minimum,
                                                                       Double multipleOf,
                                                                       Long defaultValue)

      Create a new type validator for long integer values
      Parameters:
        `maximum` - Maximum value. It can be null
        `minimum` - Minimum value. It can be null
        `multipleOf` - Multiple of value. It can be null
        `defaultValue` - Default value that will be set if parameter is empty or not found. To apply default value you have to set `ParameterValidationRule.allowEmptyValue()` true. It can be null
      Returns:

    - #### createLongTypeValidator

          public static ParameterTypeValidator createLongTypeValidator(Boolean exclusiveMaximum,
                                                                       Double maximum,
                                                                       Boolean exclusiveMinimum,
                                                                       Double minimum,
                                                                       Double multipleOf,
                                                                       Object defaultValue)

      Create a new type validator for long integer values
      Parameters:
        `exclusiveMaximum` - If true, value will be mark as valid if value < maximum. If false, value will be mark as valid if value <= maximum. The default value is false. It can be null
        `maximum` - Maximum value. It can be null
        `exclusiveMinimum` - If true, value will be mark as valid if value > minimum. If false, value will be mark as valid if value >= minimum. The default value is false. It can be null
        `minimum` - Minimum value. It can be null
        `multipleOf` - Multiple of value. It can be null
        `defaultValue` - Default value that will be set if parameter is empty or not found. To apply default value you have to set `ParameterValidationRule.allowEmptyValue()` true. It can be null
      Returns:

    - #### createFloatTypeValidator

          public static ParameterTypeValidator createFloatTypeValidator(Float defaultValue)

      Create a new type validator for float values
      Parameters:
        `defaultValue` - Default value that will be set if parameter is empty or not found. To apply default value you have to set `ParameterValidationRule.allowEmptyValue()` true. It can be null
      Returns:

    - #### createFloatTypeValidator

          public static ParameterTypeValidator createFloatTypeValidator(Double maximum,
                                                                        Double minimum,
                                                                        Double multipleOf,
                                                                        Float defaultValue)

      Create a new type validator for float values
      Parameters:
        `maximum` - Maximum value. It can be null
        `minimum` - Minimum value. It can be null
        `multipleOf` - Multiple of value. It can be null
        `defaultValue` - Default value that will be set if parameter is empty or not found. To apply default value you have to set `ParameterValidationRule.allowEmptyValue()` true. It can be null
      Returns:

    - #### createFloatTypeValidator

          public static ParameterTypeValidator createFloatTypeValidator(Boolean exclusiveMaximum,
                                                                        Double maximum,
                                                                        Boolean exclusiveMinimum,
                                                                        Double minimum,
                                                                        Double multipleOf,
                                                                        Object defaultValue)

      Create a new type validator for float values
      Parameters:
        `exclusiveMaximum` - If true, value will be mark as valid if value < maximum. If false, value will be mark as valid if value <= maximum. The default value is false. It can be null
        `maximum` - Maximum value. It can be null
        `exclusiveMinimum` - If true, value will be mark as valid if value > minimum. If false, value will be mark as valid if value >= minimum. The default value is false. It can be null
        `minimum` - Minimum value. It can be null
        `multipleOf` - Multiple of value. It can be null
        `defaultValue` - Default value that will be set if parameter is empty or not found. To apply default value you have to set `ParameterValidationRule.allowEmptyValue()` true. It can be null
      Returns:

    - #### createDoubleTypeValidator

          public static ParameterTypeValidator createDoubleTypeValidator(Double defaultValue)

      Create a new type validator for double values
      Parameters:
        `defaultValue` - Default value that will be set if parameter is empty or not found. To apply default value you have to set `ParameterValidationRule.allowEmptyValue()` true. It can be null
      Returns:

    - #### createDoubleTypeValidator

          public static ParameterTypeValidator createDoubleTypeValidator(Double maximum,
                                                                         Double minimum,
                                                                         Double multipleOf,
                                                                         Double defaultValue)

      Create a new type validator for double values
      Parameters:
        `maximum` - Maximum value. It can be null
        `minimum` - Minimum value. It can be null
        `multipleOf` - Multiple of value. It can be null
        `defaultValue` - Default value that will be set if parameter is empty or not found. To apply default value you have to set `ParameterValidationRule.allowEmptyValue()` true. It can be null
      Returns:

    - #### createDoubleTypeValidator

          public static ParameterTypeValidator createDoubleTypeValidator(Boolean exclusiveMaximum,
                                                                         Double maximum,
                                                                         Boolean exclusiveMinimum,
                                                                         Double minimum,
                                                                         Double multipleOf,
                                                                         Object defaultValue)

      Create a new type validator for double values
      Parameters:
        `exclusiveMaximum` - If true, value will be mark as valid if value < maximum. If false, value will be mark as valid if value <= maximum. The default value is false. It can be null
        `maximum` - Maximum value. It can be null
        `exclusiveMinimum` - If true, value will be mark as valid if value > minimum. If false, value will be mark as valid if value >= minimum. The default value is false. It can be null
        `minimum` - Minimum value. It can be null
        `multipleOf` - Multiple of value. It can be null
        `defaultValue` - Default value that will be set if parameter is empty or not found. To apply default value you have to set `ParameterValidationRule.allowEmptyValue()` true. It can be null
      Returns:

    - #### createStringTypeValidator

          public static ParameterTypeValidator createStringTypeValidator(Object defaultValue)

      Create a new string type validator
      Parameters:
        `defaultValue` - Default value that will be set if parameter is empty or not found. To apply default value you have to set `ParameterValidationRule.allowEmptyValue()` true. It can be null
      Returns:

    - #### createStringTypeValidator

          public static ParameterTypeValidator createStringTypeValidator(String pattern,
                                                                         Object defaultValue)

      Create a new string type validator
      Parameters:
        `pattern` - pattern that string have to match. It can be null
        `defaultValue` - Default value that will be set if parameter is empty or not found. To apply default value you have to set `ParameterValidationRule.allowEmptyValue()` true. It can be null
      Returns:

    - #### createStringTypeValidator

          public static ParameterTypeValidator createStringTypeValidator(String pattern,
                                                                         Integer minLength,
                                                                         Integer maxLength,
                                                                         Object defaultValue)

      Create a new string type validator
      Parameters:
        `pattern` - pattern that string have to match. It can be null
        `minLength` - Minimum length of string. It can be null
        `maxLength` - Maximum length of string. It can be null
        `defaultValue` - Default value that will be set if parameter is empty or not found. To apply default value you have to set `ParameterValidationRule.allowEmptyValue()` true. It can be null
      Returns:

    - #### createBooleanTypeValidator

          public static ParameterTypeValidator createBooleanTypeValidator(Object defaultValue)

      Create a boolean type validator
      Parameters:
        `defaultValue` - Default value that will be set if parameter is empty or not found. To apply default value you have to set `ParameterValidationRule.allowEmptyValue()` true. It can be null
      Returns:

    - #### createStringEnumTypeValidator

          public static ParameterTypeValidator createStringEnumTypeValidator(List<String> allowedValues)

      Create an enum type validator
      Parameters:
        `allowedValues` - allowed values. It can't be null
      Returns:

    - #### createEnumTypeValidatorWithInnerValidator

          public static ParameterTypeValidator createEnumTypeValidatorWithInnerValidator(List<String> allowedValues,
                                                                                         ParameterTypeValidator innerValidator)

      Create an enum type validator
      Parameters:
        `allowedValues` - allowed values. It can't be null
        `innerValidator` - After check if value is one of the lists, you can pass the value to an inner validator. It can be null
      Returns:

    - #### createArrayTypeValidator

          public static ParameterTypeValidator createArrayTypeValidator(ParameterTypeValidator arrayMembersValidator)

      Create an array type validator
      Parameters:
        `arrayMembersValidator` - Type validator that describe array items. It can't be null
      Returns:

    - #### createArrayTypeValidator

          public static ParameterTypeValidator createArrayTypeValidator(ParameterTypeValidator arrayMembersValidator,
                                                                        String collectionFormat,
                                                                        Integer maxItems,
                                                                        Integer minItems)

      Create an array type validator
      Parameters:
        `arrayMembersValidator` - Type validator that describe array items. It can't be null
        `collectionFormat` - String that represent a ContainerSerializationStyle. Check out `ContainerSerializationStyle` for more informations. The default value is "csv". It can be null
        `maxItems` - Maximum items in array. It can be null
        `minItems` - Minimum items in array. It can be null
      Returns:

    - #### newInstance

          public static ParameterTypeValidator newInstance(ParameterTypeValidator arg)

Copyright © 2018 Eclipse. All rights reserved.