All Downloads are FREE. Search and download functionalities are using the official Maven repository.

io.quarkus.hibernate.validator.runtime.locale.ResteasyClassicLocaleResolver Maven / Gradle / Ivy

Go to download

Validate object properties (field, getter) and method parameters for your beans (REST, CDI, Jakarta Persistence)

There is a newer version: 3.15.0
Show newest version
package io.quarkus.hibernate.validator.runtime.locale;

import java.util.List;
import java.util.Map;

import jakarta.inject.Singleton;
import jakarta.ws.rs.core.HttpHeaders;

import org.jboss.resteasy.core.ResteasyContext;

@Singleton
public class ResteasyClassicLocaleResolver extends AbstractLocaleResolver {

    @Override
    protected Map> getHeaders() {
        HttpHeaders httpHeaders = ResteasyContext.getContextData(HttpHeaders.class);
        if (httpHeaders != null) {
            return httpHeaders.getRequestHeaders();
        } else {
            return null;
        }
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy