ru.tinkoff.kora.http.client.common.ParameterConvertersModule Maven / Gradle / Ivy
package ru.tinkoff.kora.http.client.common;
import ru.tinkoff.kora.common.DefaultComponent;
import ru.tinkoff.kora.http.client.common.writer.StringParameterConverter;
import java.time.format.DateTimeFormatter;
import java.util.UUID;
public interface ParameterConvertersModule {
@DefaultComponent
default StringParameterConverter integerConverter() {
return Object::toString;
}
@DefaultComponent
default StringParameterConverter doubleConverter() {
return Object::toString;
}
@DefaultComponent
default StringParameterConverter longConverter() {
return Object::toString;
}
@DefaultComponent
default StringParameterConverter floatConverter() {
return Object::toString;
}
@DefaultComponent
default StringParameterConverter uuidConverter() {
return UUID::toString;
}
@DefaultComponent
default StringParameterConverter booleanConverter() {
return Object::toString;
}
@DefaultComponent
default StringParameterConverter javaTimeOffsetTimeStringParameterConverter() {return DateTimeFormatter.ISO_OFFSET_TIME::format;}
@DefaultComponent
default StringParameterConverter javaTimeOffsetDateTimeStringParameterConverter() {return DateTimeFormatter.ISO_OFFSET_DATE_TIME::format;}
@DefaultComponent
default StringParameterConverter javaTimeLocalTimeStringParameterConverter() {return DateTimeFormatter.ISO_LOCAL_TIME::format;}
@DefaultComponent
default StringParameterConverter javaTimeLocalDateTimeStringParameterConverter() {return DateTimeFormatter.ISO_LOCAL_DATE_TIME::format;}
@DefaultComponent
default StringParameterConverter javaTimeLocalDateStringParameterConverter() {return DateTimeFormatter.ISO_LOCAL_DATE::format;}
@DefaultComponent
default StringParameterConverter javaTimeZonedDateTimeStringParameterConverter() {return DateTimeFormatter.ISO_ZONED_DATE_TIME::format;}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy