org.jboss.resteasy.reactive.server.model.ParamConverterProviders Maven / Gradle / Ivy
package org.jboss.resteasy.reactive.server.model;
import java.util.ArrayList;
import java.util.Collections;
import java.util.List;
import java.util.function.Function;
import jakarta.ws.rs.ext.ParamConverterProvider;
import org.jboss.resteasy.reactive.common.model.ResourceParamConverterProvider;
import org.jboss.resteasy.reactive.spi.BeanFactory;
public class ParamConverterProviders {
private final List paramConverterProviders = new ArrayList<>();
public void addParamConverterProviders(ResourceParamConverterProvider resourceFeature) {
paramConverterProviders.add(resourceFeature);
}
public List getParamConverterProviders() {
return paramConverterProviders;
}
public void sort() {
Collections.sort(paramConverterProviders);
}
public void initializeDefaultFactories(Function> factoryCreator) {
for (ResourceParamConverterProvider i : paramConverterProviders) {
i.setFactory((BeanFactory) factoryCreator.apply(i.getClassName()));
}
}
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy