Class MultiValuesConverterFactory.MultiValuesToMapConverter

    • Constructor Detail

      • MultiValuesToMapConverter

        public MultiValuesToMapConverter​(ConversionService<?> conversionService)
    • Method Detail

      • retrieveSeparatedValue

        protected java.util.Optional<java.util.Map> retrieveSeparatedValue​(ArgumentConversionContext<java.util.Map> conversionContext,
                                                                           java.lang.String name,
                                                                           ConvertibleMultiValues<java.lang.String> parameters,
                                                                           java.lang.String defaultValue,
                                                                           java.lang.Character delimiter)
        Method to retrieve the values from a separated parameter and return the parameter in desired type.
        Parameters:
        conversionContext - the conversion context of the value to which conversion is done (including type and annotations)
        name - the name of the parameter
        parameters - all the parameters from which the parameter of given name needs to be retrieved
        defaultValue - default value
        delimiter - the delimiter of the values in the parameter String
        Returns:
        the converted value if conversion was successful
      • retrieveMultiValue

        protected java.util.Optional<java.util.Map> retrieveMultiValue​(ArgumentConversionContext<java.util.Map> conversionContext,
                                                                       java.lang.String name,
                                                                       ConvertibleMultiValues<java.lang.String> parameters)
        Method to retrieve the values from a parameter in MULTI format and return in desired type.
        Parameters:
        conversionContext - the conversion context of the value to which conversion is done (including type and annotations)
        name - the name of the parameter
        parameters - all the parameters from which the parameter of given name needs to be retrieved
        Returns:
        the converted value if conversion was successful
      • retrieveDeepObjectValue

        protected java.util.Optional<java.util.Map> retrieveDeepObjectValue​(ArgumentConversionContext<java.util.Map> conversionContext,
                                                                            java.lang.String name,
                                                                            ConvertibleMultiValues<java.lang.String> parameters)
        Method to retrieve the values from a parameter in DEEP_OBJECT format and return in desired type.
        Parameters:
        conversionContext - the conversion context of the value to which conversion is done (including type and annotations)
        name - the name of the parameter
        parameters - all the parameters from which the parameter of given name needs to be retrieved
        Returns:
        the converted value if conversion was successful