io.castled.forms.StaticOptionsFetcherFactory Maven / Gradle / Ivy
package io.castled.forms;
import io.castled.forms.dtos.FormFieldOption;
import javax.inject.Inject;
import javax.inject.Singleton;
import java.util.List;
import java.util.Map;
@Singleton
public class StaticOptionsFetcherFactory {
private final Map staticOptionsFetchers;
@Inject
public StaticOptionsFetcherFactory(Map staticOptionsFetchers) {
this.staticOptionsFetchers = staticOptionsFetchers;
}
public List getOptions(String optionsRef) {
return staticOptionsFetchers.get(optionsRef).getOptions();
}
}