Class MultiValuesConverterFactory.MultiValuesToObjectConverter

    • Constructor Detail

      • MultiValuesToObjectConverter

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

      • retrieveSeparatedValue

        protected java.util.Optional<java.lang.Object> retrieveSeparatedValue​(ArgumentConversionContext<java.lang.Object> 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.lang.Object> retrieveMultiValue​(ArgumentConversionContext<java.lang.Object> 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.lang.Object> retrieveDeepObjectValue​(ArgumentConversionContext<java.lang.Object> 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